Write Attribute
Last updated 7 November 2026
Add it from the Groom Stack tab.

| Without | With |
|---|---|
![]() |
![]() |

Every other modifier changes the shape of your hair. This one changes nothing you can see. It works out a number for each strand and stores it under a name, so that the modifiers below it can be driven by that number.
That sounds abstract until you want something specific, so here is the thing people ask for most.
Clumping that leaves the short hair alone#
You have long hair with a shorter layer under it, and clumping is dragging the short strands into clumps they should not be part of. You want the long hair clumped and the short hair left where it is.
Two fields, then one pick:
1. Add a Write Attribute modifier above your Clump.
| Field | Type this |
|---|---|
| Attribute | hair_length |
| Value | length / maxLength |
Method — What the value is

Method — What the value is


Min — The smallest random value

Max — The largest random value

Seed — Another seed gives every hair a different random number

Normalised — On: 0 for no length, 1 for the longest hair. Off: the length itself

Axis — Which axis of the scalp's own space

Coordinate — Which UV coordinate

Fit to Range — Stretch the values so the smallest becomes Range Min and the largest Range Max

Range Min — What the smallest value becomes

Range Max — What the largest value becomes

Mask — Where this applies: 1 everywhere, 0 nowhere. A masked-out hair keeps the value it had above


Min — The smallest random value

Max — The largest random value

Seed — Another seed gives every hair a different random number

Normalised — On: 0 for no length, 1 for the longest hair. Off: the length itself

Axis — Which axis of the scalp's own space

Coordinate — Which UV coordinate

Fit to Range — Stretch the values so the smallest becomes Range Min and the largest Range Max

Range Min — What the smallest value becomes

Range Max — What the largest value becomes

Mask — Where this applies: 1 everywhere, 0 nowhere. A masked-out hair keeps the value it had above

The line under the Attribute field will say Written as "ffx_hair_length". That
prefix is added for you; it is what the name is called everywhere else.
2. On the Clump modifier, click the chip beside Clump Amount and choose Attribute, then pick "Hair Length" from the list.
That is it. Every strand now clumps in proportion to its own length: the longest hair gets the full amount, a strand half as long gets half, and the shortest barely moves.
What the numbers do#
length is how long that particular strand is. maxLength is the longest strand
in the groom. Dividing one by the other gives you 0 to 1 — a fraction rather than
a measurement — so the result keeps working when you scale the character or
change the hair length. Typing length on its own would work too, but it is in
world units and you would have to retune it every time anything moved.
For a harder cut-off rather than a fade, clamp it:
clamp(length / maxLength - 0.5, 0, 1) * 2
Everything shorter than half the longest strand is now left completely alone.
What else it can store#
Anything you could type into an expression field. A few that come up:
| Value | What you get |
|---|---|
length / maxLength |
how long this strand is, 0 to 1 |
rand(index) |
a fixed random number per strand, the same on every frame |
rand(clump_id) |
one random number per clump, shared by every strand in it |
v |
how far up the scalp the strand is rooted |
vgroup("Thinning") |
a weight group you painted in Blender |
map() |
a texture bound to this row |
attr("ffx_hair_length") * 0.5 |
half of an attribute an earlier Write Attribute made |
The last one is worth noticing: these stack. One Write Attribute can read what another wrote, so you can build up something complicated in readable steps instead of in one enormous expression.
See FollicleScript Expressions for everything that is available.
Where you put it matters#
The modifier reads your hair as it is at that point in the stack. Clump, Coil and Cut all change how long a strand is, so a Write Attribute above your Clump records the length before clumping and one below it records the length after. Both are useful; they are just not the same number.
Only the modifiers below it can use the attribute. If you pick it on a modifier that sits above, the list shows the name greyed out and tells you which modifier makes it — move one or the other.
When something is not working#
The name is not in the picker. Either the Write Attribute is below the modifier you are trying to drive, in which case the list will say so, or one of its two fields is empty. Both have to be filled in.
The picker shows the name but nothing changes. Check the line under the
Attribute field for the real spelling. If you typed hair length with a space,
the attribute is called ffx_hair_length and that is what the picker lists.
Nothing happens and the row says the binding is broken. The Value expression
contains a name that does not resolve — usually an attr() or vgroup() that is
misspelt or does not exist here. When that happens the attribute is deliberately
not written at all, so the modifiers below fall back to their own sliders.
That is on purpose: the alternative is storing a column of zeros, which the next
modifier would happily read, silently turning its setting off across your whole
groom.
Your Clump slider does nothing now. Expected. An expression or an attribute replaces the slider on that row, it does not scale it. Write the amount you actually want into the Value field.
A note on ordering#
Adding a Write Attribute you have not filled in changes nothing at all — you can park one in a stack while you decide what to put in it, and your groom is untouched until both fields have something in them.
Something wrong or missing on this page? Tell us on Discord or at support@folliclefx.com.

