W coordinate
The W Coordinate texture can access the OctaneRender® W Coordinate System, which can place Gradients on hair geometry. The hair geometry stores an inherent Hair Gradient Interpolation along with hair data exported from 3D modeling applications. W is an attribute of the Mesh node, which defines a coordinate for every hair vertex per strand. This attribute is loaded from an Alembic file input. However, if the attribute is not in the Alembic file, OctaneRender® creates the coordinates per strand.
Figure 1: W coordinate Node
To use the W attribute for applying gradient colors to the hair data, you must plug a W Coordinate texture as the Input Texture of an OctaneRender Gradient Map (figure 2). This tells OctaneRender to render the inputs as a Gradient mapping, and OctaneRender uses the specified gradient interpolation to distribute the gradient. This is based on either the hair length or the segment count per strand, depending on what is set in the Import tab for hair geometry.
Figure 2: Gradient Map texture node with W Coordinates
For example, if the hair strand has three segments and each segment is a different length, the Hair Length option distributes the W evenly from root to tip. Segment Count distributes the W independent of the segment lengths, so the first segment goes from 0 to 1/3, the second segment goes from 1/3 to 2/3, and the last segment goes from 2/3 to 1 (figure 3).
Figure 3: Hair segmentation and length
Parameters
- Translation - Offset along the W coordinate.
- Scale - Scale along the W coordinate.
- Border mode - Determines the lookup behavior when the W coordinate falls outside of [0,1].
- Invert - Flip the W coordinate direction.