Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is loading .obj file with .mtl files still supported? #1405

Open
leleju opened this issue Nov 25, 2024 · 0 comments
Open

Is loading .obj file with .mtl files still supported? #1405

leleju opened this issue Nov 25, 2024 · 0 comments

Comments

@leleju
Copy link

leleju commented Nov 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant