FollicleScript Expressions
Last updated 7 November 2026
FollicleScript is FollicleFX's expression language. Almost every setting that takes a number can take an expression instead: a small formula worked out for every hair (or every point of a hair) when the groom cooks, so one setting can vary across the head, along the hair, from hair to hair, or over time in a simulation.
The same language, with the same meaning, runs in every modifier, on the guides and on the hair alike. A Force's Code uses it to write whole programs that run per point.
Where you write one#
- On a setting. Open the setting's menu and choose Expression, then type in the field, or press the pencil beside it to open the expression editor for more room.

The editor, from left to right:
- Presets — ready-made expressions for this kind of setting; picking one fills the box.
- Load... — reads an expression from a .se, .txt or .expr file.
- Validate — checks the expression parses and says where it does not (the line under
the box reads Ready when it is fine).
- The box — the expression, with line numbers and colours. A line like
$amount = 0.8 # [0,1] becomes a slider under the setting's row (see Sliders).
- Variables / Functions / Examples — everything you can use, with what it means, and
worked examples. Double-click one to insert it.
- Apply writes the expression and keeps the editor open; OK writes it and closes;
Cancel leaves the setting as it was.
- Autocomplete. In the expression editor and a Force's Code box, start typing a name and
the matching functions, variables and constants appear with their inputs and what they do.
Up and Down pick, Enter or Tab inserts (a function with its brackets ready), Escape closes.
Inside the quotes of map(", vgroup(", attr(", guide(", ramp(", distance(" or
inside(" it offers the names this groom has: its maps, the scalp's vertex groups, the
channels this modifier can read, the channels its guides carry, the modifier's ramps, the
scene's objects -- so you pick a name rather than remember it.
- As a Mask. A modifier's Mask row takes an expression the same way: how much of the
modifier each hair (or point) gets, 0 to 1.
- As a Force's Code. A Force set to Custom has a Code box: a program run for every
point once a frame (see Force Code).
Quick start#
0.8
A constant, the same as typing the number on the slider.
rand(0.7, 1.0)
A different value for every hair, between 0.7 and 1.0.
lerp(0.5, 1.0, v)
Grows with the hair's root position across the scalp's UVs: 0.5 at v = 0, 1.0 at v = 1.
v > 0.5 ? 1.0 : 0.5
Full on the upper half of the UVs, half on the lower half.
$Percentage = 78; #0,100
$Seed = 1; #0,20
rand(0, 1, $Seed) < $Percentage / 100 ? 1 : 0
A short program with two sliders: it picks 78% of the hairs, a different 78% for each Seed.
The language#
Numbers and operators#
A value is a number or a vector. Write numbers as 2, 0.25, 1e-3.
| Operator | Meaning |
|---|---|
+ - * / |
Add, subtract, multiply, divide |
% |
Remainder: 7 % 3 is 1 |
^ |
Power. It works right to left and before a minus sign: 2^3^2 is 512, -2^2 is -4 |
< > <= >= == != |
Comparisons: 1 when true, 0 when false |
!x a && b a \|\| b |
Not, and, or. Anything other than 0 counts as true; the result is 1 or 0 |
c ? a : b |
a when c is above 0, else b |
x -> f(a, b) |
The same as f(x, a, b): u -> clamp(0.2, 0.8) |
( ) |
Grouping |
Vectors#
A vector is three numbers in brackets, [1, 0.5, 0]: a position, a direction, a velocity, a
force. Read one part with .x, .y, .z or [0], [1], [2]:
$dir = [0.2, 1, 0];
$dir.y * t
Every operator works part by part, and a number counts as the same number in all three
parts: [1, 2, 3] * 2 is [2, 4, 6], [1, 2, 3] + [10, 20, 30] is [11, 22, 33]. So does
every function of a number: abs([-1, 2, -3]) is [1, 2, 3], clamp(P, 0, 1) clamps each
part. Three vectors are built in:
| Vector | Is | Where |
|---|---|---|
P |
[x, y, z], the point's position |
everywhere |
WP |
[wx, wy, wz], its world position |
Set Attribute, a Force |
V |
[vx, vy, vz], its world velocity in m/s |
a Force |
A noise given a vector reads it as its position: fractal(P * 4) is
fractal(x * 4, y * 4, z * 4). The vector functions measure and combine them.
A setting takes one number, so the result of a setting's expression must be a number: end
on a part ($dir.y) or a measure (length(P)). A vector there is treated like a typo -- the
setting keeps its slider and the field is marked. A Force's Code can set its force as one
vector, $force = [0, 0, -2]; (see Force Code).
Named values#
An expression can be a short program: lines that give a value a name, and the result on the
last line. The $ is optional, ; ends a line, and # starts a comment.
$mask = rand(0, 1, 12); # one random value per hair, from seed 12
$amount = rand(0.15, 0.9);
$mask < 0.94 ? $amount : 0 # the result
A name holds its value from the line that sets it to the end of the program. Built-in
names (u, length, pi, ...) cannot be set. A program can name up to 64 values.
Sliders#
A name set to a plain number, with its range in a comment on the same line (#min,max),
becomes a slider under the field. The bracket form can carry a description:
$Strength = 0.5; #0,2
strength2 = 0.25 # [0, 1] How strong the second part is
$Strength * strength2
Moving a slider rewrites that number in the expression, so the expression always holds the
values you see; saving, copying and undo keep them together. A slider whose number and range
have no decimal point ($Seed = 12; #0,20) moves in whole steps.
Choices and loops#
if runs a block of lines when its condition is above 0 -- the same rule as c ? a : b --
with else if and else for the other cases. The braces are needed, even around one line:
$w = 1;
if (t > 0.9) {
$w = 0.2; # thin tips
} else if (t < 0.1) {
$w = 1.5; # thick roots
}
$w
for repeats a block, counting; while repeats it while its condition holds. +=, -=,
*= and /= change a value in place ($s += 1 is $s = $s + 1):
# four octaves of smooth noise, each finer and fainter
$sum = 0;
$size = 1;
$amount = 1;
for ($i = 0; $i < 4; $i += 1) {
$sum += $amount * snoise(u * 8 * $size, v * 8 * $size);
$size *= 2;
$amount *= 0.5;
}
0.6 + 0.3 * $sum
The result is still the last line, after the blocks. A loop that runs more than 10 000 times in one evaluation stops the expression: the setting keeps its slider and the problem is reported, so a mistake cannot hang the groom.
Programs#
A Force's Code is a program that does not need a result line: it sets named outputs
($force, or $force_x, $force_y, $force_z) and those are read back. See
Force Code.
Variables#
What each hair (or point) is. A variable a setting does not have reads 0, the same as an unknown name; the table says where each one has a value.
Every modifier#
| Variable | Meaning |
|---|---|
u, v |
The hair's root position in the scalp's UVs, 0 to 1 |
index |
The hair's number, 0 to count - 1 |
count |
How many hairs (or guides) there are |
length |
The hair's length, in the scene's units |
t |
Where the point is along the hair: 0 at the root, 1 at the tip. On a setting worked out once per hair it is 0 |
x, y, z |
The position, in the scalp object's own space (at the root, or at the point) |
frame |
The scene's current frame (in a Force: the frame being simulated) |
time |
Seconds since the scene's start frame, at the scene's frame rate (in a Force: seconds simulated, Time Scale included) |
Animating with frame and time. A setting that reads either one changes as the timeline
plays: 0.3 + 0.7 * clamp(time / 2, 0, 1) grows the hair to full length over two seconds. Only
the modifiers that read them are worked out again on a new frame -- a groom that never mentions
them costs nothing to play. For an animation render, bake the groom with a Cache first.

Length 0.3 + 0.7 * clamp(time / 2, 0, 1) and Frizz Magnitude 1.5 * (0.5 + 0.5 * sin(4 * time)),
three seconds of timeline, every second frame.
Some modifiers#
| Variable | Meaning | Where it has a value |
|---|---|---|
maxLength |
The longest hair's length | Clumping, Coil, Frizz, Length, Guide Flow and Set Attribute |
clump_id |
The hair's clump number | After a Clumping |
normalized_clump_id |
clump_id / 100 (kept as it always was) |
After a Clumping |
curviness |
How curled the hair is: 0 straight, 1 tightly curled | Set Attribute |
wx, wy, wz |
World position | Set Attribute (at the rest frame) and a Force (at the frame) |
guide_style |
The guide's style: compare with LOOSE, CORNROW, BRAID |
Wherever guides carry a style |
vx, vy, vz |
The point's world velocity, metres per second | A Force's Mask, Swirls and Code |
cLength is accepted as another name for length, so expressions pasted from other grooming
tools keep working.
Feather channels (2.0)#
On hair made by a Feather modifier:
| Variable | Meaning |
|---|---|
side |
0 on the rachis (the shaft), -1 or +1 on the two vane sides |
rachis |
1 on the shaft, 0 on every barb |
feather_id |
A stable number per feather (one feather per guide) |
barb_id |
The barb's number within its feather (the rachis is -1) |
s |
Where the barb is attached along the rachis, root to tip, 0 to 1 |
vane_t |
Position along the barb, 0 at its base, 1 at its tip |
barb_clump |
Which group of a split vane the barb is in, -1 on a continuous vane |
feather_block |
The feather's card-atlas group, 0 for no preference |
side == 0 ? 0.3 : 0.0
As Frizz's Magnitude: frizz only the shaft; the barbs follow it.
side != 0 ? 0.3 * vane_t : 0.0
Frizz only the barbs, more toward their tips.
The Feather modifier's own settings (Length Scale, Vane Width, Barb Density, Curl, ...) take
expressions too, worked out once per feather, with feather_id, index, count, u, v,
x, y, z and length (the rachis length):
fit01(rand(feather_id), 0.7, 1.3)
Length Scale: up to 30% longer or shorter, feather by feather.
Constants#
| Constant | Value |
|---|---|
pi |
3.14159... |
tau |
6.28318... (2 pi) |
e |
2.71828... |
LOOSE, CORNROW, BRAID |
The guide styles, to compare guide_style with |
Functions#
Random#
| Function | Gives |
|---|---|
rand() |
A random number 0 to 1 for each hair. Each call is its own number: rand() + rand() adds two different values |
rand(min, max) |
The same, between min and max |
rand(min, max, seed) |
A random number for each hair from a seed: the same seed picks the same hairs in every modifier |
idrand(seed) |
rand(0, 1, seed) |
rand(x) |
One argument: a fixed random number for the number x, e.g. rand(clump_id) for one value per clump |
rand3(min, max, seed) |
A fixed random number for seed, between min and max: rand3(0, 1, index) |
The per-hair randoms follow each hair: change the density and hairs come and go, but a hair that stays keeps its value.
Noise#
Smooth noises. These change gradually from point to point, so they make soft patterns,
patches and drifting motion. Scale the inputs to set the size: snoise(u * 8, v * 8) makes
features about an eighth of the UV square across.
| Function | Gives |
|---|---|
snoise(x, y, z) |
Smooth noise, -1 to 1. One or two inputs work too |
fractal(x, y, z, octaves, roughness, lacunarity) |
Layers of smooth noise, each finer and fainter: cloudy patterns, about -1 to 1. Only x, y, z are needed (4 layers, roughness 0.5, each layer twice as fine) |
ridged(x, y, z, octaves, roughness) |
Sharp crests where the noise crosses zero, 0 to 1: veins, ridges |
billow(x, y, z, octaves, roughness) |
Soft lumps with creases between them, 0 to 1 |
cellnoise(x, y, z) |
One random value per unit cell, 0 to 1: blocky patches with hard edges |
voronoi(x, y, z, jitter) |
Distance to the nearest of a scatter of points (one per unit cell): cells. Jitter 0 puts the points on a grid, 1 (the default) scatters them |
voronoi_edge(x, y, z, jitter) |
Distance to the nearest cell border: cracks, scales, cell walls |
voronoi_id(x, y, z, jitter) |
One random value 0 to 1 per Voronoi cell: irregular patches, each its own value |
curl_x(x, y, z, t), curl_y(...), curl_z(...) |
One component of curl noise at a position (and time t): smooth swirls that never bunch up. Use all three for a direction |
swirl_x(size, pulse, roughness, detail, seed), swirl_y(...), swirl_z(...) |
One component of the simulation's own swirls at the point's world position and time, size metres across, changing over pulse seconds (only size is needed). In a Force only: elsewhere they read 0 |
curl(P, t), swirl(size, ...) |
All three components at once, as a vector: curl(P).y is curl_y(x, y, z) |
Every smooth noise takes a vector for its position: snoise(P * 3), voronoi(WP * 20, 0.5).
0.6 + 0.4 * fractal(u * 6, v * 6, 0)
A soft, cloudy variation across the head, 0.2 to 1.0.
voronoi_id(u * 12, v * 12, 0) < 0.3 ? 0 : 1
Irregular patches across the head, about 30% of them off: patchy, uneven hair.
smoothstep(0.0, 0.08, voronoi_edge(u * 10, v * 10, 0))
0 along a network of cell borders, 1 inside the cells.
Hash noises. noise, fbm and turbulence are older: they give a pseudo-random value for
each input, and two inputs a little apart give unrelated values. They are good for varying hair
by hair (noise(index)), not for smooth patterns. They keep their values so saved grooms do
not change.
| Function | Gives |
|---|---|
noise(x), noise(x, y), noise(x, y, z) |
A pseudo-random number 0 to 1 for the input |
fbm(x, y, octaves) |
Several layers of noise added, finer and fainter |
turbulence(x, y, octaves) |
Like fbm, folded at the middle |
fbmandturbulencetake an octave count as their third input, not a Z coordinate.fbm(x, y, 0)adds no layers and gives 0 everywhere. Use a small whole number, 4 or 5.
0.7 + noise(index) * 0.3
A different value for every hair, 0.7 to 1.0.
Vectors#
| Function | Gives |
|---|---|
dot(a, b) |
a.x * b.x + a.y * b.y + a.z * b.z: how much two directions agree (1 the same, 0 at right angles, -1 opposite, for length-1 vectors) |
cross(a, b) |
A vector at right angles to both: cross([1, 0, 0], [0, 1, 0]) is [0, 0, 1] |
length(v) |
A vector's length. With brackets it is this function; length alone is still the hair's length |
normalize(v) |
The same direction at length 1 ([0, 0, 0] stays [0, 0, 0]) |
dist(a, b) |
The distance between two points: length(a - b) |
smoothstep(0.2, 0.05, dist(WP, [0, 0.1, 1.6]))
1 near a point in the world (10 cm in front of the face, 1.6 m up), fading out 5 to 20 cm from it.
# a Force: air toward a point (the head's centre), 3 m/s, from every side
$to = [0, 0, 1.65] - WP;
$force = normalize($to) * 3;
Maths#
| Function | Gives |
|---|---|
abs(x) |
x without its sign |
sqrt(x) |
Square root |
pow(x, y) |
x to the power y (the same as x ^ y) |
exp(x) |
e to the power x |
log(x), log10(x) |
Natural and base-10 logarithm |
sign(x) |
-1, 0 or 1 |
mod(x, y) |
Remainder (the same as x % y) |
min(a, b), max(a, b) |
The smaller, the larger |
floor(x), ceil(x), round(x) |
Round down, up, to nearest |
frac(x) |
The part after the decimal point |
sin(x), cos(x), tan(x) |
Trigonometry, in radians |
asin(x), acos(x), atan(x), atan2(y, x) |
Their inverses, in radians |
Shaping and remapping#
| Function | Gives |
|---|---|
clamp(x, min, max) |
x kept between min and max |
lerp(a, b, t) |
From a (t = 0) to b (t = 1) |
fit(x, oldMin, oldMax, newMin, newMax) |
x moved from one range to another |
fit01(x, newMin, newMax) |
x from 0-1 to a new range |
step(edge, x) |
0 below edge, 1 above it |
smoothstep(edge0, edge1, x) |
0 below edge0, 1 above edge1, a smooth S between |
select(c, a, b) |
a when c is above 0, else b |
gamma(x, g) |
x to the power 1 / g |
bias(x, b) |
Pushes 0-1 values up (b above 0.5) or down (b below) |
gain(x, g) |
An S-curve on 0-1 values: g below 0.5 steepens the middle |
contrast(x, c) |
Spreads values away from 0.5 by c |
fit(length, 0, maxLength, 0.2, 1.0)
In proportion to the hair's length, never below 0.2.
step(0.5, length / maxLength)
Nothing on hair shorter than half the longest.
Reading painted and authored data#
| Function | Gives |
|---|---|
attr("name") |
A channel the stack carries at this point: painted, from a vertex group, or written by an earlier modifier (Set Attribute) |
map("name") |
The groom's map called name, at the hair's root UV |
map("name", u, v) |
The same map at another UV |
vgroup("name") |
A Blender vertex group's weight at the hair's root, 0 to 1 |
distance("object") |
Distance from the point to a scene object's surface (Set Attribute, a Force) |
inside("object") |
1 inside a closed scene object, 0 outside (Set Attribute, a Force) |
ramp("name", x) |
A curve you draw under the field, read at x (0 to 1) -- see Ramps |
guide("name") |
A channel of the hair's nearest guide, as that guide holds it -- see Reading other hairs |
guide_distance() |
The distance from the hair's root to its nearest guide's root |
near_count(radius) |
How many other roots lie within radius of this one |
attr("ffx_clump_mask") * 0.8
Clump hard only where the channel is painted.
lerp(20, 120, map("density"))
Dense where the map is white.
Any name you write in map() is a map you can paint. A row for it appears under the
field: Paint makes the map (white everywhere, so nothing changes until you paint) and opens
it in the paint tool; you can also Load an image, pick a map already in the file, or Clear it.
One name is one map per groom, so map("Fringe_MASK") in Clumping and in Frizz read the same
paint. A map no expression reads any more is listed at the end of the panel as not used;
write its name again to use it, or Clear it. Maps save with the scene.
Reading other hairs#
An expression can look at its neighbours:
guide("name")reads a channel of the hair's nearest guide, exactly as that guide holds it.attr("name")reads the value blended from the guides around the hair;guide()takes the one guide's own, so a guide's number, side or style passes to its hair unblended.guide_distance()is how far the hair's root is from its nearest guide's root -- hair far from any guide can be treated differently.near_count(radius)counts the other roots withinradius(in the scene's units) -- how crowded the hair is there.
On the guides themselves the same three look at the other guides: guide_distance() is the
distance to the nearest other guide, near_count() counts the guides nearby. Distances are
measured between roots on the scalp.
1 - smoothstep(0.0, 0.05, guide_distance())
Full strength at a guide, fading out 5 cm away: clump tightly around the guides only.
clamp(near_count(0.01) / 20, 0, 1)
0 where the hair is sparse, 1 where 20 or more hairs grow within a centimetre: frizz only the dense patches.
guide("ffx_side") > 0.5 ? 0.8 : 0.2
Each hair takes its guide's side, unblended -- a hard parting between two sets of guides.
Ramps#
Any name you write in ramp("name", x) is a curve you can draw. A curve appears under the
field: drag its points to shape it, click to add one. x runs along the bottom (0 to 1; outside
that it reads the end), and the curve's height is the value. The curve passes smoothly through
every point and never overshoots them, so a gentle shape stays gentle. A new name starts as the
straight line from 0 to 1 -- ramp("taper", t) reads t until you shape it -- so nothing
changes when you first type it.
0.012 * ramp("taper", t)
Width along the hair: draw how thick it is from root to tip.
$side = ramp("parting", u);
$side * map("density")
Thin the hair across the head with a curve instead of painting.
The curves belong to the modifier: two fields of one modifier that name "taper" share one
curve, and another modifier's "taper" is its own, so the same name can mean different things
in different modifiers. Duplicating a modifier copies its curves. A curve no expression reads any
more is listed at the end of the panel as not used, with a Delete. Curves save with the scene
and go into exported groom files.
Writing your own channel. The Set Attribute modifier stores an expression's result on
each hair under a name, for everything below it to read with attr(). Use it to reuse one
long expression on several settings, or to clump only the long hair (see
Set Attribute). The setting's menu lists the channels the
stack really offers at that point.
When something does not resolve#
If an expression names something that does not exist there -- a misspelt channel, a map that was never made, a misspelt function, a function given too few inputs -- or gives a vector where a setting wants one number, or runs a loop past its limit, the setting keeps the value on its slider. It does not fall to 0 or jump to 1. The field turns red, and its tooltip says what went wrong (the name, the function, "a vector where one number is needed", "a loop ran more than 10000 steps"), so a groom that looks wrong shows you which field to check.
Two places follow their own version of the rule, because "the slider" would be wrong there:
- A Force's Mask that does not resolve leaves the force whole.
- A Force's Code that does not parse, or names something missing, is no force at all; an output the Code never sets is 0.
Force Code#
A Force set to Kind: Custom runs its Code for every point of every simulated hair, once a frame. The Code sets the force at the point:
| Output | Meaning |
|---|---|
$force (a vector), or $force_x, $force_y, $force_z |
The force, in world terms: metres per second of air when Acts As is Air (the hair is dragged toward it, like the wind), metres per second squared when it is Push (an acceleration, like gravity) |
Set it whole or part by part; $force = [2, 0, 0]; and $force_x = 2; are the same force. A
part you set by name ($force_z) is used over that part of $force.
Your own $names are shared between the lines, so work something out once and use it three
times. The Code knows every variable a Force has -- wx wy wz (WP), vx vy vz (V), t,
u v, index, frame, time -- and every function, including swirl(), attr(),
vgroup(), the Force's own map() and ramp() (the maps and curves under its own fields),
and distance("object") / inside("object"): a scene object, read where it is on every
frame, so a force can follow a hand. Damping in one line: $force = V * -4; The Force's Mask
and Falloff still apply on top.
The box under the Code says whether it parses. Load... copies a program in from a file. A Force with a Mask, varying Swirls or Custom Code runs on the CPU.
The Example list at the top of the Force panel fills the Code with one of these to start from (it keeps where the force is placed and how far it reaches):
Sway (Acts As: Air). The hair sways one way, then the other:
# air along X, +2 to -2 m/s every three seconds
$force_x = 2 * sin(2 * time);
Spin (Air). Air turning counter-clockwise, seen from above, around the world's vertical axis, faster further out:
$force_x = -3 * wy;
$force_y = 3 * wx;
Underwater (Push). Water slows every motion and buoys the hair:
$drag = 3;
$force_x = -$drag * vx;
$force_y = -$drag * vy;
$force_z = 7 - $drag * vz;
Float Up (Push). A push up, a little more than gravity, and a slow drift to tip the hair over (straight hair pushed straight up balances like a pencil on its point):
$force_x = 1.5 * sin(1.3 * time + 7 * wy);
$force_y = 1.5 * cos(1.1 * time + 7 * wx);
$force_z = 12;
Wave Across (Air). Bands of wind travelling across the hair along Y, like wind over grass:
$band = 0.5 + 0.5 * sin(8 * wy - 6 * time);
$force_x = 4 * $band;
Swirling Draft (Air). A draft with smooth swirls 15 cm across, stronger toward the tips:
$swirl = 1.2 * t;
$force_x = 1.5 + $swirl * swirl_x(0.15, 1.5);
$force_y = $swirl * swirl_y(0.15, 1.5);
$force_z = $swirl * swirl_z(0.15, 1.5);
Shiver (Push). A fast tremble, each guide on its own beat:
$force_x = 4 * sin(40 * time + index);
$force_y = 4 * cos(37 * time + 2 * index);
Three more examples use the Mask for their timing and reach, with a one-line Code:
| Example | Code | Mask |
|---|---|---|
| Gust Burst | $force_x = 6; |
frame >= 24 && frame < 48 |
| Breathing Breeze | $force_x = 3; |
0.5 + 0.5 * sin(1.5 * time) |
| Tips Only | $force_x = 4; |
t * t |
More ideas to start from:
# a fan 50 cm behind the head along -Y, blowing outward, fading over a metre
$dx = wx;
$dy = wy + 0.5;
$dz = wz;
$d = sqrt($dx * $dx + $dy * $dy + $dz * $dz);
$push = 5 * clamp(1 - $d, 0, 1) / max($d, 0.01);
$force_x = $dx * $push;
$force_y = $dy * $push;
$force_z = $dz * $push;
# a head-turn whip: a sideways push on the tips for half a second from frame 30
$on = frame >= 30 && frame < 42;
$force_y = 15 * $on * t;
Recipes#
Along the hair#
lerp(1.0, 0.1, t)
Width: taper to the tips.
smoothstep(0.0, 1.0, t)
A soft ramp from root to tip.
Across the head#
1.0 - abs(u - 0.5) * 2.0
Full in the middle of the UVs, nothing at the edges.
vgroup("Fringe")
Only where the Fringe vertex group is painted.
Hair by hair#
rand(0.8, 1.2)
Up to 20% more or less, hair by hair.
rand3(0.6, 0.9, clump_id)
Clumping: one tightness per clump.
Clumping: leave the short hair alone#
smoothstep(0.4, 1.0, length / maxLength)
As Clump Amount: clumping fades in with length; hair under 40% of the longest is untouched.
Use length / maxLength, not length: the fraction keeps working when you rescale the
character or change the hair's length. On Clump Amount the expression replaces the slider,
so it must give the amount you want.
Cut#
rand(0, 0.2)
Cut Amount is the share removed, so this keeps 80 to 100% of each hair.
By guide style#
guide_style == BRAID ? 0 : 1
Leave braided hair out (on a Mask, for example).
Simulation (a Force's Mask)#
frame > 30 && frame < 70
On only between frames 30 and 70.
t * t
Felt mostly at the tips.
smoothstep(0.02, 0.15, distance("Hand"))
Nothing within 2 cm of the hand, full strength from 15 cm: the hand shields the hair it is near, wherever it moves.
Pasting from other grooming tools#
Expressions copied from other grooming tools paste as they are, sliders included. A \n
where a line break was is read as a line break, $cLength is length, and a paint map path
such as map('${DESC}/paintmaps/furHead_01_MASK') reads the groom's map called
furHead_01_MASK (FollicleFX maps are names, never files: only the part after the last /
counts). Two things to change by hand:
- Width is a radius here. Where another tool gives the hair's full thickness, halve it.
- A setting's result is one number. A pasted expression that ends on a colour or vector
(
[1, 0.4, 0]) needs one part of it (.x) or a measure (length()).
What the language does not do (yet)#
- A setting takes one number. Vectors work inside an expression and as a Force's
$force; a setting's result is a number. - Neighbours by root only.
guide(),guide_distance()andnear_count()compare roots; they do not follow the hair along its length. In the Strands modifier's own density they have no hair to read yet, so the setting keeps its slider.
Tips#
- Start with a number, then grow it:
0.5, then0.5 * t, then0.5 * t * map("Fringe"). - Use
tfor along the hair,u/vorvgroup()for across the head,rand()for hair by hair,clump_idfor clump by clump. - Keep it in range. Most settings expect 0 to 1;
clamp(x, 0, 1)keeps outliers out. - Give numbers you tune a slider (
$amount = 0.5; #0,1) instead of retyping them. - One long expression on several settings? Write it once with Set Attribute and read it
with
attr().
Next: Texture Masks Previous: Cards Tab
Something wrong or missing on this page? Tell us on Discord or at support@folliclefx.com.