hr-studioPhysics · 04
A computational design primer · Cloth & Soft Bodies

Things that bend, sag, stretch and wobble.

A rigid body keeps its shape; a soft body gives. The trick is almost the same either way — a soft body is just the particles from before, now tied together by constraints that want to hold a length or an area. Solve those constraints a few times each frame and cloth drapes, rope dangles, and a blob jiggles back into shape. Grab and pull anything.

Scroll to begin
i.

Beads on a constraint

Start with a row of point masses and a single rule between each pair: stay this far apart. Pin one end, let the rest fall, and repeatedly nudge each pair back to its rest length — the chain hangs, swings, and settles like a real rope. No springs to tune, no stiffness to explode; just a distance held, over and over.

Grab any bead and drag the rope around.

A pinned chain of distance constraints
ii.

A grid of them is cloth

Lay those constraints out in a grid — each point tied to its neighbours across and down, plus the diagonals to resist shearing — and you have a sheet, hanging here in three dimensions. Pin the top edge and it drapes; grab it and it folds and creases the way cloth does; turn on a breeze and it billows toward and away from you.

Drag anywhere to pull the cloth; toggle the wind.

Springs in a grid · wind billows it in 3D
iii.

How stiff, and why

Here's the one dial that matters. Each solve pass drags the constraints a little closer to their rest lengths; do it once and the cloth is loose and rubbery, do it many times and it turns crisp and taut. Stiffness isn't a material property here so much as how hard you insist — how many times per frame you enforce the rules.

Slide from floppy to rigid, and pull to feel the difference.

Solve passes = stiffness
iv.

Holding a volume

Constrain a length and you get cloth; constrain an area and you get a balloon. Ring the particles into a loop, keep the perimeter and the enclosed area near their targets, and the shape resists being squashed — press it and it bulges elsewhere to compensate, then springs back. More pressure, firmer and rounder; less, soft and saggy.

Poke and drag the blob; change its internal pressure.

Perimeter + area constraint = pressure
v.

The drape studio

Lift a flat sheet above a solid, let go, and watch the constraints do the rest. The cloth falls, meets the object, and finds its own folds — pooling on the floor, breaking over an edge, or slipping smoothly around a curve. Swap the object underneath, drag it around while the fabric is still draped, and change the resolution of the mesh: a coarse sheet is stiff and faceted, a fine one gathers into real folds. Same rules throughout, just more of them.

Choose an object, press Drop, then drag the object to redrape the cloth.

Press Drop · drag the object · drag the background to turn the view
Tie points together with a rule about distance or area, then keep insisting on that rule, and lifeless dots become fabric, rope, and rubber. Soft bodies aren't a different physics — they're the same particles, listening to constraints.