maya-usd icon indicating copy to clipboard operation
maya-usd copied to clipboard

Improving referencing of materialX files

Open sharktacos opened this issue 8 months ago • 2 comments

Describe the bug The current way that materialX documents are referenced into USD could be improved.

  1. All shaders are renamed to the generic "ND_standard_surface_surfaceshader" instead of retaining the name in the materialX doc.
  2. The shader connects from the non-existent "surface" into "mtlx:surface" producing an error. This should be "out" > "mtlx:surface"
  3. An input node connects to every attribute in the Standard Surface making all of the attribute sliders unusable. This results in the following compound where the attributes are now in alphabetical order, and the connected maps do not show: image

This input node is in addition to the maps and nodes connected in the MaterialX file, and as such is unnecessary.

image

Better would simply be to not have this input node at all. This would result in the following, where the maps are all connected as they are in the MaterialX doc, and the Standard Surface appears as expected: image

Note that a user cannot break the unwanted connections from the input node, which gives the error "// Error: Node deletion failed: can not delete I/O nodes."

Steps to reproduce Steps to reproduce the behavior:

  1. Reference in a materialX document. For example the OpenChessSet sample "A Beautiful Game"
  2. See the above

Specs (if applicable):

  • OS & version [Mac]
  • Maya version [Maya 2025]
  • Maya USD commit SHA [USD shipping with Maya 2025]

sharktacos avatar May 28 '24 07:05 sharktacos