sapo17 / BachelorThesis

Simple material parameter estimator tool using Mitsuba 3 and Dr.Jit.
2 stars 0 forks source link

Crash on loading scene file after upgrading mitsuba version to 3.1.1 #39

Closed sapo17 closed 1 year ago

sapo17 commented 1 year ago

mi.load_dict() throws an exception (i.e. causes material-optimizer to crash) if the loaded scene file does not contain the given parameter in mi_load_dict(). For example:

mi.load_dict("scene.xml", resx, resy): In this case if the scene.xml file does not define the resxand resy variables, mitsuba throws an XML error.

Another example:

mi.load_dict("scene.xml", resolution):

 File "c:\Users\saipc\OneDrive\Desktop\SAPO-DOX\Studium\UniWien\BachelorThesis\python\material-optimizer\material_optimizer_gui.py", line 35, in setScene
    self.scene = mi.load_file(
RuntimeError: ​[xml.cpp:1003] Unused parameter "resolution"!
sapo17 commented 1 year ago

Current fix: material-optimizer requires that the loaded mitsuba file contains the following parameters:

sapo17 commented 1 year ago

See commit