You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a file has a nodegraph definition included in the file it is loaded in and is editable.
This can be "dangerous" as the graph implements a definition so it can cause instances to mismatch with the definition.
Here is the reference OpenPBR implementation that has the definition included which folks are using to test this new shading model.
Embedding definitions with instances is also one possible suggested MaterialX mechanism to use custom definitions.
( Note that this renders properly with OpenUSD HDStorm delegate )
<?xml version="1.0"?>
<materialxversion="1.38">
<!-- OpenPBR Surface node definition-->
<nodedefname="ND_open_pbr_surface_surfaceshader"node="open_pbr_surface"nodegroup="pbr"version="0.2"isdefaultversion="true"doc="OpenPBR Surface Shading Model">
<inputname="base_weight"type="float"value="1.0"uimin="0.0"uimax="1.0"uiname="Base Weight"uifolder="Base"doc="Multiplier on the intensity of the reflection from the diffuse and metallic base." />
<inputname="base_color"type="color3"value="0.8, 0.8, 0.8"uimin="0,0,0"uimax="1,1,1"uiname="Base Color"uifolder="Base"doc="Color of the reflection from the diffuse and metallic base." />
<inputname="base_roughness"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Base Roughness"uifolder="Base"uiadvanced="true"doc="Roughness of the diffuse reflection. Higher values cause the surface to appear flatter." />
<inputname="base_metalness"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Base Metalness"uifolder="Base"doc="Specifies how metallic the base material appears (dials the base from pure dielectric to pure metal)." />
<inputname="specular_weight"type="float"value="1.0"uimin="0.0"uimax="1.0"uiname="Specular Weight"uifolder="Specular"doc="Multiplier on the intensity of the specular reflection." />
<inputname="specular_color"type="color3"value="1, 1, 1"uimin="0,0,0"uimax="1,1,1"uiname="Specular Color"uifolder="Specular"doc="Color of the specular reflection (controls the physical edge-tint for metals, and a non-physical overall tint for dielectrics)." />
<inputname="specular_roughness"type="float"value="0.3"uimin="0.0"uimax="1.0"uiname="Specular Roughness"uifolder="Specular"doc="The roughness of the specular reflection. Lower numbers produce sharper reflections, higher numbers produce blurrier reflections." />
<inputname="specular_ior"type="float"value="1.5"uimin="0.0"uisoftmin="1.0"uisoftmax="3.0"uiname="Specular Index of Refraction"uifolder="Specular"doc="Index of refraction of the dielectric base." />
<inputname="specular_ior_level"type="float"value="0.5"uimin="0.0"uimax="1.0"uiname="Specular IOR Level"uifolder="Specular"doc="Modulates the dielectric reflectivity at normal incidence between zero and double the original." />
<inputname="specular_anisotropy"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Specular Anisotropy"uifolder="Specular"uiadvanced="true"doc="The directional bias of the roughness of the metal/dielectric base, resulting in increasingly stretched highlights along the tangent direction." />
<inputname="specular_rotation"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Specular Rotation"uifolder="Specular"uiadvanced="true"doc="Rotation of the axis of specular roughness anisotropy around the surface normal." />
<inputname="transmission_weight"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Transmission Weight"uifolder="Transmission"uiadvanced="true"doc="Mixture weight between the transparent and opaque dielectric base. The greater the value the more transparent the material." />
<inputname="transmission_color"type="color3"value="1, 1, 1"uimin="0,0,0"uimax="1,1,1"uiname="Transmission Color"uifolder="Transmission"uiadvanced="true"doc="Controls color of the transparent base due to Beer's law volumetric absorption under the surface (reverts to a non-physical tint when transmission_depth is zero)." />
<inputname="transmission_depth"type="float"value="0.0"uimin="0.0"uisoftmax="1.0"uiname="Transmission Depth"uifolder="Transmission"uiadvanced="true"doc="Specifies the distance light travels inside the transparent base before it becomes exactly the transmission_color according to Beer's law." />
<inputname="transmission_scatter"type="color3"value="0, 0, 0"uimin="0,0,0"uimax="1,1,1"uiname="Transmission Scatter"uifolder="Transmission"uiadvanced="true"doc="Controls the color of light volumetrically scattered inside the transparent base. Suitable for materials with visually significant scattering such as honey, fruit juice, murky water, opalescent glass, or milky glass." />
<inputname="transmission_scatter_anisotropy"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Transmission Anisotropy"uifolder="Transmission"uiadvanced="true"doc="The amount of directional bias, or anisotropy, of the volumetric scattering in the transparent base." />
<inputname="transmission_dispersion"type="float"value="0.0"uimin="0.0"uisoftmax="100.0"uiname="Transmission Dispersion"uifolder="Transmission"uiadvanced="true"doc="Dispersion amount, describing how much the dielectric index of refraction varies across wavelengths." />
<inputname="subsurface_weight"type="float"value="0"uimin="0.0"uimax="1.0"uiname="Subsurface"uifolder="Subsurface Weight"uiadvanced="true"doc="Mixture weight which dials the opaque dielectric base between diffuse reflection and subsurface scattering. A value of 1.0 indicates full subsurface scattering and a value 0 for diffuse reflection only." />
<inputname="subsurface_color"type="color3"value="0.8, 0.8, 0.8"uimin="0,0,0"uimax="1,1,1"uiname="Subsurface Color"uifolder="Subsurface"uiadvanced="true"doc="The overall reflected color of the subsurface scattering effect." />
<inputname="subsurface_radius"type="float"value="1.0"uimin="0.0"uisoftmax="1.0"uiname="Subsurface Radius"uifolder="Subsurface"uiadvanced="true"doc="Length scale of the subsurface diffusion blur profile on the surface." />
<inputname="subsurface_radius_scale"type="color3"value="1.0, 0.5, 0.25"uimin="0,0,0"uimax="1,1,1"uiname="Subsurface Radius Scale"uifolder="Subsurface"uiadvanced="true"doc="RGB multiplier to subsurface_radius, giving the per-channel diffusion blur profile size." />
<inputname="subsurface_anisotropy"type="float"value="0.0"uimin="-1.0"uimax="1.0"uiname="Subsurface Anisotropy"uifolder="Subsurface"uiadvanced="true"doc="Controls the phase-function of subsurface scattering, where zero scatters light evenly, positive values scatter forward, and negative values scatter backward." />
<inputname="fuzz_weight"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Fuzz Weight"uifolder="Fuzz"uiadvanced="true"doc="The weight of a fuzz layer that can be used to approximate microfibers, for fabrics such as velvet and satin as well as dust grains." />
<inputname="fuzz_color"type="color3"value="1, 1, 1"uimin="0,0,0"uimax="1,1,1"uiname="Fuzz Color"uifolder="Fuzz"uiadvanced="true"doc="The color of the fuzz layer." />
<inputname="fuzz_roughness"type="float"value="0.5"uimin="0.0"uimax="1.0"uiname="Fuzz Roughness"uifolder="Fuzz"uiadvanced="true"doc="The roughness of the fuzz layer." />
<inputname="coat_weight"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Coat Weight"uifolder="Coat"doc="The weight of a reflective clear-coat layer on top of the material. Use for materials such as car paint or an oily layer." />
<inputname="coat_color"type="color3"value="1, 1, 1"uimin="0,0,0"uimax="1,1,1"uiname="Coat Color"uifolder="Coat"doc="The color of the clear-coat layer's transparency, due to absorption in the coat." />
<inputname="coat_roughness"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Coat Roughness"uifolder="Coat"doc="The roughness of the clear-coat reflections. The lower the value, the sharper the reflection." />
<inputname="coat_anisotropy"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Coat Anisotropy"uifolder="Coat"uiadvanced="true"doc="The directional bias of the roughness of the clear-coat layer, resulting in increasingly stretched highlights along the coat tangent direction." />
<inputname="coat_rotation"type="float"value="0.0"uimin="0.0"uimax="1.0"uiname="Coat Rotation"uifolder="Coat"uiadvanced="true"doc="Rotation of the axis of clear-coat roughness anisotropy around the coat normal." />
<inputname="coat_ior"type="float"value="1.6"uimin="0.0"uisoftmin="1.0"uisoftmax="3.0"uiname="Coat Index of Refraction"uifolder="Coat"doc="The index of refraction of the clear-coat layer." />
<inputname="coat_ior_level"type="float"value="0.5"uimin="0.0"uimax="1.0"uiname="Coat IOR Level"uifolder="Specular"doc="Modulates the clear-coat reflectivity at normal incidence between zero and double the original." />
<inputname="thin_film_thickness"type="float"value="0"uimin="0.0"uisoftmax="2000.0"uiname="Thin Film Thickness"uifolder="Thin Film"uiadvanced="true"doc="The thickness of the thin film layer on the base (in nanometers). Use for materials such as multi-tone car paint or soap bubbles." />
<inputname="thin_film_ior"type="float"value="1.5"uimin="0.0"uisoftmin="1.0"uisoftmax="3.0"uiname="Thin Film Index of Refraction"uifolder="Thin Film"uiadvanced="true"doc="The index of refraction of the thin-film." />
<inputname="emission_luminance"type="float"value="0.0"uimin="0.0"uisoftmax="1000.0"uiname="Emission Luminance"uifolder="Emission"doc="The amount of emitted light, as a luminance in nits." />
<inputname="emission_color"type="color3"value="1, 1, 1"uimin="0,0,0"uimax="1,1,1"uiname="Emission Color"uifolder="Emission"doc="The color of the emitted light." />
<inputname="geometry_opacity"type="color3"value="1, 1, 1"uimin="0,0,0"uimax="1,1,1"uiname="Opacity"uifolder="Geometry"doc="The opacity of the entire material." />
<inputname="geometry_thin_walled"type="boolean"value="false"uiname="Thin Walled"uifolder="Geometry"uiadvanced="true"doc="If true the surface is double-sided and represents an infinitesimally thin shell. Suitable for extremely geometrically thin objects such as leaves or paper." />
<inputname="geometry_normal"type="vector3"defaultgeomprop="Nworld"uiname="Normal"uifolder="Geometry"doc="Input geometric normal" />
<inputname="geometry_coat_normal"type="vector3"defaultgeomprop="Nworld"uiname="Coat Normal"uifolder="Geometry"doc="Input normal for clear-coat layer" />
<inputname="geometry_tangent"type="vector3"defaultgeomprop="Tworld"uiname="Tangent Input"uifolder="Geometry"doc="Input geometric tangent" />
<outputname="out"type="surfaceshader" />
</nodedef>
<!-- OpenPBR Surface graph definition-->
<nodegraphname="NG_open_pbr_surface_surfaceshader"nodedef="ND_open_pbr_surface_surfaceshader">
<!-- Roughness influence by coat--><!-- Calculate main specular roughness -->
<multiplyname="coat_affect_roughness_multiply1"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"interfacename="coat_weight" />
</multiply>
<multiplyname="coat_affect_roughness_multiply2"type="float">
<inputname="in1"type="float"nodename="coat_affect_roughness_multiply1" />
<inputname="in2"type="float"interfacename="coat_roughness" />
</multiply>
<mixname="coat_affected_roughness"type="float">
<inputname="fg"type="float"value="1.0" />
<inputname="bg"type="float"interfacename="specular_roughness" />
<inputname="mix"type="float"nodename="coat_affect_roughness_multiply2" />
</mix>
<roughness_anisotropyname="main_roughness"type="vector2">
<inputname="roughness"type="float"nodename="coat_affected_roughness" />
<inputname="anisotropy"type="float"interfacename="specular_anisotropy" />
</roughness_anisotropy>
<!-- Calculate transmission roughness -->
<clampname="transmission_roughness_clamped"type="float">
<inputname="in"type="float"interfacename="specular_roughness" />
</clamp>
<mixname="coat_affected_transmission_roughness"type="float">
<inputname="fg"type="float"value="1.0" />
<inputname="bg"type="float"nodename="transmission_roughness_clamped" />
<inputname="mix"type="float"nodename="coat_affect_roughness_multiply2" />
</mix>
<roughness_anisotropyname="transmission_roughness"type="vector2">
<inputname="roughness"type="float"nodename="coat_affected_transmission_roughness" />
<inputname="anisotropy"type="float"interfacename="specular_anisotropy" />
</roughness_anisotropy>
<!-- Tangent rotation -->
<multiplyname="tangent_rotate_degree"type="float">
<inputname="in1"type="float"interfacename="specular_rotation" />
<inputname="in2"type="float"value="360" />
</multiply>
<rotate3dname="tangent_rotate"type="vector3">
<inputname="in"type="vector3"interfacename="geometry_tangent" />
<inputname="amount"type="float"nodename="tangent_rotate_degree" />
<inputname="axis"type="vector3"interfacename="geometry_normal" />
</rotate3d>
<normalizename="tangent_rotate_normalize"type="vector3">
<inputname="in"type="vector3"nodename="tangent_rotate" />
</normalize>
<ifgreatername="main_tangent"type="vector3">
<inputname="value1"type="float"interfacename="specular_anisotropy" />
<inputname="value2"type="float"value="0.0" />
<inputname="in1"type="vector3"nodename="tangent_rotate_normalize" />
<inputname="in2"type="vector3"interfacename="geometry_tangent" />
</ifgreater>
<!-- Coat tangent rotation -->
<multiplyname="coat_tangent_rotate_degree"type="float">
<inputname="in1"type="float"interfacename="coat_rotation" />
<inputname="in2"type="float"value="360" />
</multiply>
<rotate3dname="coat_tangent_rotate"type="vector3">
<inputname="in"type="vector3"interfacename="geometry_tangent" />
<inputname="amount"type="float"nodename="coat_tangent_rotate_degree" />
<inputname="axis"type="vector3"interfacename="geometry_coat_normal" />
</rotate3d>
<normalizename="coat_tangent_rotate_normalize"type="vector3">
<inputname="in"type="vector3"nodename="coat_tangent_rotate" />
</normalize>
<ifgreatername="coat_tangent"type="vector3">
<inputname="value1"type="float"interfacename="coat_anisotropy" />
<inputname="value2"type="float"value="0.0" />
<inputname="in1"type="vector3"nodename="coat_tangent_rotate_normalize" />
<inputname="in2"type="vector3"interfacename="geometry_tangent" />
</ifgreater>
<!-- Subsurface (thin-walled) -->
<maxname="subsurface_color_nonnegative"type="color3">
<inputname="in1"type="color3"interfacename="subsurface_color" />
<inputname="in2"type="float"value="0.0" />
</max>
<oren_nayar_diffuse_bsdfname="subsurface_thin_walled_reflection_bsdf"type="BSDF">
<inputname="weight"type="float"value="1.0" />
<inputname="color"type="color3"nodename="subsurface_color_nonnegative" />
<inputname="roughness"type="float"interfacename="base_roughness" />
<inputname="normal"type="vector3"interfacename="geometry_normal" />
</oren_nayar_diffuse_bsdf>
<subtractname="one_minus_subsurface_anisotropy"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"interfacename="subsurface_anisotropy" />
</subtract>
<multiplyname="subsurface_thin_walled_brdf_factor"type="color3">
<inputname="in1"type="color3"interfacename="subsurface_color" />
<inputname="in2"type="float"nodename="one_minus_subsurface_anisotropy" />
</multiply>
<multiplyname="subsurface_thin_walled_reflection"type="BSDF">
<inputname="in1"type="BSDF"nodename="subsurface_thin_walled_reflection_bsdf" />
<inputname="in2"type="color3"nodename="subsurface_thin_walled_brdf_factor" />
</multiply>
<translucent_bsdfname="subsurface_thin_walled_transmission_bsdf"type="BSDF">
<inputname="weight"type="float"value="1.0" />
<inputname="color"type="color3"nodename="subsurface_color_nonnegative" />
<inputname="normal"type="vector3"interfacename="geometry_normal" />
</translucent_bsdf>
<addname="one_plus_subsurface_anisotropy"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"interfacename="subsurface_anisotropy" />
</add>
<multiplyname="subsurface_thin_walled_btdf_factor"type="color3">
<inputname="in1"type="color3"interfacename="subsurface_color" />
<inputname="in2"type="float"nodename="one_plus_subsurface_anisotropy" />
</multiply>
<multiplyname="subsurface_thin_walled_transmission"type="BSDF">
<inputname="in1"type="BSDF"nodename="subsurface_thin_walled_transmission_bsdf" />
<inputname="in2"type="color3"nodename="subsurface_thin_walled_btdf_factor" />
</multiply>
<mixname="subsurface_thin_walled"type="BSDF">
<inputname="fg"type="BSDF"nodename="subsurface_thin_walled_reflection" />
<inputname="bg"type="BSDF"nodename="subsurface_thin_walled_transmission" />
<inputname="mix"type="float"value="0.5" />
</mix>
<!-- Subsurface (non-thin-walled) -->
<convertname="subsurface_radius_vector"type="vector3">
<inputname="in"type="color3"interfacename="subsurface_radius_scale" />
</convert>
<multiplyname="subsurface_radius_scaled"type="vector3">
<inputname="in1"type="vector3"nodename="subsurface_radius_vector" />
<inputname="in2"type="float"interfacename="subsurface_radius" />
</multiply>
<subsurface_bsdfname="subsurface_bsdf"type="BSDF">
<inputname="weight"type="float"value="1.0" />
<inputname="color"type="color3"nodename="subsurface_color_nonnegative" />
<inputname="radius"type="vector3"nodename="subsurface_radius_scaled" />
<inputname="anisotropy"type="float"interfacename="subsurface_anisotropy" />
<inputname="normal"type="vector3"interfacename="geometry_normal" />
</subsurface_bsdf>
<!-- Opaque Dielectric Base -->
<maxname="base_color_nonnegative"type="color3">
<inputname="in1"type="color3"interfacename="base_color" />
<inputname="in2"type="float"value="0.0" />
</max>
<oren_nayar_diffuse_bsdfname="diffuse_bsdf"type="BSDF">
<inputname="weight"type="float"interfacename="base_weight" />
<inputname="color"type="color3"nodename="base_color_nonnegative" />
<inputname="roughness"type="float"interfacename="base_roughness" />
<inputname="normal"type="vector3"interfacename="geometry_normal" />
</oren_nayar_diffuse_bsdf>
<convertname="subsurface_selector"type="float">
<inputname="in"type="boolean"interfacename="geometry_thin_walled" />
</convert>
<mixname="selected_subsurface"type="BSDF">
<inputname="fg"type="BSDF"nodename="subsurface_thin_walled" />
<inputname="bg"type="BSDF"nodename="subsurface_bsdf" />
<inputname="mix"type="float"nodename="subsurface_selector" />
</mix>
<mixname="opaque_base"type="BSDF">
<inputname="fg"type="BSDF"nodename="selected_subsurface" />
<inputname="bg"type="BSDF"nodename="diffuse_bsdf" />
<inputname="mix"type="float"interfacename="subsurface_weight" />
</mix>
<!-- Dielectric Base -->
<dividename="specular_to_coat_ior_ratio"type="float">
<inputname="in1"type="float"interfacename="specular_ior" />
<inputname="in2"type="float"nodename="modulated_coat_ior" />
</divide>
<subtractname="specular_ior_minus_one"type="float">
<inputname="in1"type="float"nodename="specular_to_coat_ior_ratio" />
<inputname="in2"type="float"value="1.0" />
</subtract>
<addname="specular_ior_plus_one"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"nodename="specular_to_coat_ior_ratio" />
</add>
<dividename="specular_ior_to_F0_sqrt"type="float">
<inputname="in1"type="float"nodename="specular_ior_minus_one" />
<inputname="in2"type="float"nodename="specular_ior_plus_one" />
</divide>
<multiplyname="specular_ior_to_F0"type="float">
<inputname="in1"type="float"nodename="specular_ior_to_F0_sqrt" />
<inputname="in2"type="float"nodename="specular_ior_to_F0_sqrt" />
</multiply>
<dividename="half_over_specular_F0"type="float">
<inputname="in1"type="float"value="0.5" />
<inputname="in2"type="float"nodename="specular_ior_to_F0" />
</divide>
<minname="specular_ior_level_upper_bound"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"nodename="half_over_specular_F0" />
</min>
<clampname="specular_ior_level_clamped"type="float">
<inputname="in"type="float"interfacename="specular_ior_level" />
<inputname="low"type="float"value="0.0" />
<inputname="high"type="float"nodename="specular_ior_level_upper_bound" />
</clamp>
<multiplyname="modulated_specular_reflectivity1"type="float">
<inputname="in1"type="float"nodename="specular_ior_level_clamped" />
<inputname="in2"type="float"nodename="specular_ior_to_F0" />
</multiply>
<multiplyname="modulated_specular_reflectivity2"type="float">
<inputname="in1"type="float"value="2.0" />
<inputname="in2"type="float"nodename="modulated_specular_reflectivity1" />
</multiply>
<sqrtname="sqrt_modulated_specular_reflectivity"type="float">
<inputname="in"type="float"nodename="modulated_specular_reflectivity2" />
</sqrt>
<signname="sign_specular_ior_minus_one"type="float">
<inputname="in"type="float"nodename="specular_ior_minus_one" />
</sign>
<multiplyname="modulated_specular_reflectivity3"type="float">
<inputname="in1"type="float"nodename="sign_specular_ior_minus_one" />
<inputname="in2"type="float"nodename="sqrt_modulated_specular_reflectivity" />
</multiply>
<subtractname="one_minus_modulated_specular_reflectivity3"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"nodename="modulated_specular_reflectivity3" />
</subtract>
<addname="one_plus_modulated_specular_reflectivity3"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"nodename="modulated_specular_reflectivity3" />
</add>
<dividename="modulated_specular_ior_ratio"type="float">
<inputname="in1"type="float"nodename="one_plus_modulated_specular_reflectivity3" />
<inputname="in2"type="float"nodename="one_minus_modulated_specular_reflectivity3" />
</divide>
<dielectric_bsdfname="dielectric_transmission"type="BSDF">
<inputname="weight"type="float"value="1.0" />
<inputname="tint"type="color3"interfacename="transmission_color" />
<inputname="ior"type="float"nodename="modulated_specular_ior_ratio" />
<inputname="roughness"type="vector2"nodename="transmission_roughness" />
<inputname="normal"type="vector3"interfacename="geometry_normal" />
<inputname="tangent"type="vector3"nodename="main_tangent" />
<inputname="distribution"type="string"value="ggx" />
<inputname="scatter_mode"type="string"value="T" />
</dielectric_bsdf>
<mixname="dielectric_substrate"type="BSDF">
<inputname="fg"type="BSDF"nodename="dielectric_transmission" />
<inputname="bg"type="BSDF"nodename="opaque_base" />
<inputname="mix"type="float"interfacename="transmission_weight" />
</mix>
<dielectric_bsdfname="dielectric_reflection"type="BSDF">
<inputname="weight"type="float"interfacename="specular_weight" />
<inputname="tint"type="color3"interfacename="specular_color" />
<inputname="ior"type="float"nodename="modulated_specular_ior_ratio" />
<inputname="roughness"type="vector2"nodename="main_roughness" />
<inputname="normal"type="vector3"interfacename="geometry_normal" />
<inputname="tangent"type="vector3"nodename="main_tangent" />
<inputname="distribution"type="string"value="ggx" />
<inputname="scatter_mode"type="string"value="R" />
</dielectric_bsdf>
<layername="dielectric_base"type="BSDF">
<inputname="top"type="BSDF"nodename="dielectric_reflection" />
<inputname="base"type="BSDF"nodename="dielectric_substrate" />
</layer>
<!-- Metal Layer -->
<multiplyname="metal_reflectivity"type="color3">
<inputname="in1"type="color3"interfacename="base_color" />
<inputname="in2"type="float"interfacename="base_weight" />
</multiply>
<multiplyname="metal_edgecolor"type="color3">
<inputname="in1"type="color3"interfacename="specular_color" />
<inputname="in2"type="float"interfacename="specular_weight" />
</multiply>
<!-- TODO: Add support for a color82 input in generalized_schlick_bsdf -->
<generalized_schlick_bsdfname="metal_bsdf"type="BSDF">
<inputname="weight"type="float"value="1.0" />
<inputname="color0"type="color3"nodename="metal_reflectivity" />
<inputname="color90"type="color3"nodename="metal_edgecolor" />
<inputname="roughness"type="vector2"nodename="main_roughness" />
<inputname="normal"type="vector3"interfacename="geometry_normal" />
<inputname="tangent"type="vector3"nodename="main_tangent" />
</generalized_schlick_bsdf>
<mixname="base_substrate"type="BSDF">
<inputname="fg"type="BSDF"nodename="metal_bsdf" />
<inputname="bg"type="BSDF"nodename="dielectric_base" />
<inputname="mix"type="float"interfacename="base_metalness" />
</mix>
<!-- Thin-film Layer -->
<thin_film_bsdfname="thin_film_bsdf"type="BSDF">
<inputname="thickness"type="float"interfacename="thin_film_thickness" />
<inputname="ior"type="float"interfacename="thin_film_ior" />
</thin_film_bsdf>
<layername="thin_film_layer"type="BSDF">
<inputname="top"type="BSDF"nodename="thin_film_bsdf" />
<inputname="base"type="BSDF"nodename="base_substrate" />
</layer>
<!-- Coat Layer -->
<dividename="half_over_coat_F0"type="float">
<inputname="in1"type="float"value="0.5" />
<inputname="in2"type="float"nodename="coat_ior_to_F0" />
</divide>
<minname="coat_ior_level_upper_bound"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"nodename="half_over_coat_F0" />
</min>
<clampname="coat_ior_level_clamped"type="float">
<inputname="in"type="float"interfacename="coat_ior_level" />
<inputname="low"type="float"value="0.0" />
<inputname="high"type="float"nodename="coat_ior_level_upper_bound" />
</clamp>
<multiplyname="modulated_coat_reflectivity1"type="float">
<inputname="in1"type="float"nodename="coat_ior_level_clamped" />
<inputname="in2"type="float"nodename="coat_ior_to_F0" />
</multiply>
<multiplyname="modulated_coat_reflectivity2"type="float">
<inputname="in1"type="float"value="2.0" />
<inputname="in2"type="float"nodename="modulated_coat_reflectivity1" />
</multiply>
<sqrtname="sqrt_modulated_coat_reflectivity"type="float">
<inputname="in"type="float"nodename="modulated_coat_reflectivity2" />
</sqrt>
<subtractname="one_minus_sqrt_modulated_coat_reflectivity"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"nodename="sqrt_modulated_coat_reflectivity" />
</subtract>
<addname="one_plus_sqrt_modulated_coat_reflectivity"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"nodename="sqrt_modulated_coat_reflectivity" />
</add>
<dividename="modulated_coat_ior_ratio"type="float">
<inputname="in1"type="float"nodename="one_plus_sqrt_modulated_coat_reflectivity" />
<inputname="in2"type="float"nodename="one_minus_sqrt_modulated_coat_reflectivity" />
</divide>
<mixname="modulated_coat_ior"type="float">
<inputname="fg"type="float"nodename="modulated_coat_ior_ratio" />
<inputname="bg"type="float"value="1.0" />
<inputname="mix"type="float"interfacename="coat_weight" />
</mix>
<mixname="coat_attenuation"type="color3">
<inputname="fg"type="color3"interfacename="coat_color" />
<inputname="bg"type="color3"value="1.0, 1.0, 1.0" />
<inputname="mix"type="float"interfacename="coat_weight" />
</mix>
<multiplyname="coat_substrate_attenuated"type="BSDF">
<inputname="in1"type="BSDF"nodename="thin_film_layer" />
<inputname="in2"type="color3"nodename="coat_attenuation" />
</multiply>
<roughness_anisotropyname="coat_roughness_vector"type="vector2">
<inputname="roughness"type="float"interfacename="coat_roughness" />
<inputname="anisotropy"type="float"interfacename="coat_anisotropy" />
</roughness_anisotropy>
<dielectric_bsdfname="coat_bsdf"type="BSDF">
<inputname="weight"type="float"interfacename="coat_weight" />
<inputname="tint"type="color3"value="1.0, 1.0, 1.0" />
<inputname="ior"type="float"nodename="modulated_coat_ior" />
<inputname="roughness"type="vector2"nodename="coat_roughness_vector" />
<inputname="normal"type="vector3"interfacename="geometry_coat_normal" />
<inputname="tangent"type="vector3"nodename="coat_tangent" />
<inputname="distribution"type="string"value="ggx" />
<inputname="scatter_mode"type="string"value="R" />
</dielectric_bsdf>
<layername="coat_layer"type="BSDF">
<inputname="top"type="BSDF"nodename="coat_bsdf" />
<inputname="base"type="BSDF"nodename="coat_substrate_attenuated" />
</layer>
<!-- Fuzz Layer --><!-- TODO: Add a new BSDF node for the selected fuzz model in OpenPBR -->
<sheen_bsdfname="fuzz_bsdf"type="BSDF">
<inputname="weight"type="float"interfacename="fuzz_weight" />
<inputname="color"type="color3"interfacename="fuzz_color" />
<inputname="roughness"type="float"interfacename="fuzz_roughness" />
<inputname="normal"type="vector3"interfacename="geometry_normal" />
</sheen_bsdf>
<layername="fuzz_layer"type="BSDF">
<inputname="top"type="BSDF"nodename="fuzz_bsdf" />
<inputname="base"type="BSDF"nodename="coat_layer" />
</layer>
<!-- Emission Layer -->
<subtractname="coat_ior_minus_one"type="float">
<inputname="in1"type="float"interfacename="coat_ior" />
<inputname="in2"type="float"value="1.0" />
</subtract>
<addname="coat_ior_plus_one"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"interfacename="coat_ior" />
</add>
<dividename="coat_ior_to_F0_sqrt"type="float">
<inputname="in1"type="float"nodename="coat_ior_minus_one" />
<inputname="in2"type="float"nodename="coat_ior_plus_one" />
</divide>
<multiplyname="coat_ior_to_F0"type="float">
<inputname="in1"type="float"nodename="coat_ior_to_F0_sqrt" />
<inputname="in2"type="float"nodename="coat_ior_to_F0_sqrt" />
</multiply>
<multiplyname="emission_weight"type="color3">
<inputname="in1"type="color3"interfacename="emission_color" />
<inputname="in2"type="float"interfacename="emission_luminance" />
</multiply>
<uniform_edfname="uncoated_emission_edf"type="EDF">
<inputname="color"type="color3"nodename="emission_weight" />
</uniform_edf>
<multiplyname="coat_tinted_emission_edf"type="EDF">
<inputname="in1"type="EDF"nodename="uncoated_emission_edf" />
<inputname="in2"type="color3"interfacename="coat_color" />
</multiply>
<subtractname="one_minus_coat_F0"type="float">
<inputname="in1"type="float"value="1.0" />
<inputname="in2"type="float"nodename="coat_ior_to_F0" />
</subtract>
<generalized_schlick_edfname="coated_emission_edf"type="EDF">
<inputname="color0"type="color3"nodename="one_minus_coat_F0"channels="rrr" />
<inputname="color90"type="color3"value="0.0, 0.0, 0.0" />
<inputname="exponent"type="float"value="5.0" />
<inputname="base"type="EDF"nodename="coat_tinted_emission_edf" />
</generalized_schlick_edf>
<mixname="emission_edf"type="EDF">
<inputname="fg"type="EDF"nodename="coated_emission_edf" />
<inputname="bg"type="EDF"nodename="uncoated_emission_edf" />
<inputname="mix"type="float"interfacename="coat_weight" />
</mix>
<!-- Surface construction with opacity --><!-- Node <surface> only supports monochromatic opacity so use the luminance of input opacity color -->
<luminancename="opacity_luminance"type="color3">
<inputname="in"type="color3"interfacename="geometry_opacity" />
</luminance>
<surfacename="shader_constructor"type="surfaceshader">
<inputname="bsdf"type="BSDF"nodename="fuzz_layer" />
<inputname="edf"type="EDF"nodename="emission_edf" />
<inputname="opacity"type="float"nodename="opacity_luminance"channels="r" />
</surface>
<!-- Output -->
<outputname="out"type="surfaceshader"nodename="shader_constructor" />
</nodegraph>
<!-- OpenPBR Display Material-->
<surfacematerialname="Default"type="material">
<inputname="surfaceshader"type="surfaceshader"nodename="open_pbr_surface_surfaceshader" />
<inputname="displacementshader"type="displacementshader"value="" />
</surfacematerial>
<open_pbr_surfacename="open_pbr_surface_surfaceshader"type="surfaceshader">
<inputname="base_weight"type="float"value="1.0" />
<inputname="base_color"type="color3"value="0.8, 0.8, 0.8" />
<inputname="base_roughness"type="float"value="0.0" />
<inputname="base_metalness"type="float"value="0.0" />
<inputname="specular_weight"type="float"value="1.0" />
<inputname="specular_color"type="color3"value="1, 1, 1" />
<inputname="specular_roughness"type="float"value="0.3" />
<inputname="specular_ior"type="float"value="1.5" />
<inputname="specular_ior_level"type="float"value="0.5" />
<inputname="specular_anisotropy"type="float"value="0.0" />
<inputname="specular_rotation"type="float"value="0.0" />
<inputname="transmission_weight"type="float"value="0.0" />
<inputname="transmission_color"type="color3"value="1, 1, 1" />
<inputname="transmission_depth"type="float"value="0.0" />
<inputname="transmission_scatter"type="color3"value="0, 0, 0" />
<inputname="transmission_scatter_anisotropy"type="float"value="0.0" />
<inputname="transmission_dispersion"type="float"value="0.0" />
<inputname="subsurface_weight"type="float"value="0" />
<inputname="subsurface_color"type="color3"value="0.8, 0.8, 0.8" />
<inputname="subsurface_radius"type="float"value="1.0" />
<inputname="subsurface_radius_scale"type="color3"value="1.0, 0.5, 0.25" />
<inputname="subsurface_anisotropy"type="float"value="0.0" />
<inputname="fuzz_weight"type="float"value="0.0" />
<inputname="fuzz_color"type="color3"value="1, 1, 1" />
<inputname="fuzz_roughness"type="float"value="0.5" />
<inputname="coat_weight"type="float"value="0.0" />
<inputname="coat_color"type="color3"value="1, 1, 1" />
<inputname="coat_roughness"type="float"value="0.0" />
<inputname="coat_anisotropy"type="float"value="0.0" />
<inputname="coat_rotation"type="float"value="0.0" />
<inputname="coat_ior"type="float"value="1.6" />
<inputname="coat_ior_level"type="float"value="0.5" />
<inputname="thin_film_thickness"type="float"value="0" />
<inputname="thin_film_ior"type="float"value="1.5" />
<inputname="emission_luminance"type="float"value="0.0" />
<inputname="emission_color"type="color3"value="1, 1, 1" />
<inputname="geometry_opacity"type="color3"value="1, 1, 1" />
<inputname="geometry_thin_walled"type="boolean"value="false" />
</open_pbr_surface>
</materialx>
Suggestion
Either hide these nodegraphs (or template them / make them read-only). Here is OpenPBR implementation graph (circled) is shown.
The text was updated successfully, but these errors were encountered:
Issue
If a file has a nodegraph definition included in the file it is loaded in and is editable.
This can be "dangerous" as the graph implements a definition so it can cause instances to mismatch with the definition.
Here is the reference OpenPBR implementation that has the definition included which folks are using to test this new shading model.
Embedding definitions with instances is also one possible suggested MaterialX mechanism to use custom definitions.
( Note that this renders properly with OpenUSD HDStorm delegate )
Suggestion
Either hide these nodegraphs (or template them / make them read-only). Here is OpenPBR implementation graph (circled) is shown.
The text was updated successfully, but these errors were encountered: