Announcement

Collapse
No announcement yet.

Transmissive MaterialX shaders in USD Stage render Fully Opaque

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transmissive MaterialX shaders in USD Stage render Fully Opaque

    Hi! We have been testing the MaterialX rendering capabilities of V-Ray, especially in regard to MaterialX shaders referenced in USD files that are, in turn, referenced by 3ds Max as a USD stage.

    I've noticed that transmissive Standard Surface shaders seem to render fully opaque, no matter the values you use. Opacity seems to work as expected, though.

    Here's a rendering of the USD file with a MaterialX reference in V-Ray 7:

    Click image for larger version  Name:	mtlx_vray_test.png Views:	0 Size:	431.5 KB ID:	1227833

    The white material is supposed to be fully transmissive, yet it shows completely opaque:

    Code:
    <?xml version="1.0"?>
    <materialx version="1.38">
      <standard_surface name="material__7_Shader" type="surfaceshader" nodedef="ND_standard_surface_surfaceshader">
        <input name="base_color" type="color3" value="1, 1, 1" />
        <input name="specular_color" type="color3" value="0, 0, 0" />
        <input name="specular_roughness" type="float" value="0" />
        <input name="transmission" type="float" value="1" />
      </standard_surface>
      <surfacematerial name="MT_material__7" type="material" nodedef="ND_surfacematerial">
        <input name="surfaceshader" type="surfaceshader" nodename="material__7_Shader" />
      </surfacematerial>
    </materialx>
    ​
    My question is: are refractive MaterialX shaders currently not supported, or would I need to setup my MaterialX or USD files in a different way?

    I'm attaching the USD file with the MaterialX shaders for reference.
    Attached Files
    Last edited by dgg_joao; 25-02-2025, 09:13 AM.

  • #2
    Adding this in the shader description should resolve it:
    Code:
    <input name="transmission_color" type="color3" value="1, 1, 1" />
    Last edited by hermit.crab; 26-02-2025, 02:58 AM.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Thanks hermit.crab! That works as expected now.

      I'm curious though, that's the default value for Transmission Color in Standard Surface. In theory, we shouldn't need to provide default values for MaterialX documents.
      • Is this the expected behavior for V-Ray or is this something that will be changed at some point?
      • Is this something that we need to just for the Transmission Color or when trying to render MaterialX shaders with V-Ray would you recommend having the default values in the surface shader node for all parameters?
      Thanks in advance!

      Comment


      • #4
        Originally posted by dgg_joao View Post
        Is this the expected behavior for V-Ray or is this something that will be changed at some point?
        Based on what I've tested, only the transmission doesn't work as expected. I talked to the devs about it and they need to look at the MaterialX specifications to confirm whether we are using bad defaults or not. Otherwise, if you stumble on any other defaults not being applied, do share.

        Originally posted by dgg_joao View Post
        Is this something that we need to just for the Transmission Color or when trying to render MaterialX shaders with V-Ray would you recommend having the default values in the surface shader node for all parameters?
        When exporting a .mtlx from 3ds Max (via the MaterialX Import/Export tool), it seems to write everything - maybe this is the way to avoid issues such as this one.
        Aleksandar Hadzhiev | chaos.com
        Chaos Support Representative | contact us

        Comment

        Working...
        X