rgl-epfl / differentiable-sdf-rendering

Source code for "Differentiable Signed Distance Function Rendering" (Siggraph 2022)
BSD 3-Clause "New" or "Revised" License
861 stars 53 forks source link

Follow the guide and RuntimeError #14

Closed sloooWTYK closed 1 year ago

sloooWTYK commented 1 year ago

Hi, I would like to thank your for your great work but I have some trouble with your published code. I follow the two lines in readme to install the packages and get the following errors when I try your first example script 'python optimize.py dragon --optconfig no-tex-12':

Traceback (most recent call last): File "optimize.py", line 110, in main(sys.argv[1:]) File "optimize.py", line 106, in main optimize(scene_name, config, opt_config, args.outputdir, args.refspp, args.force, args.verbose, remaining_args) File "optimize.py", line 60, in optimize optimize_shape(opt_config, mts_args, ref_image_paths, current_output_dir, config) File "/home/xxx/differentiable-sdf-rendering-main/python/shape_opt.py", line 47, in optimize_shape sdf_scene = mi.load_file(ref_scene_name, shape_file='dummysdf.xml', sdf_filename=join(SCENE_DIR, 'sdfs', 'bunny_64.vol'), RuntimeError: ​[xml.cpp:1136] Error while loading "/home/xxx/differentiable-sdf-rendering-main/scenes/bunny/../integrator_sdf.xml" (near line 5, col 3): could not instantiate integrator plugin of type "sdf_direct_reparam": ImportError: Before importing any packages, you must specify the desired variant of Mitsuba using "mitsuba.set_variant(..)". [xml.cpp:1136] The following variants are available: scalar_rgb, scalar_spectral, cuda_ad_rgb, llvm_ad_rgb. [xml.cpp:1136] You can also use the MI_DEFAULT_VARIANT environment variable to define a default variant. [xml.cpp:1136] [xml.cpp:1136] At: [xml.cpp:1136] /home/xxx/anaconda3/lib/python3.8/site-packages/mitsuba/init.py(236): getattribute [xml.cpp:1136] /home/xxx/differentiable-sdf-rendering-main/python/shapes.py(35): init [xml.cpp:1136] /home/xxx/differentiable-sdf-rendering-main/python/shapes.py(382): init [xml.cpp:1136] /home/xxx/differentiable-sdf-rendering-main/python/integrators/reparam.py(28): init [xml.cpp:1136] /home/xxx/differentiable-sdf-rendering-main/python/integrators/sdf_direct_reparam.py(10): init [xml.cpp:1136] /home/xxx/differentiable-sdf-rendering-main/python/integrators/sdf_direct_reparam.py(114):

I tried to add a default variant type after every mi was imported but it is not working.

My PC is: Ubuntu 20.04.2 LTS Nvidia RTX 2080Ti with Driver Version: 525.78.01 Cuda 11.1

Can you help me with this issue?

yilmazdoga commented 1 year ago

I had the same issue recently. For me downgrading from mitsuba 3.2.0 to mitsuba 3.1.1 seems to work. You can try pip uninstall drjit mitsuba then pip install mitsuba==3.1.1. I hope this helps.

sloooWTYK commented 1 year ago

I had the same issue recently. For me downgrading from mitsuba 3.2.0 to mitsuba 3.1.1 seems to work. You can try pip uninstall drjit mitsuba then pip install mitsuba==3.1.1. I hope this helps.

This works! Thank you a lot!