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
Moved/combined/renamed the three sections titled "Shader Nodes" to make more sense and not have conflicting link targets. Added other new things to the README.
Copy file name to clipboardExpand all lines: documents/Specification/inprog_v1.39/MaterialX.PBRSpec.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ This document describes a number of shader-semantic nodes implementing widely-us
37
37
[BSDF Nodes](#bsdf-nodes)
38
38
[EDF Nodes](#edf-nodes)
39
39
[VDF Nodes](#vdf-nodes)
40
-
[Shader Nodes](#shader-nodes)
40
+
[PBR Shader Nodes](#pbr-shader-nodes)
41
41
[Utility Nodes](#utility-nodes)
42
42
43
43
**[Shading Model Examples](#shading-model-examples)**
@@ -303,7 +303,7 @@ The PBS nodes also make use of the following standard MaterialX types:
303
303
*`anisotropy` (float): Anisotropy factor, controlling the scattering direction, range [-1.0, 1.0]. Negative values give backwards scattering, positive values give forward scattering, and a value of 0.0 (the default) gives uniform scattering.
304
304
305
305
306
-
## Shader Nodes
306
+
## PBR Shader Nodes
307
307
308
308
<aid="node-surface"> </a>
309
309
@@ -334,6 +334,9 @@ The PBS nodes also make use of the following standard MaterialX types:
334
334
*`intensity` (color3): Intensity multiplier for the light's emittance. Defaults to (1.0, 1.0, 1.0).
335
335
*`exposure` (float): Exposure control for the light's emittance. Defaults to 0.0.
336
336
337
+
Note that the standard library includes definitions for [**`displacement`**](./MaterialX.Specification.md#node-displacement) and [**`surface_unlit`**](./MaterialX.Specification.md#node-surfaceunlit) shader nodes.
*`geomprop` (uniform string): the geometric property to be referenced.
898
897
*`default` (same type as the geomprop's value): a value to return if the specified `geomprop` is not defined on the current geometry.
899
898
899
+
Additionally, the `geomcolor`, `geompropvalue` and `geompropvalueuniform` nodes for color3/color4-type properties can take a `colorspace` attribute to declare what colorspace the color property value is in; the default is "none" for no colorspace declaration (and hence no colorspace conversion).
900
+
900
901
901
902
<aid="space-values"> </a>
902
903
@@ -979,7 +980,7 @@ Operator nodes process one or more required input streams to form an output. Li
979
980
980
981
The inputs of compositing operators are called "fg" and "bg" (plus "alpha" for float and color3 variants, and "mix" for all variants of the `mix` operator), while the inputs of other operators are called "in" if there is exactly one input, or "in1", "in2" etc. if there are more than one input. If an implementation does not support a particular operator, it should pass through the "bg", "in" or "in1" input unchanged.
981
982
982
-
This section defines the Operator Nodes that all MaterialX implementations are expected to support. Standard Operator Nodes are grouped into the following classifications: [Math Nodes](#math-nodes), [Adjustment Nodes](#adjustment-nodes), [Compositing Nodes](#compositing-nodes), [Conditional Nodes](#conditional-nodes), [Channel Nodes](#channel-nodes), [Convolution Nodes](#convolution-nodes)and [Shader Nodes](#shader-nodes).
983
+
This section defines the Operator Nodes that all MaterialX implementations are expected to support. Standard Operator Nodes are grouped into the following classifications: [Math Nodes](#math-nodes), [Adjustment Nodes](#adjustment-nodes), [Compositing Nodes](#compositing-nodes), [Conditional Nodes](#conditional-nodes), [Channel Nodes](#channel-nodes)and [Convolution Nodes](#convolution-nodes).
983
984
984
985
985
986
@@ -990,7 +991,7 @@ Math nodes have one or two spatially-varying inputs, and are used to perform a m
990
991
991
992
<aid="node-add"> </a>
992
993
993
-
***`add`**: add a value to the incoming float/color/vector/matrix. See also the [Shader Nodes](#shader-nodes) section below for additional `add` variants supporting shader-semantic types.
994
+
***`add`**: add a value to the incoming float/color/vector/matrix.
994
995
*`in1` (float or color<em>N</em> or vector<em>N</em> or matrix<em>NN</em>): the value or nodename for the primary input
995
996
*`in2` (same type as `in1` or float): the value or nodename to add; for matrix types, the default is the zero matrix.
996
997
@@ -1002,7 +1003,7 @@ Math nodes have one or two spatially-varying inputs, and are used to perform a m
1002
1003
1003
1004
<aid="node-multiply"> </a>
1004
1005
1005
-
***`multiply`**: multiply an incoming float/color/vector/matrix by a value. Multiplication of two vectors is interpreted as a component-wise vector multiplication, while multiplication of two matrices is interpreted as a standard matrix product. To multiply a vector and a matrix, use one of the `transform*` nodes. See also the [Shader Nodes](#shader-nodes) section below for additional `multiply` variants supporting shader-semantic types.
1006
+
***`multiply`**: multiply an incoming float/color/vector/matrix by a value. Multiplication of two vectors is interpreted as a component-wise vector multiplication, while multiplication of two matrices is interpreted as a standard matrix product. To multiply a vector and a matrix, use one of the `transform*` nodes.
1006
1007
*`in1` (float or color<em>N</em> or vector<em>N</em> or matrix<em>NN</em>): the value or nodename for the primary input
1007
1008
*`in2` (same type as `in1` or float): the value or nodename to multiply by; default is 1.0 in all channels for float/color/vector types, or the identity matrix for matrix types.
1008
1009
@@ -1381,7 +1382,7 @@ The Mix node takes two 1-4 channel inputs `fg` and `bg` plus a separate 1-channe
1381
1382
|**`mix`**| Fm+B(1-m) |
1382
1383
1383
1384
1384
-
See also the [Shader Nodes](#shader-nodes) section below for additional `mix` operator variants supporting shader-semantic types.
1385
+
See also the [Standard Library Shader Nodes](#standard-library-shader-nodes) section below for additional `mix` operator variants supporting shader-semantic types.
1385
1386
1386
1387
1387
1388
@@ -1512,25 +1513,6 @@ Convolution nodes have one input named "in", and apply a defined convolution fun
1512
1513
1513
1514
1514
1515
1515
-
### Shader Nodes
1516
-
1517
-
Shader nodes construct a shader (a node with a shader semantic output type) from the specified inputs, which may then be connected to a material. Standard library shaders do not respond to external illumination; please refer to the [**MaterialX Physically Based Shading Nodes**](./MaterialX.PBRSpec.md#materialx-pbs-library) document for definitions of additional nodes and shader constructors which do respond to illumination.
1518
-
1519
-
1520
-
<aid="node-surface"> </a>
1521
-
1522
-
***`surface`**: Constructs a surface shader for an unlit surface with a plain unshaded color value. Useful for visualizing texture data or rendering non-PBR materials. Output type "surfaceshader".
1523
-
*`color` (color3): Color value to display. Default is (0, 0, 0).
1524
-
*`opacity` (float or color3): Cutout (float) or transmission (color3) opacity for the surface. Default is 1.0, representing a fully-opaque surface.
1525
-
1526
-
<aid="node-displacement"> </a>
1527
-
1528
-
***`displacement`**: Constructs a displacement shader describing geometric modification to surfaces. Output type "displacementshader".
1529
-
*`displacement` (float or vector3): Scalar (along the surface normal direction) or vector displacement (in (dPdu, dPdv, N) tangent/normal space) for each position. Default is 0.
1530
-
*`scale` (float): Scale factor for the displacement vector. Default is 1.0.
1531
-
1532
-
1533
-
1534
1516
## Standard Node Inputs
1535
1517
1536
1518
All standard nodes which define a `defaultinput` or `default` value support the following input:
@@ -2187,14 +2169,11 @@ An input with a shader-semantic type may be given a value of "" to indicate no s
2187
2169
2188
2170
2189
2171
2190
-
### Standard Shader-Semantic Operator Nodes
2172
+
### Standard Library Shader Nodes
2191
2173
2192
-
The Standard MaterialX Library defines the following nodes and node variants operating on "shader"-semantic types.
2174
+
The Standard MaterialX Library defines the following nodes and node variants operating on "shader"-semantic types. Standard library shaders do not respond to external illumination; please refer to the [**MaterialX Physically Based Shading Nodes**](./MaterialX.PBRSpec.md#materialx-pbs-library) document for definitions of additional nodes and shader constructors which do respond to illumination.
2193
2175
2194
-
***`mix`**: linear blend between two surface/displacement/volumeshader closures.
2195
-
*`bg` (surface/displacement/volumeshader): the name of the background shader-semantic node
2196
-
*`fg` (surface/displacement/volumeshader): the name of the foreground shader-semantic node
2197
-
*`mix` (float): the blending factor used to mix the two input closures
2176
+
<aid="node-surfaceunlit"> </a>
2198
2177
2199
2178
***`surface_unlit`**: an unlit surface shader node, representing a surface that can emit and transmit light, but does not receive illumination from light sources or other surfaces. Output type surfaceshader.
2200
2179
*`emission` (float): the surface emission amount; default is 1.0
@@ -2203,6 +2182,20 @@ The Standard MaterialX Library defines the following nodes and node variants ope
2203
2182
*`transmission_color` (color3): surface transmission color; default is (1, 1, 1)
2204
2183
*`opacity` (float): surface cutout opacity; default is 1.0
2205
2184
2185
+
<aid="node-displacement"> </a>
2186
+
2187
+
***`displacement`**: Constructs a displacement shader describing geometric modification to surfaces. Output type "displacementshader".
2188
+
*`displacement` (float or vector3): Scalar (along the surface normal direction) or vector displacement (in (dPdu, dPdv, N) tangent/normal space) for each position. Default is 0.
2189
+
*`scale` (float): Scale factor for the displacement vector. Default is 1.0.
2190
+
2191
+
<aid="node-mix-shader"> </a>
2192
+
2193
+
***`mix`**: linear blend between two surface/displacement/volumeshader closures.
2194
+
*`bg` (surface/displacement/volumeshader): the name of the background shader-semantic node
2195
+
*`fg` (surface/displacement/volumeshader): the name of the foreground shader-semantic node
2196
+
*`mix` (float): the blending factor used to mix the two input closures
Copy file name to clipboardExpand all lines: documents/Specification/inprog_v1.39/README_v1.39.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Previously, MaterialX used custom types with a structure of output variables to
33
33
34
34
**Array Types Now Uniform and Static Length**
35
35
36
-
Many shading languages do not support dynamic array types with a variable length, so MaterialX now only supports arrays with a fixed maximum length, and all array-type node inputs must be uniform; nodes are no longer permitted to output an array type. Array-type inputs may be accompanied by a uniform integer input declaring the number of array elements actually used in the array. Because of this change, the unimplemented <arrayappend> node has been removed.
36
+
Many shading languages do not support dynamic array types with a variable length, so MaterialX now only supports arrays with a fixed maximum length, and all array-type node inputs must be uniform; nodes are no longer permitted to output an array type. Array-type inputs may be accompanied by a uniform integer input declaring the number of array elements actually used in the array (the <curveadjust> node has been updated in this way). Because of this change, the unimplemented <arrayappend> node has been removed.
37
37
38
38
39
39
**Connectable Uniform Inputs and New Tokenvalue Node**
@@ -62,7 +62,7 @@ The standard <swizzle> node using a string of channel names and allowing arbi
62
62
63
63
**New Unlit Surface Shader and Standard Materials**
64
64
65
-
A new standard <surface> constructor node for unlit surfaces has been added to the standard library.
65
+
A new <surface_unlit> node for unlit surfaces has been added to the standard library.
66
66
67
67
Additionally, the standard <surfacematerial> material now supports both single- or double-sided surfaces with the addition of a separate `backsurface` input.
68
68
@@ -72,13 +72,13 @@ Additionally, the standard <surfacematerial> material now supports both singl
72
72
Typedefs may now inherit from other types, including built-in types, and may provide hints about their values such as floating-point precision. These new "inherit" and "hint" attributes are themselves merely metadata hints about the types; applications and code generators are still expected to provide their own precise definitions for all custom types.
73
73
74
74
75
-
**New Nodes**
75
+
**New and Updated Standard Library Nodes**
76
76
77
-
The following new standard operator nodes have been added:
77
+
The following new operator nodes have been added to the standard library:
*[Math nodes](./MaterialX.Specification.md#math-nodes): boolean **and**, **or**, **not**; **distance**, **transformcolor** and **creatematrix**, as well as integer-output variants of **floor** and **ceil**
82
82
*[Adjustment nodes](./MaterialX.Specification.md#adjustment-nodes): **curveinversecubic**, **curveuniformlinear** and **curveuniformcubic**
83
83
*[Conditional nodes](./MaterialX.Specification.md#conditional-nodes): boolean-output variants of **ifgreater**, **ifgreatereq** and **ifequal**; new **ifelse** node
@@ -103,10 +103,13 @@ The following new standard physically based shading nodes have been added:
103
103
104
104
* The <member> element for <typedef>s and the "member" attribute for inputs have been removed from the Specification, as they had never been implemented and it was not clear how they could be implemented generally.
105
105
* The "valuerange" and "valuecurve" attributes describing expressions and function curves have been removed, in favor of using the new <curveinversecubic> / <curveuniformcubic> / etc. nodes.
106
+
* The <geomcolor>, <geompropvalue> and <geompropvalueuniform> nodes for color3/4-type values can now take a "colorspace" attribute to declare the colorspace of the property value.
106
107
* The <cellnoise2d> and <cellnoise3d> nodes now support vector<em>N</em> output types in addition to float output.
108
+
* The <noise2d/3d>, <fractal2d/3d>, <cellnoise2d/3d> and <worleynoise2d/3d> nodes now support a "period" input.
107
109
* The <worleynoise2d> and <worleynoise3d> nodes now support a number of different distance metrics.
108
-
* The <time> node no longer has a "frames per second" input: the application is now always expected to generate the "current time in seconds" using an appropriate method. "Fps" was removed because varible-rate real-time applications have no static "fps", and it's generally not good to bake a situation-dependent value like fps into a shading network.
110
+
* The <time> node no longer has a "frames per second" input: the application is now always expected to generate the "current time in seconds" using an appropriate method. The "fps" input was removed because variable-rate real-time applications have no static "fps", and it's generally not good to bake a situation-dependent value like fps into a shading network.
109
111
* A standard "tangent" space is now defined in addition to "model", "object" and "world" spaces, and the <heighttonormal> node now accepts a uniform "space" input to define the space of the output normal vector.
112
+
* The <switch> node now supports 10 inputs instead of just 5.
110
113
* The <surface> and <displacement> nodes are now part of the main Specification rather than being Physically Based Shading nodes.
111
114
*<Token> elements are now explicitly allowed to be children of compound nodegraphs, and token values may now have defined enum/enumvalues.
112
115
* Inputs in <nodedef>s may now supply "hints" to code generators as to their intended interpretation, e.g. "transparency" or "opacity".
0 commit comments