Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
253 lines (239 sloc) 14.8 KB
<?xml version="1.0" encoding="UTF-8"?>
<materialx version="1.36">
<!--
Autodesk Standard Surface node definition.
-->
<nodedef name="ND_standard_surface_surfaceshader" node="standard_surface" type="surfaceshader" nodegroup="pbr"
doc="A surface uber shader based on the Arnold standard surface shader">
<input name="base" type="float" value="0.8" uiname="Base" uifolder="Base"/>
<input name="base_color" type="color3" value="1, 1, 1" uiname="Base Color" uifolder="Base"/>
<input name="diffuse_roughness" type="float" value="0" uiname="Diffuse Roughness" uifolder="Diffuse"/>
<input name="specular" type="float" value="1" uiname="Specular" uifolder="Specular"/>
<input name="specular_color" type="color3" value="1, 1, 1" uiname="Specular Color" uifolder="Specular"/>
<input name="specular_roughness" type="float" value="0.1" uiname="Specular Roughness" uifolder="Specular"/>
<input name="specular_IOR" type="float" value="1.52" uiname="Index of Refraction" uifolder="Specular"/>
<input name="specular_anisotropy" type="float" value="0" uiname="Specular Anisotropy" uifolder="Specular"/>
<input name="specular_rotation" type="float" value="0" uiname="Specular Rotation" uifolder="Specular"/>
<input name="metalness" type="float" value="0" uiname="Metalness" uifolder="Specular"/>
<input name="transmission" type="float" value="0" uiname="Transmission" uifolder="Transmission"/>
<input name="transmission_color" type="color3" value="1, 1, 1" uiname="Transmission Color" uifolder="Transmission"/>
<input name="transmission_depth" type="float" value="0" uiname="Transmission Depth" uifolder="Transmission"/>
<input name="transmission_scatter" type="color3" value="0, 0, 0" uiname="Transmission Scatter" uifolder="Transmission"/>
<input name="transmission_scatter_anisotropy" type="float" value="0" uiname="Transmission Anisotropy" uifolder="Transmission"/>
<input name="transmission_dispersion" type="float" value="0" uiname="Transmission Dispersion" uifolder="Transmission"/>
<input name="transmission_extra_roughness" type="float" value="0" uiname="Transmission Roughness" uifolder="Transmission"/>
<input name="subsurface" type="float" value="0" uiname="Subsurface" uifolder="Subsurface"/>
<input name="subsurface_color" type="color3" value="1, 1, 1" uiname="Subsurface Color" uifolder="Subsurface"/>
<input name="subsurface_radius" type="vector3" value="1, 1, 1" uiname="Subsurface Radius" uifolder="Subsurface"/>
<input name="subsurface_scale" type="float" value="1" uiname="Subsurface Scale" uifolder="Subsurface"/>
<input name="subsurface_anisotropy" type="float" value="0" uiname="Subsurface Anisotropy" uifolder="Subsurface"/>
<input name="sheen" type="float" value="0" uiname="Sheen" uifolder="Sheen"/>
<input name="sheen_color" type="color3" value="1, 1, 1" uiname="Sheen Color" uifolder="Sheen"/>
<input name="sheen_roughness" type="float" value="0.3" uiname="Sheen Roughness" uifolder="Sheen"/>
<input name="thin_walled" type="boolean" value="false" uiname="Thin Walled" uifolder="Geometry"/>
<input name="normal" type="vector3" defaultgeomprop="Nworld" uiname="Normal" uifolder="Geometry"/>
<input name="tangent" type="vector3" defaultgeomprop="Tworld" uiname="Tangent Input" uifolder="Geometry"/>
<input name="coat" type="float" value="0" uiname="Coat" uifolder="Coat"/>
<input name="coat_color" type="color3" value="1, 1, 1" uiname="Coat Color" uifolder="Coat"/>
<input name="coat_roughness" type="float" value="0.1" uiname="Coat Roughness" uifolder="Coat"/>
<input name="coat_anisotropy" type="float" value="0.0" uiname="Coat Anisotropy" uifolder="Coat"/>
<input name="coat_rotation" type="float" value="0.0" uiname="Coat Rotation" uifolder="Coat"/>
<input name="coat_IOR" type="float" value="1.5" uiname="Coat Index of Refraction" uifolder="Coat"/>
<input name="coat_normal" type="vector3" defaultgeomprop="Nworld" uiname="Coat normal" uifolder="Geometry"/>
<input name="coat_affect_color" type="float" value="0" uiname="Coat Affect Color" uifolder="Coat"/>
<input name="coat_affect_roughness" type="float" value="0" uiname="Coat Affect Roughness" uifolder="Coat"/>
<input name="thin_film_thickness" type="float" value="0" uiname="Thin Film Thickness" uifolder="Thin Film"/>
<input name="thin_film_IOR" type="float" value="1.5" uiname="Thin Film Index of Refraction" uifolder="Thin Film"/>
<input name="emission" type="float" value="0" uiname="Emission" uifolder="Emission"/>
<input name="emission_color" type="color3" value="1, 1, 1" uiname="Emission Color" uifolder="Emission"/>
<input name="opacity" type="color3" value="1, 1, 1" uiname="Opacity" uifolder="Geometry"/>
</nodedef>
<!--
Autodesk Standard Surface nodegraph implementation.
-->
<nodegraph name="IMPL_standard_surface_surfaceshader" nodedef="ND_standard_surface_surfaceshader">
<!-- Roughness influence by coat-->
<multiply name="coat_affect_roughness_multiply1" type="float">
<input name="in1" type="float" interfacename="coat_affect_roughness" />
<input name="in2" type="float" interfacename="coat" />
</multiply>
<multiply name="coat_affect_roughness_multiply2" type="float">
<input name="in1" type="float" nodename="coat_affect_roughness_multiply1" />
<input name="in2" type="float" interfacename="coat_roughness" />
</multiply>
<mix name="coat_affected_rougness" type="float">
<input name="fg" type="float" value="1.0" />
<input name="bg" type="float" interfacename="specular_roughness" />
<input name="mix" type="float" nodename="coat_affect_roughness_multiply2" />
</mix>
<roughness_anisotropy name="main_rougness" type="roughnessinfo">
<input name="roughness" type="float" nodename="coat_affected_rougness" />
<input name="anisotropy" type="float" interfacename="specular_anisotropy" />
</roughness_anisotropy>
<!-- Colors influenced by coat ("coat gamma") -->
<clamp name="coat_clamped" type="float">
<input name="in" type="float" interfacename="coat" />
</clamp>
<multiply name="coat_gamma_multiply" type="float">
<input name="in1" type="float" nodename="coat_clamped" />
<input name="in2" type="float" interfacename="coat_affect_color" />
</multiply>
<add name="coat_gamma" type="float">
<input name="in1" type="float" nodename="coat_gamma_multiply" />
<input name="in2" type="float" value="1.0" />
</add>
<power name="coat_affected_diffuse_color" type="color3">
<input name="in1" type="color3" interfacename="base_color" />
<input name="in2" type="float" nodename="coat_gamma" />
</power>
<power name="coat_affected_subsurface_color" type="color3">
<input name="in1" type="color3" interfacename="subsurface_color" />
<input name="in2" type="float" nodename="coat_gamma" />
</power>
<!-- Diffuse Layer -->
<diffuse_brdf name="diffuse_bsdf" type="BSDF">
<input name="weight" type="float" interfacename="base" />
<input name="color" type="color3" nodename="coat_affected_diffuse_color" />
<input name="roughness" type="float" interfacename="diffuse_roughness" />
<input name="normal" type="vector3" interfacename="normal" />
</diffuse_brdf>
<sheen_brdf name="sheen_bsdf" type="BSDF">
<input name="weight" type="float" interfacename="sheen" />
<input name="color" type="color3" interfacename="sheen_color" />
<input name="roughness" type="float" interfacename="sheen_roughness" />
<input name="normal" type="vector3" interfacename="normal" />
<input name="base" type="BSDF" nodename="diffuse_bsdf" />
</sheen_brdf>
<!-- Subsurface Layer -->
<diffuse_btdf name="translucent_bsdf" type="BSDF">
<input name="weight" type="float" value="1.0" />
<input name="color" type="color3" nodename="coat_affected_subsurface_color" />
<input name="normal" type="vector3" interfacename="normal" />
</diffuse_btdf>
<subsurface_brdf name="subsurface_bsdf" type="BSDF">
<input name="weight" type="float" value="1.0" />
<input name="color" type="color3" nodename="coat_affected_subsurface_color" />
<input name="radius" type="vector3" interfacename="subsurface_radius"/>
<input name="anisotropy" type="float" interfacename="subsurface_anisotropy"/>
<input name="normal" type="vector3" interfacename="normal" />
</subsurface_brdf>
<convert name="subsurface_selector" type="float">
<input name="in" type="boolean" interfacename="thin_walled" />
</convert>
<mix name="selected_subsurface_bsdf" type="BSDF">
<input name="fg" type="BSDF" nodename="translucent_bsdf" />
<input name="bg" type="BSDF" nodename="subsurface_bsdf" />
<input name="mix" type="float" nodename="subsurface_selector" />
</mix>
<mix name="subsurface_mix" type="BSDF">
<input name="fg" type="BSDF" nodename="selected_subsurface_bsdf" />
<input name="bg" type="BSDF" nodename="sheen_bsdf" />
<input name="mix" type="float" interfacename="subsurface" />
</mix>
<!-- Transmission Layer -->
<dielectric_btdf name="transmission_bsdf" type="BSDF">
<input name="weight" type="float" value="1.0" />
<input name="tint" type="color3" interfacename="transmission_color" />
<input name="ior" type="float" interfacename="specular_IOR" />
<input name="roughness" type="roughnessinfo" nodename="main_rougness" />
<input name="normal" type="vector3" interfacename="normal" />
<input name="tangent" type="vector3" interfacename="tangent" />
<input name="distribution" type="string" value="ggx" />
<input name="interior" type="VDF" value="" />
</dielectric_btdf>
<mix name="transmission_mix" type="BSDF">
<input name="fg" type="BSDF" nodename="transmission_bsdf" />
<input name="bg" type="BSDF" nodename="subsurface_mix" />
<input name="mix" type="float" interfacename="transmission" />
</mix>
<!-- Specular Layer -->
<dielectric_brdf name="specular_bsdf" type="BSDF">
<input name="weight" type="float" interfacename="specular" />
<input name="tint" type="color3" interfacename="specular_color" />
<input name="ior" type="float" interfacename="specular_IOR" />
<input name="roughness" type="roughnessinfo" nodename="main_rougness" />
<input name="normal" type="vector3" interfacename="normal" />
<input name="tangent" type="vector3" interfacename="tangent" />
<input name="distribution" type="string" value="ggx" />
<input name="base" type="BSDF" nodename="transmission_mix" />
</dielectric_brdf>
<!-- Metal Layer -->
<conductor_brdf name="metal_bsdf" type="BSDF">
<input name="weight" type="float" interfacename="base" />
<input name="reflectivity" type="color3" interfacename="base_color"/>
<input name="edgecolor" type="color3" interfacename="specular_color"/>
<input name="roughness" type="roughnessinfo" nodename="main_rougness" />
<input name="normal" type="vector3" interfacename="normal" />
<input name="tangent" type="vector3" interfacename="tangent" />
<input name="distribution" type="string" value="ggx" />
</conductor_brdf>
<mix name="metalness_mix" type="BSDF">
<input name="fg" type="BSDF" nodename="metal_bsdf" />
<input name="bg" type="BSDF" nodename="specular_bsdf" />
<input name="mix" type="float" interfacename="metalness" />
</mix>
<!-- Coat Layer -->
<mix name="coat_attenuation" type="color3" >
<input name="fg" type="color3" interfacename="coat_color" />
<input name="bg" type="color3" value="1.0, 1.0, 1.0" />
<input name="mix" type="float" interfacename="coat" />
</mix>
<multiply name="metalness_mix_attenuated" type="BSDF">
<input name="in1" type="BSDF" nodename="metalness_mix" />
<input name="in2" type="color3" nodename="coat_attenuation" />
</multiply>
<roughness_anisotropy name="coat_roughness" type="roughnessinfo">
<input name="roughness" type="float" interfacename="coat_roughness" />
<input name="anisotropy" type="float" interfacename="coat_anisotropy" />
</roughness_anisotropy>
<dielectric_brdf name="coat_bsdf" type="BSDF">
<input name="weight" type="float" interfacename="coat" />
<input name="tint" type="color3" value="1.0, 1.0, 1.0" />
<input name="ior" type="float" interfacename="coat_IOR" />
<input name="roughness" type="roughnessinfo" nodename="coat_roughness" />
<input name="normal" type="vector3" interfacename="coat_normal" />
<input name="distribution" type="string" value="ggx" />
<input name="base" type="BSDF" nodename="metalness_mix_attenuated" />
</dielectric_brdf>
<!-- Emission Layer -->
<multiply name="emission_weight" type="color3">
<input name="in1" type="color3" interfacename="emission_color" />
<input name="in2" type="float" interfacename="emission" />
</multiply>
<fresnel name="coat_fresnel" type="float">
<input name="ior" type="float" interfacename="coat_IOR" />
<input name="normal" type="vector3" interfacename="coat_normal" />
</fresnel>
<invert name="coat_fresnel_inv" type="float">
<input name="in" type="float" nodename="coat_fresnel" />
</invert>
<multiply name="coat_color_fresnel" type="color3">
<input name="in1" type="color3" interfacename="coat_color" />
<input name="in2" type="float" nodename="coat_fresnel_inv" />
</multiply>
<mix name="coat_emission_attenuation" type="color3" >
<input name="fg" type="color3" nodename="coat_color_fresnel" />
<input name="bg" type="color3" value="1.0, 1.0, 1.0" />
<input name="mix" type="float" interfacename="coat" />
</mix>
<multiply name="emission_weight_attenuated" type="color3">
<input name="in1" type="color3" nodename="emission_weight" />
<input name="in2" type="color3" nodename="coat_emission_attenuation" />
</multiply>
<uniform_edf name="emission_edf" type="EDF">
<input name="intensity" type="color3" nodename="emission_weight_attenuated" />
</uniform_edf>
<!-- Surface construction with opacity -->
<!-- Node <surface> only supports monochromatic opacity so use the luminance of input opacity color -->
<luminance name="opacity_luminance" type="color3">
<input name="in" type="color3" interfacename="opacity" />
</luminance>
<surface name="standard_surface_constructor" type="surfaceshader">
<input name="bsdf" type="BSDF" nodename="coat_bsdf" />
<input name="edf" type="EDF" nodename="emission_edf" />
<input name="opacity" type="float" nodename="opacity_luminance" channels="r"/>
</surface>
<!-- Output -->
<output name="out" type="surfaceshader" nodename="standard_surface_constructor" />
</nodegraph>
</materialx>
You can’t perform that action at this time.