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

MaterialX: Support multi-output nodes in hdMtlx #1581

Closed
JGamache-autodesk opened this issue Aug 1, 2021 · 1 comment
Closed

MaterialX: Support multi-output nodes in hdMtlx #1581

JGamache-autodesk opened this issue Aug 1, 2021 · 1 comment

Comments

@JGamache-autodesk
Copy link
Contributor

Description of Issue

The code in _GatherUpstreamNodes() is missing support for multi-output nodes and will fail to connect them.

To detect:
Need to call isMultiOutputType on the Node. Nodes like artistic_ior should return true.

An example of using an artistic_ior node and connecting it can be found here. It calls low-level versions of the mx::Input interface to set the node name and output name. If you look at the implementations of mx::Input::setConnectedNode() and mx::Input::setConnectedOutput() you will see the same low-level calls.

The resulting MaterialX document should contain input elements that connect like usd_preview_surface:

      <input name="ior" type="color3" nodename="artistic_ior" output="ior" />

or possibliy like the dielectric Lama node:

      <input name="in2" type="float" nodename="artistic_ior" output="ior" channels="r" />

Steps to Reproduce

System Information (OS, Hardware)

Package Versions

Build Flags

@jilliene
Copy link

jilliene commented Aug 6, 2021

Filed as internal issue #USD-6820

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