Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documents/Specification/MaterialX.PBRSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ In order to simplify authoring of complex materials, our model supports the noti

### Bump and Normal Mapping

The surface normal used for shading calculations is supplied as input to each BSDF that requires it. The normal can be perturbed by bump or normal mapping, before it is given to the BSDF. As a result, one can supply different normals for different BSDFs for the same shading point. When layering BSDFs, each layer can use different bump and normal maps.
The surface normal used for shading calculations is supplied as input to each BSDF that requires it. The normal can be perturbed by bump or normal mapping, before it is given to the BSDF. As a result, one can supply different normals for different BSDFs for the same shading point. When layering BSDFs, each layer can use different bump and normal maps. Normals, tangents, and bitangents used for bump or normal mapping are expected to be normalized.


## Volumes
Expand Down
24 changes: 17 additions & 7 deletions documents/Specification/MaterialX.Proposals.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MaterialX Proposals v1.39

# MaterialX: Proposed Additions and Changes

**Proposals for Version 1.39**
**Proposals for Version 1.39**
September 15, 2024


Expand All @@ -19,17 +19,17 @@ As such, those forward-looking proposals have been moved from the formal Specifi

## Table of Contents

**[Introduction](#introduction)**
**[Introduction](#introduction)**

**[Proposals: General](#propose-general)**
**[Proposals: General](#propose-general)**

**[Proposals: Elements](#propose-elements)**
**[Proposals: Elements](#propose-elements)**

**[Proposals: Stdlib Nodes](#propose-stdlib-nodes)**
**[Proposals: Stdlib Nodes](#propose-stdlib-nodes)**

**[Proposals: PBR Nodes](#propose-pbr-nodes)**
**[Proposals: PBR Nodes](#propose-pbr-nodes)**

**[Proposals: NPR Nodes](#propose-npr-nodes)**
**[Proposals: NPR Nodes](#propose-npr-nodes)**


<p>&nbsp;<p><hr><p>
Expand Down Expand Up @@ -393,6 +393,16 @@ Output the RGB and alpha channels of a color4 as separate outputs.

# Proposals: PBR Nodes<a id="propose-pbr-nodes"></a>

### Unit-Length Normal and Tangent-Frame Inputs

Normals, tangents, bitangent inputs should be unit-length direction vectors
in the given coordinate space. This follows from the existing math used by BSDFs
and EDFs:
- where the dot products with a normal are used a cosines.
- microfacet distributions construct local frames from the vectors.
- sampling PDFs are defined over unit (hemi)spheres.

Non-unit normals could then change energy, sampling density, reflected/transmitted directions. The alternative is to define that they do not have to be unit length, and then amend the GLSL implementations to handle this.


<p>&nbsp;<p><hr><p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<input name="SurfaceRoughness" type="float" value="0.1" uiname="Roughness" uifolder="Basic Parameters" />
<input name="SurfaceAlbedo" type="color3" value="1, 1, 1" uiname="Color" uifolder="Hilight Parameters" />
<input name="SurfaceAnisotropy" type="float" value="0.0" uiname="Anisotropy" uifolder="Hilight Parameters" />
<input name="SurfaceNormal" type="vector3" value="1, 1, 1" uiname="Relief Pattern (Bump)" uifolder="Hilight Parameters" />
<input name="SurfaceNormal" type="vector3" value="0.57735026919, 0.57735026919, 0.57735026919" uiname="Relief Pattern (Bump)" uifolder="Hilight Parameters" />
<input name="SurfaceRotation" type="float" value="0" uiname="Orientation" uifolder="Hilight Parameters" />
<input name="SurfaceCutout" type="color3" value="1, 1, 1" uiname="Image" uifolder="Cutout" />
<output name="out" type="surfaceshader" />
Expand All @@ -33,7 +33,7 @@
<input name="coat_color" type="color3" value="1, 1, 1" />
<input name="coat_roughness" type="float" value="0.1" />
<input name="coat_IOR" type="float" value="1.5" />
<input name="coat_normal" type="vector3" value="0.0, 0.0, 0.0" />
<input name="coat_normal" type="vector3" value="0.0, 0.0, 1.0" />
<input name="thin_walled" type="boolean" value="false" />
<input name="thin_film_thickness" type="float" value="0" />
<input name="thin_film_IOR" type="float" value="1.5" />
Expand Down
2 changes: 1 addition & 1 deletion resources/Materials/TestSuite/locale/numericformat.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<standard_surface name="SR_numberformats" type="surfaceshader">
<input name="base_color" type="color3" value="0.18,0.18, 0.18" />
<input name="specular_color" type="color3" value="0.05, 0.05,0.05" />
<input name="normal" type="vector3" value="1,0.5,1" />
<input name="normal" type="vector3" value="0.666666666667,0.333333333333, 0.666666666667" />
<input name="specular_roughness" type="float" value="0.25" />
<input name="coat" type="float" value="1" />
</standard_surface>
Expand Down
2 changes: 1 addition & 1 deletion resources/Materials/TestSuite/pbrlib/bsdf/add_bsdf.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<input name="weight" type="float" nodename="invert1" />
<input name="color" type="color3" value="0.9600, 0.1, 0.1" />
<input name="roughness" type="float" value="0.0" />
<input name="normal" type="vector3" value="0.0, 0.0, 0.0" />
<input name="normal" type="vector3" value="0.0, 0.0, 1.0" />
</oren_nayar_diffuse_bsdf>
<dielectric_bsdf name="dielectric_brdf1" type="BSDF">
<input name="weight" type="float" nodename="clamp1" />
Expand Down
2 changes: 1 addition & 1 deletion resources/Materials/TestSuite/pbrlib/bsdf/mix_bsdf.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<oren_nayar_diffuse_bsdf name="diffuse_brdf1" type="BSDF">
<input name="color" type="color3" value="0.96, 0.1, 0.1" />
<input name="roughness" type="float" value="0.0" />
<input name="normal" type="vector3" value="0.0, 0.0, 0.0" />
<input name="normal" type="vector3" value="0.0, 0.0, 1.0" />
</oren_nayar_diffuse_bsdf>
<dielectric_bsdf name="dielectric_brdf1" type="BSDF">
<input name="tint" type="color3" value="1.0, 1.0, 1.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<input name="color" type="color3" value="0.18, 0.18, 0.18" />
<input name="radius" type="color3" value="1.0, 1.0, 1.0" />
<input name="anisotropy" type="float" value="0.0" />
<input name="normal" type="vector3" value="0.0, 0.0, 0.0" />
<input name="normal" type="vector3" value="0.0, 0.0, 1.0" />
</subsurface_bsdf>
<sheen_bsdf name="sheen_brdf1" type="BSDF">
<input name="weight" type="float" value="1.0" />
<input name="color" type="color3" value="1.0, 1.0, 1.0" />
<input name="roughness" type="float" value="0.3" />
<input name="normal" type="vector3" value="0.0, 0.0, 0.0" />
<input name="normal" type="vector3" value="0.0, 0.0, 1.0" />
</sheen_bsdf>
<mix name="mix_edf1" type="EDF">
<input name="fg" type="EDF" nodename="Emission_EDF" />
Expand Down Expand Up @@ -49,7 +49,7 @@
<conductor_bsdf name="conductor_brdf1" type="BSDF">
<input name="weight" type="float" value="1.0" />
<input name="roughness" type="vector2" value="0.0, 0.0" />
<input name="normal" type="vector3" value="0.0, 0.0, 0.0" />
<input name="normal" type="vector3" value="0.0, 0.0, 1.0" />
<input name="tangent" type="vector3" value="0.0, 0.0, 0.0" />
<input name="distribution" type="string" value="ggx" />
<input name="ior" type="color3" nodename="conductor_brdf1__artistic_ior" output="ior" />
Expand All @@ -61,7 +61,7 @@
<input name="color90" type="color3" value="1.0, 1.0, 1.0" />
<input name="exponent" type="float" value="5.0" />
<input name="roughness" type="vector2" nodename="roughness_dual1" />
<input name="normal" type="vector3" value="0.0, 0.0, 0.0" />
<input name="normal" type="vector3" value="0.0, 0.0, 1.0" />
<input name="tangent" type="vector3" value="0.0, 0.0, 0.0" />
<input name="distribution" type="string" value="ggx" />
</generalized_schlick_bsdf>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0"?>
<materialx version="1.39" colorspace="lin_rec709" xmlns:xi="http://www.w3.org/2001/XInclude">
<nodedef name="ND_layered" node="mylayered" version="1.0.1" isdefaultversion="true">
<input name="surface_normal" type="vector3" value="1, 1, 1" defaultgeomprop="Nworld" />
<input name="surface_normal" type="vector3" value="0.57735026919, 0.57735026919, 0.57735026919" defaultgeomprop="Nworld" />
<input name="surface_cutout" type="color3" value="1, 1, 1" />
<input name="surface_albedo" type="color3" value="1, 1, 1" />
<input name="surface_roughness" type="float" value="0" />
<input name="surface_anisotropy" type="float" value="0" />
<input name="surface_rotation" type="float" value="0" />
<input name="layered_normal" type="vector3" value="1, 1, 1" defaultgeomprop="Nworld" />
<input name="layered_normal" type="vector3" value="0.57735026919, 0.57735026919, 0.57735026919" defaultgeomprop="Nworld" />
<input name="layered_f0" type="float" value="1" />
<input name="layered_roughness" type="float" value="0" />
<input name="layered_anisotropy" type="float" value="0" />
Expand Down
Loading