Skip to content

Multiple surfaceshader outputs failure #2529

@zicher3d

Description

@zicher3d

Something is wrong with multiple outputs, but I couldn't narrow it down to a specific issue. I'm providing steps and files to reproduce it for further analysis.

After a lot of attempts I narrowed it down to these 3 cases.

Image Case 1
  1. A graph with 2 surface shaders (stdsurface and openpbr) each with it's own output
  2. The graph is published from Maya, making it a nodedef+nodegraph
  3. The published file was copied to the local MaterialX libraries
  4. In Graph editor I created a test file using that nodedef, and mixing the two surfaceshaders outputs
  5. The mixed output was then connected to the surface node (Marble_3D because I started from the default graph)
  6. This is working as expected and can be verified in Viewer
Image Case 2
  1. Starting from the same graph above, I moved the Mix node inside the graph
  2. The output from Mix was added as a 3rd output
  3. A single input to the graph is used to drive the Mix amount
  4. As above, I publish the graph and add it to the MaterialX library
  5. The graph Editor is used to create a test file for the node
  6. This time, no Mix node, just connecting the new 3rd output to the surface node
  7. This is already failing in Graph Editor, as you see no shaderball is visible, and no shaders are ever compiled
  8. In Viewer a message that there is nothing to render pops up
  9. No massages are ever printed in the Graph Editor or Viewer consoles
Image Case 3
  1. Suspecting the Mixed 3rd output was the cause, I eliminated the other 2 outputs
  2. Same process as above to publish and test the nodedef
  3. But this works, so it's not the Mix output

Seems like a limit on the number of outputs. At one point, I got an error, but I couldn't reproduce it to capture it. The message was an out of range index somewhere. But I cannot guarantee it was the actual issue, as I was working with manual edits of the files in an attempt to figure things out.

In the Zip attached are 6 files. Three are the Maya published nodedefs to add to the library, and three are the test files for them.
test_multiple_output_graph.zip

(I tried this with the 1.39.3 tools, but there was an issue there that I manually fixed. But then I switched to 1.39.4 RC since that bug was fixed. The behavior is the same and I verified that bug if now a thing of the past.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions