Generate Strand Data Operator
The Generate Strand Data operator procedurally creates strand channel values - per-strand or per-vertex - based on criteria you choose. These generated values can then drive operator parameters and strand groups elsewhere in the groom, which makes this operator the bridge between data you have (maps, positions, randomness) and the parameters you want to control.
What it generates
Rather than painting a channel by hand, you describe how its values should be produced. Sources include:
- Maps - turn a texture or vertex map into a strand channel, so an image drives an effect.
- Expressions - compute values from strand properties and other channels.
- Randomness - assign varied values across strands.
- Value ranges - remap generated values into a chosen range.
Writing expressions
An expression is evaluated once per strand, or once per point when it reads point data, and its result becomes the channel value. The Generate Strand Data operator evaluates it when its generation method is set to Expression; the same language is used for the expressions that drive operator parameters, described in Editing Operator Properties.
Variables start with $. The hair offers $index and $strandId for the strand, $position for the position of its root (or of the point, when evaluated per point) in object space, $u and $v for its place on the surface, $length, $point for the index of the point along its strand, $width, $frame for the current animation frame, and one variable per strand channel named after it. The names on offer are listed as completions in the editor while you type. An expression can also sample a texture with texture( $u, $v ).
The last value of the expression is its result. Values can be kept in your own variables for later lines, each statement ending with a semicolon:
$random = rand( 0, 1, $strandId ); $random < 0.5 ? 0 : $random
Conditions can also be written with if and else, values can be vectors written as [x, y, z] with their components read as $v[0], and a line starting with # is a comment. The functions include arithmetic such as abs, min, max, clamp, floor and pow, trigonometry, rand and hash for repeatable randomness, noise and fbm for smooth variation, fit and remap for moving a value from one range to another, mix and smoothstep for blending, and curve for shaping a value along a ramp of your own knots. Function names complete in the editor like variables do.
Why use it
Generated channels let you control a groom from data instead of by hand. For example, convert a painted mask into a channel and use it to drive Frizz Operator amount or Clump Operator strength; or generate random per-strand values to vary Length Operator or width. Because a single channel can feed many operators, this is a powerful way to keep a groom coherent and art-directable.
Related
- Working with Strand Channels - what channels are and how operators read them.
- Working with Strand Groups - generated data can also assign groups.


