Skip to content

Standard surface -> glTF PBR translations: sheen roughness inconsistency #2642

@bowald

Description

@bowald

Roughness is not translated properly from standard surface to glTF PBR using the translation graphs.

The issue seems to be that glTF PBR squares roughness before sheen_bsdf and translation graph do not handle that. Fix is coming in a PR.

Screenshots of a black material with a red sheen effect with sheen roughness 0.5

Image Image Image
Standard surface Translated to glTF PBR Diff

Test material

<?xml version="1.0"?>
<materialx version="1.39" colorspace="lin_rec709">
  <constant name="sheen_intensity2" type="float" xpos="-0.144928" ypos="-6.344828">
    <input name="value" type="float" value="1" />
  </constant>
  <constant name="sheen_color2" type="color3" xpos="0.246377" ypos="-4.982759">
    <input name="value" type="color3" value="1, 0, 0" />
  </constant>
  <constant name="sheen_roughness2" type="float" xpos="0.362319" ypos="-3.310345">
    <input name="value" type="float" value="0.5" />
  </constant>
  <gltf_pbr name="issue_material2" type="surfaceshader" xpos="11.565217" ypos="3.370690">
    <input name="base_color" type="color3" value="0, 0, 0" />
    <input name="sheen_color" type="color3" output="sheen_color_out" nodename="standard_surface_to_gltf_pbr" />
    <input name="sheen_roughness" type="float" output="sheen_roughness_out" nodename="standard_surface_to_gltf_pbr" />
    <input name="metallic" type="float" value="0" />
    <input name="specular_color" type="color3" value="1, 1, 1" />
    <input name="specular" type="float" value="0" />
  </gltf_pbr>
  <standard_surface name="standard_surface_surfaceshader2" type="surfaceshader" xpos="11.318841" ypos="-8.551724">
    <input name="base_color" type="color3" value="0, 0, 0" />
    <input name="specular_roughness" type="float" value="1" />
    <input name="sheen" type="float" output="out" nodename="sheen_intensity2" />
    <input name="sheen_roughness" type="float" output="out" nodename="sheen_roughness2" />
    <input name="sheen_color" type="color3" output="out" nodename="sheen_color2" />
    <input name="specular" type="float" value="0" />
  </standard_surface>
  <standard_surface_to_gltf_pbr name="standard_surface_to_gltf_pbr" type="multioutput" xpos="6.231884" ypos="-0.060345">
    <input name="sheen_roughness" type="float" nodename="sheen_roughness2" />
    <input name="sheen_color" type="color3" nodename="sheen_color2" />
    <input name="sheen" type="float" nodename="sheen_intensity2" />
  </standard_surface_to_gltf_pbr>
</materialx>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions