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
Copy file name to clipboardExpand all lines: documents/Specification/inprog_v1.39/MaterialX.Specification.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -618,13 +618,14 @@ Attributes for Output elements:
618
618
*`nodename` (string, optional): the name of a node at the same scope within the document, whose result value will be output. This attribute is required for <output> elements within a node graph, but is not allowed in <output> elements within a <nodedef>.
619
619
*`output` (string, optional): if the node specified by `nodename` has multiple outputs, the name of the specific output to connect this <output> to.
620
620
*`uniform` (boolean, optional): If set to "true", then the output of this node is treated as a uniform value, and this output may be connected to a uniform input of the same (or compatible) type. It is up to the application creating the nodegraph to ensure that the value actually is uniform. Default is "false".
621
+
622
+
MaterialX also supports the following additional attributes for Output elements in applications which process node graphs in 2D space and save or cache outputs as images for efficiency, such as texture baking or image caching. These attributes do **not** affect values from this <output> connected to other nodes, e.g. they would remain in the working colorspace and retain full resolution and bitdepth precision.
623
+
621
624
*`colorspace` (string, optional): the name of the color space for the output image. Applications that support color space management are expected to perform the required transformations of output colors into this space.
622
625
*`width` (integer, optional): the expected width in pixels of the output image.
623
626
*`height` (integer, optional): the expected height in pixels of the output image.
624
627
*`bitdepth` (integer, optional): the expected per-channel bit depth of the output image, which may be used to capture expected color quantization effects. Common values for `bitdepth` are 8, 16, 32, and 64. It is up to the application to determine what the internal representation of any declared bit depth is (e.g. scaling factor, signed or unsigned, etc.).
625
628
626
-
The `colorspace`, `width`, `height` and `bitdepth` attributes are intended to be used in applications which process node graphs in 2D space and save or cache outputs as images for efficiency.
627
-
628
629
629
630
630
631
## Standard Source Nodes
@@ -745,6 +746,15 @@ Standard Procedural nodes:
745
746
*`center` (float): a value representing the V-coordinate of the split; all pixels above "center" will be `valuet`, all pixels below "center" will be `valueb`. Default is 0.5.
746
747
*`texcoord` (vector2): the name of a vector2-type node specifying the 2D texture coordinate at which the split position is evaluated. Default is to use the first set of texture coordinates.
747
748
749
+
<aid="node-checkerboard"> </a>
750
+
751
+
***`checkerboard`**: a 2D checkerboard pattern.
752
+
*`color1` (color3): The first color used in the checkerboard pattern.
753
+
*`color2` (color3): The second color used in the checkerboard pattern.
754
+
*`freq` (vector2): The frequency of checkers, with higher values producing smaller squares. Default is (8, 8).
755
+
*`offset` (vector2): Shift the pattern in 2d space. Default is (0, 0).
756
+
*`texcoord` (vector2): The input 2d space. Default is the first texture coordinates.
757
+
748
758
<aid="node-noise2d"> </a>
749
759
750
760
***`noise2d`**: 2D Perlin noise in 1, 2, 3 or 4 channels.
@@ -1131,6 +1141,13 @@ Math nodes have one or two spatially-varying inputs, and are used to perform a m
1131
1141
***`magnitude`**: output the float magnitude (vector length) of the incoming vector<em>N</em> stream; cannot be used on float or color<em>N</em> streams. Note: the fourth channel in vector4 streams is not treated any differently, e.g. not as a homogeneous "w" value.
1132
1142
*`in` (vector<em>N</em>): the input value or nodename
1133
1143
1144
+
1145
+
<aid="node-distance"> </a>
1146
+
1147
+
***`distance`**: Measures the distance between two points in 2D, 3D, or 4D.
1148
+
*`in1` (vector<em>N</em>): the first input value or nodename
1149
+
*`in2` (same type as `in1`): the second input value or nodename
1150
+
1134
1151
<aid="node-dotproduct"> </a>
1135
1152
1136
1153
***`dotproduct`**: output the (float) dot product of two incoming vector<em>N</em> streams; cannot be used on float or color<em>N</em> streams.
@@ -1437,7 +1454,7 @@ Channel nodes are used to perform channel manipulations and data type conversion
1437
1454
<aid="node-combine3"> </a>
1438
1455
<aid="node-combine4"> </a>
1439
1456
1440
-
***`combine2`**, **`combine3`**, **`combine4`**: combine the channels from two, three or four streams into the same total number of channels of a single output stream of a specified compatible type; please see the table below for a list of all supported combinations of input and output types. For color output types, no colorspace conversion will take place; the channels are simply copied as-is.
1457
+
***`combine2`**, **`combine3`**, **`combine4`**: combine the channels from two, three or four streams into the same total number of channels of a single output stream of a specified compatible type; please see the table below for a list of all supported combinations of input and output types. For colorN output types, no colorspace conversion will take place; the channels are simply copied as-is.
1441
1458
*`in1` (float/color3/vector2/vector3): the input value or nodename which will be sent to the N channels of the output; default is 0.0 in all channels
1442
1459
*`in2` (float/vector2): the input value or nodename which will be sent to the next N channels of the output; default is 0.0 in all channels
1443
1460
*`in3` (float): for **`combine3`** or **`combine4`**, the input value or nodename which will be sent to the next channel of the output after `in2`; default is 0.0
0 commit comments