-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename interior nodes, remove translation unit test, and add translat…
…ed mtl to render testsuite Signed-off-by: Charlotte Manning <[email protected]>
- Loading branch information
Showing
3 changed files
with
264 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
258 changes: 258 additions & 0 deletions
258
resources/Materials/TestSuite/pbrlib/translation/standard_surface_to_gltf_pbr_glass.mtlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,258 @@ | ||
<?xml version="1.0"?> | ||
<materialx version="1.39" colorspace="lin_rec709" xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
<extract name="N_extract_0" type="float"> | ||
<input name="in" type="color3" output="attenuation_color_out" nodegraph="nodegraph1" /> | ||
<input name="index" type="integer" value="0" /> | ||
</extract> | ||
<extract name="N_extract_1" type="float"> | ||
<input name="in" type="color3" output="attenuation_color_out" nodegraph="nodegraph1" /> | ||
<input name="index" type="integer" value="1" /> | ||
</extract> | ||
<extract name="N_extract_2" type="float"> | ||
<input name="in" type="color3" output="attenuation_color_out" nodegraph="nodegraph1" /> | ||
<input name="index" type="integer" value="2" /> | ||
</extract> | ||
<combine3 name="combine" type="vector3"> | ||
<input name="in1" type="float" nodename="N_extract_0" output="" /> | ||
<input name="in2" type="float" nodename="N_extract_1" output="" /> | ||
<input name="in3" type="float" nodename="N_extract_2" output="" /> | ||
</combine3> | ||
<ln name="ln_attenuation_color_vec" type="vector3"> | ||
<input name="in" type="vector3" nodename="combine" /> | ||
</ln> | ||
<divide name="ln_attenuation_color_vec_over_distance" type="vector3"> | ||
<input name="in1" type="vector3" nodename="ln_attenuation_color_vec" /> | ||
<input name="in2" type="float" /> | ||
</divide> | ||
<multiply name="attenuation_coeff" type="vector3"> | ||
<input name="in1" type="vector3" nodename="ln_attenuation_color_vec_over_distance" /> | ||
<input name="in2" type="float" value="-1" /> | ||
</multiply> | ||
<anisotropic_vdf name="isotropic_volume" type="VDF"> | ||
<input name="absorption" type="vector3" nodename="attenuation_coeff" /> | ||
<input name="scattering" type="vector3" value="0, 0, 0" /> | ||
<input name="anisotropy" type="float" value="0" /> | ||
</anisotropic_vdf> | ||
<subtract name="one_minus_ior" type="float"> | ||
<input name="in1" type="float" value="1" /> | ||
<input name="in2" type="float" value="1.5" /> | ||
</subtract> | ||
<add name="one_plus_ior" type="float"> | ||
<input name="in1" type="float" value="1" /> | ||
<input name="in2" type="float" value="1.5" /> | ||
</add> | ||
<divide name="ior_div" type="float"> | ||
<input name="in1" type="float" nodename="one_minus_ior" /> | ||
<input name="in2" type="float" nodename="one_plus_ior" /> | ||
</divide> | ||
<multiply name="dielectric_f0_from_ior" type="float"> | ||
<input name="in1" type="float" nodename="ior_div" /> | ||
<input name="in2" type="float" nodename="ior_div" /> | ||
</multiply> | ||
<multiply name="dielectric_f0_from_ior_specular_color" type="color3"> | ||
<input name="in1" type="color3" value="1, 1, 1" /> | ||
<input name="in2" type="float" nodename="dielectric_f0_from_ior" /> | ||
</multiply> | ||
<min name="clamped_dielectric_f0_from_ior_specular_color" type="color3"> | ||
<input name="in1" type="color3" nodename="dielectric_f0_from_ior_specular_color" /> | ||
<input name="in2" type="float" value="1" /> | ||
</min> | ||
<multiply name="dielectric_f0" type="color3"> | ||
<input name="in1" type="color3" nodename="clamped_dielectric_f0_from_ior_specular_color" /> | ||
<input name="in2" type="float" value="1" /> | ||
</multiply> | ||
<multiply name="dielectric_f90" type="color3"> | ||
<input name="in1" type="color3" value="1, 1, 1" /> | ||
<input name="in2" type="float" value="1" /> | ||
</multiply> | ||
<roughness_anisotropy name="roughness_uv" type="vector2"> | ||
<input name="roughness" type="float" output="roughness_out" nodegraph="nodegraph1" /> | ||
</roughness_anisotropy> | ||
<oren_nayar_diffuse_bsdf name="diffuse_bsdf" type="BSDF"> | ||
<input name="color" type="color3" output="base_color_out" nodegraph="nodegraph1" /> | ||
<input name="normal" type="vector3" nodename="geomNode_Nworld" /> | ||
</oren_nayar_diffuse_bsdf> | ||
<dielectric_bsdf name="transmission_bsdf" type="BSDF"> | ||
<input name="weight" type="float" value="1" /> | ||
<input name="tint" type="color3" output="base_color_out" nodegraph="nodegraph1" /> | ||
<input name="ior" type="float" value="1.5" /> | ||
<input name="roughness" type="vector2" nodename="roughness_uv" /> | ||
<input name="normal" type="vector3" nodename="geomNode_Nworld" /> | ||
<input name="tangent" type="vector3" nodename="geomNode_Tworld" /> | ||
<input name="scatter_mode" type="string" value="T" /> | ||
</dielectric_bsdf> | ||
<generalized_schlick_bsdf name="reflection_bsdf" type="BSDF"> | ||
<input name="color0" type="color3" nodename="dielectric_f0" /> | ||
<input name="color90" type="color3" nodename="dielectric_f90" /> | ||
<input name="roughness" type="vector2" nodename="roughness_uv" /> | ||
<input name="normal" type="vector3" nodename="geomNode_Nworld" /> | ||
<input name="tangent" type="vector3" nodename="geomNode_Tworld" /> | ||
<input name="scatter_mode" type="string" value="R" /> | ||
</generalized_schlick_bsdf> | ||
<mix name="transmission_mix" type="BSDF"> | ||
<input name="bg" type="BSDF" nodename="diffuse_bsdf" /> | ||
<input name="fg" type="BSDF" nodename="transmission_bsdf" /> | ||
<input name="mix" type="float" output="transmission_out" nodegraph="nodegraph1" /> | ||
</mix> | ||
<layer name="dielectric_bsdf" type="BSDF"> | ||
<input name="top" type="BSDF" nodename="reflection_bsdf" /> | ||
<input name="base" type="BSDF" nodename="transmission_mix" /> | ||
</layer> | ||
<generalized_schlick_bsdf name="tf_reflection_bsdf" type="BSDF"> | ||
<input name="color0" type="color3" nodename="dielectric_f0" /> | ||
<input name="color90" type="color3" nodename="dielectric_f90" /> | ||
<input name="roughness" type="vector2" nodename="roughness_uv" /> | ||
<input name="normal" type="vector3" nodename="geomNode_Nworld" /> | ||
<input name="tangent" type="vector3" nodename="geomNode_Tworld" /> | ||
<input name="scatter_mode" type="string" value="R" /> | ||
<input name="thinfilm_thickness" type="float" value="100" /> | ||
<input name="thinfilm_ior" type="float" value="1.3" /> | ||
</generalized_schlick_bsdf> | ||
<layer name="tf_dielectric_bsdf" type="BSDF"> | ||
<input name="top" type="BSDF" nodename="tf_reflection_bsdf" /> | ||
<input name="base" type="BSDF" nodename="transmission_mix" /> | ||
</layer> | ||
<mix name="mix_iridescent_dielectric_bsdf" type="BSDF"> | ||
<input name="bg" type="BSDF" nodename="dielectric_bsdf" /> | ||
<input name="fg" type="BSDF" nodename="tf_dielectric_bsdf" /> | ||
<input name="mix" type="float" value="0" /> | ||
</mix> | ||
<generalized_schlick_bsdf name="metal_bsdf" type="BSDF"> | ||
<input name="color0" type="color3" output="base_color_out" nodegraph="nodegraph1" /> | ||
<input name="color90" type="color3" value="1, 1, 1" /> | ||
<input name="roughness" type="vector2" nodename="roughness_uv" /> | ||
<input name="normal" type="vector3" nodename="geomNode_Nworld" /> | ||
<input name="tangent" type="vector3" nodename="geomNode_Tworld" /> | ||
</generalized_schlick_bsdf> | ||
<generalized_schlick_bsdf name="tf_metal_bsdf" type="BSDF"> | ||
<input name="color0" type="color3" output="base_color_out" nodegraph="nodegraph1" /> | ||
<input name="color90" type="color3" value="1, 1, 1" /> | ||
<input name="roughness" type="vector2" nodename="roughness_uv" /> | ||
<input name="normal" type="vector3" nodename="geomNode_Nworld" /> | ||
<input name="tangent" type="vector3" nodename="geomNode_Tworld" /> | ||
<input name="thinfilm_thickness" type="float" value="100" /> | ||
<input name="thinfilm_ior" type="float" value="1.3" /> | ||
</generalized_schlick_bsdf> | ||
<mix name="mix_iridescent_metal_bsdf" type="BSDF"> | ||
<input name="bg" type="BSDF" nodename="metal_bsdf" /> | ||
<input name="fg" type="BSDF" nodename="tf_metal_bsdf" /> | ||
<input name="mix" type="float" value="0" /> | ||
</mix> | ||
<mix name="base_mix" type="BSDF"> | ||
<input name="bg" type="BSDF" nodename="mix_iridescent_dielectric_bsdf" /> | ||
<input name="fg" type="BSDF" nodename="mix_iridescent_metal_bsdf" /> | ||
<input name="mix" type="float" output="metallic_out" nodegraph="nodegraph1" /> | ||
</mix> | ||
<extract name="sheen_color_r" type="float"> | ||
<input name="in" type="color3" output="sheen_color_out" nodegraph="nodegraph1" /> | ||
<input name="index" type="integer" value="0" /> | ||
</extract> | ||
<extract name="sheen_color_g" type="float"> | ||
<input name="in" type="color3" output="sheen_color_out" nodegraph="nodegraph1" /> | ||
<input name="index" type="integer" value="1" /> | ||
</extract> | ||
<extract name="sheen_color_b" type="float"> | ||
<input name="in" type="color3" output="sheen_color_out" nodegraph="nodegraph1" /> | ||
<input name="index" type="integer" value="2" /> | ||
</extract> | ||
<max name="sheen_color_max_rg" type="float"> | ||
<input name="in1" type="float" nodename="sheen_color_r" /> | ||
<input name="in2" type="float" nodename="sheen_color_g" /> | ||
</max> | ||
<max name="sheen_intensity" type="float"> | ||
<input name="in1" type="float" nodename="sheen_color_max_rg" /> | ||
<input name="in2" type="float" nodename="sheen_color_b" /> | ||
</max> | ||
<multiply name="sheen_roughness_sq" type="float"> | ||
<input name="in1" type="float" output="sheen_roughness_out" nodegraph="nodegraph1" /> | ||
<input name="in2" type="float" output="sheen_roughness_out" nodegraph="nodegraph1" /> | ||
</multiply> | ||
<divide name="sheen_color_normalized" type="color3"> | ||
<input name="in1" type="color3" output="sheen_color_out" nodegraph="nodegraph1" /> | ||
<input name="in2" type="float" nodename="sheen_intensity" /> | ||
</divide> | ||
<sheen_bsdf name="sheen_bsdf" type="BSDF"> | ||
<input name="weight" type="float" nodename="sheen_intensity" /> | ||
<input name="color" type="color3" nodename="sheen_color_normalized" /> | ||
<input name="roughness" type="float" nodename="sheen_roughness_sq" /> | ||
<input name="normal" type="vector3" nodename="geomNode_Nworld" /> | ||
</sheen_bsdf> | ||
<layer name="sheen_layer" type="BSDF"> | ||
<input name="top" type="BSDF" nodename="sheen_bsdf" /> | ||
<input name="base" type="BSDF" nodename="base_mix" /> | ||
</layer> | ||
<roughness_anisotropy name="clearcoat_roughness_uv" type="vector2"> | ||
<input name="roughness" type="float" output="clearcoat_roughness_out" nodegraph="nodegraph1" /> | ||
</roughness_anisotropy> | ||
<dielectric_bsdf name="clearcoat_bsdf" type="BSDF"> | ||
<input name="weight" type="float" output="clearcoat_out" nodegraph="nodegraph1" /> | ||
<input name="roughness" type="vector2" nodename="clearcoat_roughness_uv" /> | ||
<input name="ior" type="float" value="1.5" /> | ||
<input name="normal" type="vector3" nodename="geomNode_Nworld" /> | ||
<input name="tangent" type="vector3" nodename="geomNode_Tworld" /> | ||
</dielectric_bsdf> | ||
<layer name="clearcoat_layer" type="BSDF"> | ||
<input name="top" type="BSDF" nodename="clearcoat_bsdf" /> | ||
<input name="base" type="BSDF" nodename="sheen_layer" /> | ||
</layer> | ||
<multiply name="emission_color" type="color3"> | ||
<input name="in1" type="color3" output="emissive_out" nodegraph="nodegraph1" /> | ||
<input name="in2" type="float" value="1" /> | ||
</multiply> | ||
<uniform_edf name="emission" type="EDF"> | ||
<input name="color" type="color3" nodename="emission_color" /> | ||
</uniform_edf> | ||
<ifgreatereq name="opacity_mask_cutoff" type="float"> | ||
<input name="value1" type="float" value="1" /> | ||
<input name="value2" type="float" value="0.5" /> | ||
<input name="in1" type="float" value="1" /> | ||
<input name="in2" type="float" value="0" /> | ||
</ifgreatereq> | ||
<ifequal name="opacity_mask" type="float"> | ||
<input name="value1" type="integer" value="0" /> | ||
<input name="value2" type="integer" value="1" /> | ||
<input name="in1" type="float" nodename="opacity_mask_cutoff" /> | ||
<input name="in2" type="float" value="1" /> | ||
</ifequal> | ||
<ifequal name="opacity" type="float"> | ||
<input name="value1" type="integer" value="0" /> | ||
<input name="value2" type="integer" value="0" /> | ||
<input name="in1" type="float" value="1" /> | ||
<input name="in2" type="float" nodename="opacity_mask" /> | ||
</ifequal> | ||
<surface name="shader_constructor" type="surfaceshader"> | ||
<input name="bsdf" type="BSDF" nodename="clearcoat_layer" /> | ||
<input name="edf" type="EDF" nodename="emission" /> | ||
<input name="opacity" type="float" nodename="opacity" /> | ||
</surface> | ||
<surfacematerial name="Glass" type="material"> | ||
<input name="surfaceshader" type="surfaceshader" nodename="shader_constructor" /> | ||
</surfacematerial> | ||
<nodegraph name="nodegraph1"> | ||
<standard_surface_to_gltf_pbr name="node1" type="multioutput" nodedef="ND_standard_surface_to_gltf_pbr"> | ||
<input name="base" type="float" value="0.0" colorspace="lin_rec709" /> | ||
<input name="specular_roughness" type="float" value="0.01" colorspace="lin_rec709" /> | ||
<input name="transmission" type="float" value="1" colorspace="lin_rec709" /> | ||
<input name="transmission_color" type="color3" value="1, 1, 1" colorspace="lin_rec709" /> | ||
<input name="transmission_depth" type="float" value="0" colorspace="lin_rec709" /> | ||
</standard_surface_to_gltf_pbr> | ||
<output name="base_color_out" type="color3" nodename="node1" output="base_color_out" /> | ||
<output name="metallic_out" type="float" nodename="node1" output="metallic_out" /> | ||
<output name="roughness_out" type="float" nodename="node1" output="roughness_out" /> | ||
<output name="transmission_out" type="float" nodename="node1" output="transmission_out" /> | ||
<output name="thickness_out" type="float" nodename="node1" output="thickness_out" /> | ||
<output name="attenuation_color_out" type="color3" nodename="node1" output="attenuation_color_out" /> | ||
<output name="sheen_color_out" type="color3" nodename="node1" output="sheen_color_out" /> | ||
<output name="sheen_roughness_out" type="float" nodename="node1" output="sheen_roughness_out" /> | ||
<output name="clearcoat_out" type="float" nodename="node1" output="clearcoat_out" /> | ||
<output name="clearcoat_roughness_out" type="float" nodename="node1" output="clearcoat_roughness_out" /> | ||
<output name="emissive_out" type="color3" nodename="node1" output="emissive_out" /> | ||
</nodegraph> | ||
<normal name="geomNode_Nworld" type="vector3"> | ||
<input name="space" type="string" value="world" /> | ||
</normal> | ||
<tangent name="geomNode_Tworld" type="vector3"> | ||
<input name="space" type="string" value="world" /> | ||
<input name="index" type="integer" value="0" /> | ||
</tangent> | ||
</materialx> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters