Skip to content

Commit 6b2f11e

Browse files
committed
Update MaterialX.Specification.md
Add descriptions of checkerboard and distance nodes, clarify use of colorspace/etc attrs in <output> elements
1 parent 99ebdf5 commit 6b2f11e

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

documents/Specification/inprog_v1.39/MaterialX.Specification.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,13 +618,14 @@ Attributes for Output elements:
618618
* `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 &lt;output> elements within a node graph, but is not allowed in &lt;output> elements within a &lt;nodedef>.
619619
* `output` (string, optional): if the node specified by `nodename` has multiple outputs, the name of the specific output to connect this &lt;output> to.
620620
* `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+
621624
* `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.
622625
* `width` (integer, optional): the expected width in pixels of the output image.
623626
* `height` (integer, optional): the expected height in pixels of the output image.
624627
* `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.).
625628

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-
628629

629630

630631
## Standard Source Nodes
@@ -745,6 +746,15 @@ Standard Procedural nodes:
745746
* `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.
746747
* `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.
747748

749+
<a id="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+
748758
<a id="node-noise2d"> </a>
749759

750760
* **`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
11311141
* **`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.
11321142
* `in` (vector<em>N</em>): the input value or nodename
11331143

1144+
1145+
<a id="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+
11341151
<a id="node-dotproduct"> </a>
11351152

11361153
* **`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
14371454
<a id="node-combine3"> </a>
14381455
<a id="node-combine4"> </a>
14391456

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.
14411458
* `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
14421459
* `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
14431460
* `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

Comments
 (0)