Cloth
Real mass-spring cloth on the layer's outline. Pin an edge, add wind, press play.
Cloth treats the layer's outline as a chain of point masses joined by springs, and simulates it under gravity and wind. Pin an edge and the rest sags, swings and settles the way fabric does.
It animates itself — there are no keyframes. The simulation is deterministic: it re-runs from time zero with a fixed step, so what you see while scrubbing is exactly what renders.
When to reach for it#
- Flags, banners, capes, curtains, hanging signs.
- A ribbon that reacts to a gust instead of following a drawn curve.
- Anything that should have weight rather than a designed motion.
How it works#
The solver is the standard mass-spring model: structural springs hold the spacing between neighbouring points, bend springs resist folding, and a few passes of position correction each step stop the springs stretching past their limit.
One thing here is not in the textbook, and it matters. A cloth mesh is a sheet; a layer's outline is only a perimeter, and a bare perimeter under gravity has nothing holding its width — it collapses into a vertical line within about a second. Shape memory is a weak spring from each point back to where it started. It is the outline's memory of being a banner. Turn it to 0 for true rag physics; leave it near 0.3 and a flag flaps while staying a flag.
Parameters#
Which edge is nailed down. Left edge is the flagpole case. Top corners is bunting — the middle sags between two fixed points. Nothing free-falls, which is what you want for a dropped cloth and nothing else.
Downward acceleration in pixels per second squared. 900 is roughly earthlike at typical canvas scales. Negative makes the layer float upward, which is how you do smoke or a balloon.
A steady sideways push. On its own it just leans the cloth to one side; the movement comes from Gust.
How hard the wind varies. This is what makes a flag flap rather than lean. Around half the Gravity value gives a lively flag.
How often the gusts change, in hertz. Below 0.5 reads as slow rolling waves; above 3 as a shudder.
How strongly each point is pulled back to where it started. 0 is rag physics — the shape will collapse under its own weight. 0.3 keeps the silhouette readable while it moves. Above 0.7 the cloth barely leaves its rest pose.
How much of each spring's error is corrected per pass. Low values let the cloth stretch like jersey; 1 with several iterations behaves like canvas.
Velocity lost per step. Near 0 the cloth keeps swinging for a long time. Above about 0.2 it moves as though underwater.
Multiplies every spring's rest length. Above 1 the fabric is loose and gathers; below 1 it is under tension and pulls itself taut.
Spring-correction passes per step. More is stiffer and more stable, and costs proportionally more. 3 is the useful default; 6 or more is for cloth that must not stretch at all.
Blends between the rest shape and the simulated one. Keyframe it to fade the simulation in.
Changes the gust pattern. Two flags side by side with the same settings and different seeds will not flap in unison, which is the giveaway you are trying to avoid.
Recipes#
A flag that flaps
- Draw the flag as a rectangle.
- Add Cloth and set Pinned to to Left edge.
- Gravity around 300 — a flag in wind hangs less than a curtain does.
- Gust around 400, Gust speed 1.
- Shape memory 0.3. Play from the start.
Always play from time zero. The simulation starts at the rest pose and builds from there, so jumping straight to the middle of the timeline runs the whole thing to catch up — correct, but it takes a moment the first time.
Things that catch people out#
Cloth is a vertex simulation, so it works on shape and vector layers. Convert text to vector first — the panel offers the button when it detects this.
A Verlet simulation cannot be run in reverse. Playing forwards only ever integrates the frames since the last one, which is cheap; jumping backwards re-runs from the start, which is a fraction of a second at typical timeline lengths but is not free.
The first frame is always the rest pose. If you need the cloth to already be moving when the shot starts, keyframe the layer to appear a second in, or accept the first half-second as settling time.
See also#
Something here wrong or missing? Tell us in the community.