Skip to content

Commit

Permalink
Improve specification of geometric spaces (#2151)
Browse files Browse the repository at this point in the history
- Centralize the list of supported geometric spaces in a new `Geometric Spaces` section.
- Remove `tangent` and `common` from the list of geometric spaces, as they are not supported in the codebase, and more design discussion would be needed to propose their addition.
- Remove the `space` input from `heighttonormal`, as it's not supported in the codebase, and more design discussion would be needed to propose its addition.
  • Loading branch information
jstone-lucasfilm authored Dec 20, 2024
1 parent 1d6f148 commit cab1b26
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions documents/Specification/MaterialX.Specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ This document describes the core MaterialX specification. Companion documents [
  [Noise Nodes](#noise-nodes)
  [Shape Nodes](#shape-nodes)
  [Geometric Nodes](#geometric-nodes)
   [Geometric Spaces](#geometric-spaces)
  [Application Nodes](#application-nodes)

[Standard Operator Nodes](#standard-operator-nodes)
Expand Down Expand Up @@ -1050,23 +1051,23 @@ Standard Geometric nodes:
<a id="node-position"> </a>

* **`position`**: the coordinates associated with the currently-processed data, as defined in a specific coordinate space. This node must be of type vector3.
* `space` (uniform string): the name of the coordinate space in which the position is defined. Default is "object", see below for details.
* `space` (uniform string): the name of the coordinate space in which the position is defined. Default is "object", see [Geometric Spaces](#geometric-spaces) for supported options.

<a id="node-normal"> </a>

* **`normal`**: the geometric normal associated with the currently-processed data, as defined in a specific coordinate space. This node must be of type vector3.
* `space` (uniform string): the name of the coordinate space in which the normal vector is defined. Default is "object", see below for details.
* `space` (uniform string): the name of the coordinate space in which the normal vector is defined. Default is "object", see [Geometric Spaces](#geometric-spaces) for supported options.

<a id="node-tangent"> </a>

* **`tangent`**: the geometric tangent vector associated with the currently-processed data, as defined in a specific coordinate space. This node must be of type vector3.
* `space` (uniform string): the name of the coordinate space in which the tangent vector is defined. Default is "object", see below for details.
* `space` (uniform string): the name of the coordinate space in which the tangent vector is defined. Default is "object", see [Geometric Spaces](#geometric-spaces) for supported options.
* `index` (uniform integer): the index of the texture coordinates against which the tangent is computed. The default index is 0.

<a id="node-bitangent"> </a>

* **`bitangent`**: the geometric bitangent vector associated with the currently-processed data, as defined in a specific coordinate space. This node must be of type vector3.
* `space` (uniform string): the name of the coordinate space in which the bitangent vector is defined. Default is "object", see below for details.
* `space` (uniform string): the name of the coordinate space in which the bitangent vector is defined. Default is "object", see [Geometric Spaces](#geometric-spaces) for supported options.
* `index` (uniform integer): the index of the texture coordinates against which the tangent is computed. The default index is 0.

<a id="node-bump"> </a>
Expand Down Expand Up @@ -1102,17 +1103,13 @@ Standard Geometric nodes:
Additionally, the `geomcolor` and `geompropvalue` 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).


<a id="space-values"> </a>
#### Geometric Spaces

The following values are supported by the `space` inputs of Geometric nodes and when transforming from one space to another:


* "model": The local coordinate space of the geometry, before any local deformations or global transforms have been applied.
* "object": The local coordinate space of the geometry, after local deformations have been applied, but before any global transforms.
* "world": The global coordinate space of the geometry, after local deformations and global transforms have been applied.
* "tangent": A coordinate space defined by the tangent, bitangent and normal vectors of the geometry.

Applications may also reference other renderer-specific named spaces, at the expense of portability.



Expand Down Expand Up @@ -1343,21 +1340,21 @@ Math nodes have one or two spatially-varying inputs, and are used to perform a m

* **`transformpoint`**: transform the incoming vector3 coordinate from one specified space to another; cannot be used on any other stream type.
* `in` (vector3): the input coordinate vector.
* `fromspace` (uniform string): the name of a vector space understood by the rendering target to transform the `in` point from; may be empty to specify the renderer's working or "common" space.
* `fromspace` (uniform string): the name of a vector space understood by the rendering target to transform the `in` point from; see [Geometric Spaces](#geometric-spaces) for supported options.
* `tospace` (uniform string): the name of a vector space understood by the rendering target for the space to transform the `in` point to.

<a id="node-transformvector"> </a>

* **`transformvector`**: transform the incoming vector3 vector from one specified space to another; cannot be used on any other stream type.
* `in` (vector3): the input vector.
* `fromspace` (uniform string): the name of a vector space understood by the rendering target to transform the `in` point from; may be empty to specify the renderer's working or "common" space.
* `fromspace` (uniform string): the name of a vector space understood by the rendering target to transform the `in` point from; see [Geometric Spaces](#geometric-spaces) for supported options.
* `tospace` (uniform string): the name of a vector space understood by the rendering target for the space to transform the `in` point to.

<a id="node-transformnormal"> </a>

* **`transformnormal`**: transform the incoming vector3 normal from one specified space to another; cannot be used on any other stream type.
* `in` (vector3): the input normal vector; default is (0,0,1).
* `fromspace` (uniform string): the name of a vector space understood by the rendering target to transform the `in` point from; may be empty to specify the renderer's working or "common" space.
* `fromspace` (uniform string): the name of a vector space understood by the rendering target to transform the `in` point from; see [Geometric Spaces](#geometric-spaces) for supported options.
* `tospace` (uniform string): the name of a vector space understood by the rendering target for the space to transform the `in` point to.

<a id="node-transformmatrix"> </a>
Expand Down Expand Up @@ -1782,7 +1779,6 @@ Convolution nodes have one input named "in", and apply a defined convolution fun
* **`heighttonormal`**: convert a scalar height map to a normal map of type vector3.
* `in` (float): the input value or nodename
* `scale` (float): the scale of normal map deflections relative to the gradient of the height map. Default is 1.0.
* `space` (string): the space in which the output normal map vector should be; defaults to "tangent".



Expand Down

0 comments on commit cab1b26

Please sign in to comment.