-
Notifications
You must be signed in to change notification settings - Fork 358
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
Shader Translation: Support transmission in Standard Surface to glTF PBR #1599
Comments
Yes, this was a design decision for glTF transmission: Base color is also the transmission color. When |
Thanks @emackey, Then I think the remaining issue lies with the std_surface -> gltf_pbr translation graph that this should be taken into account. Also when a OpenPBR -> gltf_pbr translation graph is created it should use the same logic. Leaving this issue open for that. |
So it sounds like this is specifically a bug in standard_surface_to_gltf_pbr.mtlx. Right now SS And that means yes, when SS |
can I pick this issue for ASF DevDays 2024 ? |
Done, and thanks @charo-m! |
ohh to late for me, good luck ! |
I've added some repro steps which I hope will help. For faster setup, it is feasible to download the current release of MaterialX, and modify the file in Of course to check in you'd want to run against a proper development build. |
For the repro steps, I wasn't able to get MaterialXView working (I'm on an Intel macbook, and couldn't use the prebuilt binary as it was arm64 only - and the one that I built gets into a bad state when I try to load a different material). So instead, I added some lines to write out to disk the translated material (removed before submitting PR) to the unit test which translates SS glass to glTF PBR, then inspected that in MaterialXGraphEditor which works fine. PR: #2027 |
Issue
Unlike standard surface and openpbr, base color on gltf pbr affects transmission. This seems
to be the way it's supposed to work but is inconsistent with the other shading models.
For example if you take the glass example which has a
base
value if 0, this renders as a "clear" material using standard surface and openpbr, but renders opaque black with gltf pbr.Test
This is the glTF after translation, but can just create a material and set baseColorFactor to 0 and transmissionFactor to non-0.
Result in model-viewer:
Result in MaterialX Graph Editor:
Workaround
Modify the base color to be white.
CC'ing @proog128 , @emackey as a possible item to check for future OpenPBR compatibility.
Repro Steps:
glass
material intoMaterialXVew
from the installedresources/Materials/Examples/StandardSurface
folderglt_pbr
:The text was updated successfully, but these errors were encountered: