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

Update glTF PBR implementation to support current Khronos definition #2111

Open
kwokcb opened this issue Nov 13, 2024 · 2 comments
Open

Update glTF PBR implementation to support current Khronos definition #2111

kwokcb opened this issue Nov 13, 2024 · 2 comments

Comments

@kwokcb
Copy link
Contributor

kwokcb commented Nov 13, 2024

Target

  • To improve glTF <-> USD interop.

Requirements

The glTF PBR implementation is out of date and requires updating to support:

Requester

There is a RFP for work to be done for Khronos.

@emackey
Copy link

emackey commented Nov 18, 2024

Thanks for getting this ball rolling @kwokcb! I'll fill in a bit more detail here on the work Khronos is looking for specifically:

The gltf_pbr.mtlx node of MaterialX should be updated to include new PBR parameters that have been made available since this node was first introduced, specifically:

  • The anisotropyStrength and anisotropyRotation parameters from KHR_materials_anisotropy. This MaterialX node doesn't need to consider glTF's anisotropyTexture parameter here, although transformation scripts will need to take it into account (for example if a given MaterialX graph supplies a texture to one of the first two parameters, it will need to be encoded into a texture when it is exported to glTF).
  • The dispersion parameter from KHR_materials_dispersion. This is equivalent to OpenPBR's transmission_dispersion_scale only when OpenPBR's transmission_dispersion_abbe_number is set exactly to its default value of 20. If the Abbe number is not 20, one must scale the dispersion accordingly (see formulas; it's just an inverse relationship).
  • The diffuseTransmission and diffuseTransmissionColor parameters from KHR_materials_diffuse_transmission. Don't get distracted by the glTF spec's use of the terms "Factor" vs "Texture", those are just choices between uniform vs per-texel in glTF land and have no bearing on the MaterialX node graph, which is always procedural. The diffuseTransmission parameter allows forward-scattering of light through a surface via the diffuse lobe, and diffuseTransmissionColor modulates the color of such light.
  • The thin-wall issue mentioned in the original post above.

Also, looking in the MaterialX translation folder, I currently see translation graphs from OpenPBR to SS, and another from SS to glTF. Ideally, Khronos PBR would like to see a graph go directly from OpenPBR to glTF, and another from glTF back to OpenPBR.

@emackey
Copy link

emackey commented Nov 18, 2024

/cc @DRx3D who is putting together an RFP

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

2 participants