Saip Can Hasbay, 01428723, University of Vienna, saipcanhasbay@gmail.com or a01428723@unet.univie.ac.at
python -m venv c:\path\to\myenv (e.g. python -m venv cloned_repository_root\myenv)
path_to_your_venv\Scripts\activate (e.g. myenv\Scripts\activate)
source path_to_your_venv\bin\activate (e.g. source myenv\bin\activate)
Install dependencies
python -m pip install --upgrade pip
pip install -r requirements.txt
python material_optimizer_gui.py
git submodule update --init --recursive
requirements.txt
file and following the installation steps.nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Jun__8_16:49:14_PDT_2022
Cuda compilation tools, release 11.7, V11.7.99
Build cuda_11.7.r11.7/compiler.31442593_0
If CUDA is not available in your system, or you receive an error similar to this:
AttributeError: jit_init_thread_state(): the CUDA backend is inactive because it has not been initialized via jit_init(), or because the CUDA driver library ("libcuda.so") could not be found! Set the DRJIT_LIBCUDA_PATH environment variable to specify its path.
# cuda path
export PATH="/usr/local/cuda-12.0/bin:$PATH" # set according to cuda version
export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH
./src/material_optimizer_model.py
file and replace the mitsuba variant as demonstrated below. Although at the moment we don't support LLVM (CPU) variant of mitsuba, it still might help to run the application.
# set mitsuba variant: NVIDIA CUDA
# mi.set_variant(CUDA_AD_RGB) # replace this line with
mi.set_variant('llvm_ad_rgb') # with this
C:\Users\user\AppData\Local\Temp\drjit\
pyreverse -o svg --colorized -p MaterialOptimizer .
(make sure "." refers to this repository location)scenes/material-preview/translucent-principled-bsdf/scene-init-bunny.xml
, beginning for line 80:
<shape type="ply">
<string name="filename" value="scenes\material-preview\meshes\bunny.ply"/> # change this
<string name="filename" value="scenes/material-preview/meshes/bunny.ply"/> # with this
<transform name="to_world">
<scale value="13"/>
<rotate z="1" angle="130"/>
<rotate y="1" angle="70"/>
<rotate x="1" angle="-50"/>
<rotate z="1" angle="-50"/>
<rotate y="1" angle="-2"/>
<rotate x="1" angle="12"/>
<translate x="0.3" y="0.0" z="-0.5"/>
</transform>
<ref id="object_bsdf"/>
</shape>
drjit-autodiff: variable leak detected (4 variables remain in use)!
- variable a1154237 (1 references)
- variable a1154245 (1 references)
- variable a1154246 (1 references)
- variable a1154244 (1 references)
Critical Dr.Jit compiler failure: jit_optix_compile(): optixModuleGetCompilationState() indicates that the compilation did not complete succesfully. The module's compilation state is: 0x2363