Cloth

Drape, fold and flutter any mesh in real time (flags, capes, banners, tablecloths), pinned where you choose and colliding with the rest of the scene.

The Cloth Sim node turns an input mesh into fabric. Every edge of the mesh becomes a stretch constraint and every pair of neighbouring faces becomes a bend constraint, so the surface keeps its shape while folding and rippling. It runs on the GPU and plays back live.

Feeding it a mesh

Wire any mesh into Cloth Sim. The resolution of that mesh is the cloth resolution: a denser mesh folds into finer wrinkles and costs more to cook, a coarse mesh gives big, loose folds cheaply.

Like every simulation, cloth lives inside a time-driven loop and advances only while playback is running. Scrubbing the timeline re-simulates from the start, so what you see is a true result rather than an approximation.

Start coarse. Get the drape and the timing right with a low-resolution mesh, then raise the resolution once the motion is right. Re-cooking heavy cloth on every tweak is the slowest way to work.

Stretch and bend

Stretch, the distance between connected points, controls how stiff or stretchy the cloth is. Stiff stretch reads as canvas or leather, loose stretch as jersey or rubber sheet.

Bend, the angle between neighbouring faces, controls how easily it creases. Low bend gives silk that folds into tight wrinkles, high bend gives cardboard that resists folding.

Those two dials cover most fabrics. Push gravity and damping to set weight and how quickly motion settles.

Pinning

Cloth usually needs holding somewhere: a flag on its pole, a curtain on its rail, a cape at the shoulders. Pinned points are locked in place and the rest of the cloth hangs and swings from them.

Pin by giving the held points zero mass. Select the points to anchor upstream, with a bounding region or an Expression, and set their mass to zero before the cloth node. Everything else falls under gravity. A flag is a grid pinned along one edge, a hanging banner is pinned along the top, and a trampoline is pinned all the way around the border.

Colliding with the scene

Cloth collides against colliders in the scene: rigid bodies, the ground plane, soft bodies, and other cloth. It also collides with itself, so folds stack instead of passing through each other.

Add static collision shapes with the Physics Collider node, or wire a Distance Field in as a collider for arbitrary shapes. Anti-tunnelling is always on, so fast-moving cloth will not shoot through thin objects.

Pushing it around

Anything that moves particles moves cloth.

See also