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

Make glTF PBR thickness input control thin-walledness #1937

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pablode
Copy link
Contributor

@pablode pablode commented Jul 13, 2024

Attempts to fix #1936. Needs some testing.

@pablode
Copy link
Contributor Author

pablode commented Aug 9, 2024

Just a heads-up: looks good in MaterialXView, but I'm waiting for USD with MaterialX 1.39 so that this can be tested with a path tracer.

@jstone-lucasfilm
Copy link
Member

@pablode I believe it's now possible to test MaterialX 1.39 functionality in Omniverse Kit 106, if you'd like to give this a try.

@pablode
Copy link
Contributor Author

pablode commented Nov 23, 2024

@jstone-lucasfilm I just tested this with MaterialX 1.39.1 and the latest MDL SDK. Unfortunately I'm getting an MDL compilation error:

[12:57:32.022] (ERROR) [MDL] <string>(80,121): C219 'mx_surface' : cannot convert argument 'mxp_thin_walled' from 'bool' to 'uniform bool': depends on parameter type
[12:57:32.022] (ERROR) [MDL] <string>(80,121): C219 'mx_surface' : cannot convert argument 'mxp_thin_walled' from 'bool' to 'uniform bool': depends on parameter type

At first glance, the problem seems to be that thickness is declared with uniform="false" in the gltf_pbr, while the surface node has thin_walled declared as uniform="true".

@jstone-lucasfilm
Copy link
Member

Thanks for testing this, @pablode, and I'm CC'ing @niklasharrysson for his thoughts on which direction we ought to go with the uniformity of thickness and thin-walled properties in MaterialX.

@niklasharrysson
Copy link
Contributor

Since the thin_walled input is uniform it doesn't work to connect a network with a varying / non-uniform parameter upstream. In order for this to work the thickness input must also be set as uniform.

thin_walled is set to uniform since a surface must be either a closed volume (thin_walled = false) or a thin doublesided sheet (thin_walled = true). It can't be both, depending on a varying variable.

It is MDL in particular that enforces this rule, as it has the concept of uniform variables built into the language. And thin_walled is a uniform in the MDL material model.

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

Successfully merging this pull request may close these issues.

Update the glTF PBR implementation to support thin-walledness
3 participants