MaterialX icon indicating copy to clipboard operation
MaterialX copied to clipboard

[Khronos] MaterialX Specification for glTF texture procedurals

Open ashwinbhat opened this issue 1 year ago • 3 comments

I'm relaying a request on behalf of members on Khronos glTF PBR Procedural Texture group committee. The proposed extensions:

  1. KHR_texture_procedurals
  2. EXT_texture_procedurals_mx_1_39

will allow defining procedural patterns graphs in glTF using MaterialX 1.39 standard library nodes.

We are seeking clarification on MaterialX Specification, specifically around expected behavior of nodes when invalid values are supplied. Will the MaterialX specification define the behavior or will the behavior be defined by the underlying language implementation (glsl, msl, osl etc). This is especially relevant for math, and operator nodes in MaterialX standard library. For example, consider sqrt node, what is the expected behaviour if input is negative?

In order for Khronos glTF PBR Procedural Texture group committee to proceed with using MaterialX 1.39 as a standard, it would be helpful if this behavior is clarified either at the node level or as a general guideline in the specification for each category of nodes.

ashwinbhat avatar Jun 26 '24 17:06 ashwinbhat

@ashwinbhat This is a good topic, and my sense is that clarifying the edge-case behavior of each node is an important goal for the MaterialX project, and will be relevant for both glTF and OpenUSD use cases.

Taking your example of the sqrt node, the MaterialX specification should state explicitly which inputs have defined and undefined behaviors, rather than leaving this documentation to individual shading languages.

jstone-lucasfilm avatar Jun 26 '24 19:06 jstone-lucasfilm

Thanks @jstone-lucasfilm. I'm tagging @lexaknyazev for visibility.

ashwinbhat avatar Jun 27 '24 04:06 ashwinbhat

Adding smothstep as a candidate for edge case docs based on this Slack post: https://academysoftwarefdn.slack.com/archives/C0230LWBE2X/p1724060123942189

kwokcb avatar Aug 19 '24 13:08 kwokcb