Skip to content

Commit 567ea4b

Browse files
Update example material for 1.39 (AcademySoftwareFoundation#2258)
This changelist updates the `usd_normal_map.mtlx` example for MaterialX 1.39, replacing a legacy reference to object-space `normalmap` with explicit decoding math.
1 parent 1692783 commit 567ea4b

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

resources/Materials/TestSuite/pbrlib/surfaceshader/usd_normal_map.mtlx

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
<?xml version="1.0"?>
22
<materialx version="1.39" colorspace="lin_rec709">
33
<texcoord name="N_texcoord" type="vector2" />
4-
<multiply name="N_multiply" type="vector2">
4+
<multiply name="N_tiling" type="vector2">
55
<input name="in1" type="vector2" nodename="N_texcoord" />
6-
<input name="in2" type="vector2" value="8, 8" />
6+
<input name="in2" type="vector2" value="16, 16" />
77
</multiply>
88
<UsdUVTexture name="N_texture_normal" type="multioutput">
99
<input name="file" type="filename" value="resources/Images/mesh_wire_norm.png" colorspace="none" />
10-
<input name="st" type="vector2" nodename="N_multiply" />
10+
<input name="st" type="vector2" nodename="N_tiling" />
1111
</UsdUVTexture>
1212
<convert name="N_convert" type="vector3">
1313
<input name="in" type="color3" nodename="N_texture_normal" output="rgb" />
1414
</convert>
15-
<normalmap name="N_normalmap" type="vector3">
16-
<input name="in" type="vector3" nodename="N_convert" />
17-
</normalmap>
15+
<multiply name="N_scale" type="vector3">
16+
<input name="in1" type="vector3" nodename="N_convert" />
17+
<input name="in2" type="float" value="2" />
18+
</multiply>
19+
<add name="N_bias" type="vector3">
20+
<input name="in1" type="vector3" nodename="N_scale" />
21+
<input name="in2" type="float" value="-1" />
22+
</add>
1823
<UsdPreviewSurface name="N_surface" type="surfaceshader">
19-
<input name="normal" type="vector3" nodename="N_normalmap" />
2024
<input name="diffuseColor" type="color3" value="1, 1, 1" />
2125
<input name="metallic" type="float" value="1" />
22-
<input name="roughness" type="float" value="0.001" />
26+
<input name="roughness" type="float" value="0.1" />
27+
<input name="normal" type="vector3" nodename="N_bias" />
2328
</UsdPreviewSurface>
2429
<surfacematerial name="N_material" type="material">
2530
<input name="surfaceshader" type="surfaceshader" nodename="N_surface" />

0 commit comments

Comments
 (0)