-
In mitsuba documentation 0.5.0, it states that obj files .mtl files can be automatically loaded. I currently have a obj file where some parts of it are red and some parts are blue (all using the simplest diffuse model). I opened the obj file with windows 3d viewer and it looks fine. However, if I simply add the obj in mitsuba as: <shape type="obj" id="myshape">
<string name="filename" value="myshape.obj"/>
</shape> Then it renders the whole obj as a gray diffuse surface. If I do the same thing as stated in the documentation: <shape type="obj">
<string name="filename" value="myShape.obj"/>
<bsdf name="Glass" type="dielectric">
<float name="intIOR" value="1.5"/>
</bsdf>
<bsdf name="Water" type="dielectric">
<float name="intIOR" value="1.333"/>
</bsdf>
</shape> then I get the error that each obj can only be assigned with a single bsdf. Does that mean that I need to divide my obj files into parts, and assign a different bsdf to each one instead of simply using the .mtl file? I'm currently using python 3.12 and mitsuba 3.5. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @leleju, Indeed, Mitsuba 3 does not account for the Pull requests adding support for MTL files may be welcome (@wjakob and @njroussel to confirm?). |
Beta Was this translation helpful? Give feedback.
Hello @leleju,
Indeed, Mitsuba 3 does not account for the
.mtl
files. The recommended workflow to create scenes is to use the mitsuba-blender Blender add-on, which will automatically split meshes by material and export a correct XML file.Pull requests adding support for MTL files may be welcome (@wjakob and @njroussel to confirm?).