I have a materialx file that mixes two open_pbr_surfaces:

<?xml version="1.0"?>
<materialx version="1.39">
  <open_pbr_surface name="surface1" type="surfaceshader">
    <input name="base_color" type="color3" value="0, 1, 0" />
  </open_pbr_surface>
  <open_pbr_surface name="surface2" type="surfaceshader">
    <input name="base_color" type="color3" value="0, 0.5, 1" />
  </open_pbr_surface>
  <mix name="out_surface" type="surfaceshader">
    <input name="fg" type="surfaceshader" nodename="surface1" />
    <input name="bg" type="surfaceshader" nodename="surface2" />
    <input name="mix" type="float" value="0.5" />
  </mix>
  <surfacematerial name="mixed_material" type="material">
    <input name="surfaceshader" type="surfaceshader" nodename="out_surface" />
  </surfacematerial>
</materialx>


When I try to load that materialx file using the reference node, I get the following warnings and the material doesn't work:
Shader not found at </MaterialX/Materials/mixed_material/NodeGraphs/surface1> for input "fg"
Shader not found at </MaterialX/Materials/mixed_material/NodeGraphs/surface2> for input "bg"

However, if I create my materialx material directly in Houdini, then I am able to mix surfaceshader types no problem.



Can anyone point out to me what I'm doing wrong? Thanks in advance!