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

Fix multi output nodes #66

Merged
merged 3 commits into from
Jun 16, 2024
Merged

Fix multi output nodes #66

merged 3 commits into from
Jun 16, 2024

Conversation

RichardFrangenberg
Copy link
Member

fixes multioutput nodes like "separate".
fixes #34

@manuelkoester
Copy link
Member

I am still getting MaterialX validation warnings on this, but it does seem to work 🤔

image

<?xml version="1.0"?>
<materialx version="1.38">
  <nodegraph name="NG_main">
    <separate3 name="Separate3" type="multioutput" xpos="-10.946125018131086" ypos="-0.35007962180986196">
      <input name="in" type="color3" value="0, 0, 0" nodename="Constant" />
      <output name="outr" type="float" />
      <output name="outg" type="float" />
      <output name="outb" type="float" />
    </separate3>
    <constant name="Constant" type="color3" xpos="-13.843008149741326" ypos="-0.31585167668387043">
      <input name="value" type="color3" value="1, 0, 0.015686" />
      <output name="out" type="color3" />
    </constant>
    <combine3 name="Combine3" type="color3" xpos="-6.069929920631035" ypos="-0.3098670317401928">
      <input name="in1" type="float" value="0" output="outr" nodename="Separate3" />
      <input name="in2" type="float" value="0" output="outg" nodename="Separate3" />
      <input name="in3" type="float" value="0" output="outb" nodename="Separate3" />
      <output name="out" type="color3" />
    </combine3>
    <output name="output_Combine3_out" type="color3" nodename="Combine3" />
  </nodegraph>
  <surfacematerial name="USD_Default" type="material" xpos="2.2925" ypos="0.0">
    <input name="surfaceshader" type="surfaceshader" nodename="Standard_surface" />
    <output name="out" type="material" />
  </surfacematerial>
  <standard_surface name="Standard_surface" type="surfaceshader" xpos="-1.6725" ypos="0.0">
    <input name="base" type="float" value="1" />
    <input name="base_color" type="color3" value="1, 1, 1" nodegraph="NG_main" output="output_Combine3_out" />
    <input name="diffuse_roughness" type="float" value="0" />
    <input name="metalness" type="float" value="0.8" />
    <input name="specular" type="float" value="1" />
    <input name="specular_color" type="color3" value="1, 1, 1" />
    <input name="specular_roughness" type="float" value="0.1" />
    <input name="specular_IOR" type="float" value="1.5" />
    <input name="specular_anisotropy" type="float" value="0" />
    <input name="specular_rotation" type="float" value="0" />
    <input name="transmission" type="float" value="0" />
    <input name="transmission_color" type="color3" value="1, 1, 1" />
    <input name="transmission_depth" type="float" value="0" />
    <input name="transmission_scatter" type="color3" value="0, 0, 0" />
    <input name="transmission_scatter_anisotropy" type="float" value="0" />
    <input name="transmission_dispersion" type="float" value="0" />
    <input name="transmission_extra_roughness" type="float" value="0" />
    <input name="subsurface" type="float" value="0" />
    <input name="subsurface_color" type="color3" value="1, 1, 1" />
    <input name="subsurface_radius" type="color3" value="1, 1, 1" />
    <input name="subsurface_scale" type="float" value="1" />
    <input name="subsurface_anisotropy" type="float" value="0" />
    <input name="sheen" type="float" value="0" />
    <input name="sheen_color" type="color3" value="1, 1, 1" />
    <input name="sheen_roughness" type="float" value="0.3" />
    <input name="coat" type="float" value="1" />
    <input name="coat_color" type="color3" value="0.6, 0.45, 1" />
    <input name="coat_roughness" type="float" value="0.1" />
    <input name="coat_anisotropy" type="float" value="0" />
    <input name="coat_rotation" type="float" value="0" />
    <input name="coat_IOR" type="float" value="2.5" />
    <input name="coat_affect_color" type="float" value="0" />
    <input name="coat_affect_roughness" type="float" value="0" />
    <input name="thin_film_thickness" type="float" value="0" />
    <input name="thin_film_IOR" type="float" value="1.5" />
    <input name="emission" type="float" value="0" />
    <input name="emission_color" type="color3" value="1, 1, 1" />
    <input name="opacity" type="color3" value="1, 1, 1" />
    <input name="thin_walled" type="boolean" value="false" />
    <output name="out" type="surfaceshader" />
  </standard_surface>
</materialx>

Is this a problem on our side or MaterialX?

@manuelkoester
Copy link
Member

Is this a problem on our side or MaterialX?

Seems to be a MaterialX thing. Let's ping Bernard if he could raise this internally. Will merge

@manuelkoester manuelkoester merged commit 0336284 into main Jun 16, 2024
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

Successfully merging this pull request may close these issues.

Connections between nodes with multiple outputs ("multioutput") are not correctly handled
2 participants