AcademySoftwareFoundation / MaterialX

MaterialX is an open standard for the exchange of rich material and look-development content across applications and renderers.
http://www.materialx.org/
Apache License 2.0
1.84k stars 350 forks source link

Graph Editor: Displacement is not displayed? #1458

Open marwie opened 1 year ago

marwie commented 1 year ago

Is displacement not supported yet in the Graph Editor?

image

<?xml version="1.0"?>
<materialx version="1.38">
  <surfacematerial name="surfacematerial" type="material" xpos="1.695652" ypos="3.663793">
    <input name="surfaceshader" type="surfaceshader" nodename="standard_surface_surfaceshader" />
    <input name="displacementshader" type="displacementshader" nodename="displacement_vector3" />
  </surfacematerial>
  <displacement name="displacement_vector3" type="displacementshader" xpos="-0.297101" ypos="3.939655">
    <input name="scale" type="float" value="1" />
    <input name="displacement" type="vector3" value="1.8, 2.5, 1.6" />
  </displacement>
  <standard_surface name="standard_surface_surfaceshader" type="surfaceshader" xpos="-1.028986" ypos="2.560345" />
</materialx>

I tried using it with a noise as well image

jstone-lucasfilm commented 1 year ago

@marwie This is a good observation, and the main issue is that our shader generators for real-time languages such as GLSL and MSL don't yet have a good approximation for surface displacement. One recent proposal has been to apply surface displacement through vertex shading, which would give a coarse approximation of these effects in GLSL and MSL, but so far this is just a proposal and has not yet been implemented in our default shader generators.