Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
780 stars 201 forks source link

Improving referencing of materialX files #3789

Open sharktacos opened 6 months ago

sharktacos commented 6 months ago

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):

ADSKnikolam commented 6 months ago

Hey Derek, all

Thank you for your input. We're focused on enhancing the workflow of USD referencing MaterialX files, and have scheduled the required tasks to be completed soon. This week, we're collaborating with our Development team to test the feasibility of the proposed workflow. I am optimistic that the issue will be resolved in the most user-friendly manner. The aim is to make the referenced MaterialX graphs in the USD materialX graph resemble the native MaterialX graphs as closely as possible.

Thanks Nikola

dgovil commented 6 months ago

The first point is due to this https://github.com/PixarAnimationStudios/OpenUSD/issues/3100 afaik