Cloth simulation is the numerical computation of how a thin, flexible sheet of fabric moves, folds and drapes under gravity, wind, body motion and contact, so that garments, flags, curtains and sails behave believably on screen. Within 3D graphics & animation, it belongs to the family of physics-based techniques grouped under simulation & effects, next to rigid body, soft body, hair and fluid simulation.
Instead of keyframing every wrinkle by hand, an artist sets up a mesh, material properties and colliders, and a solver advances the cloth frame by frame. The result is usually written to a simulation cache so that lighting and rendering can use the motion without re-solving it.
How a cloth solver moves fabric
A cloth solver treats the garment as a network of point masses connected by constraints. Each vertex of the mesh carries a mass, a position and a velocity, and the edges and triangles between vertices define how far the fabric may stretch, shear and bend before it resists. At every time step the solver gathers external forces, predicts new positions, enforces the constraints and resolves collisions.
Two numerical families dominate production work. Mass-spring and finite-element models compute forces from material laws and integrate them, often with implicit integration that stays stable with stiff fabric. Position-based dynamics (PBD) and its successor XPBD project vertex positions directly onto constraints, which is fast, robust and easy to art-direct; the Vellum solver in Houdini is a well-known example of this approach.
The main stages of one solver step are summarized below.
| Stage | What happens | Why it matters |
|---|---|---|
| Force accumulation | Gravity, wind, drag and force fields are applied | Drives the overall motion |
| Prediction | Velocities update tentative vertex positions | Provides a starting guess |
| Constraint solving | Stretch, shear and bend limits are enforced iteratively | Gives fabric its character |
| Collision handling | Cloth is pushed out of bodies and itself | Prevents interpenetration |
| Velocity update | Corrected positions define new velocities, damping is applied | Controls energy and settling |
Material parameters that define the fabric
The look of a simulated fabric comes mostly from a handful of stiffness, mass and damping values. Silk, denim and leather differ not in shape but in how strongly they resist stretching and bending and how quickly their motion dies down. Parameter names and units differ between applications, so artists usually tune by visual reference rather than by absolute numbers.
The following table lists the parameters found in almost every cloth system and their visible effect.
| Parameter | Controls | Raising it produces |
|---|---|---|
| Stretch stiffness | Resistance to elongation along the weave | Less rubbery, more woven fabric |
| Bend stiffness | Resistance to folding | Larger, rounder folds like leather |
| Shear stiffness | Resistance to diagonal distortion | Less skewed, more stable panels |
| Mass or density | Weight per area | Heavier swing and more momentum |
| Damping | Loss of energy per step | Faster settling, less jitter |
| Friction | Sliding resistance on contact | Cloth clings instead of slipping |
| Collision thickness | Distance kept from surfaces | Fewer intersections, visible gap if too large |
Mesh resolution acts as a hidden parameter. A denser mesh produces finer wrinkles but needs more constraint iterations, and a stiffness value tuned at one resolution often looks different at another. For this reason, many studios lock the resolution early and tune materials afterward.
Collisions, substeps and stability
Collision handling is the hardest and most expensive part of cloth simulation. The solver must detect contact with colliders such as a character body, and it must detect self-collision where fabric touches itself in layered folds. Fast motion is dangerous because a vertex can move through a thin collider within a single frame, a failure known as tunneling.
Simulation substeps divide each frame into several smaller time steps, which reduces tunneling and makes stiff constraints converge. Typical productions use between 2 and 10 substeps per frame, with more for fast action and less for slow drapery. Increasing constraint iterations has a similar stiffening effect but does not cure tunneling, which is a common source of confusion.
Cloth simulation compared with related techniques
Cloth simulation shares its mathematics with several neighboring techniques but targets a thin two-dimensional surface rather than a volume or a set of strands. The comparison below shows where the boundaries lie.
| Technique | Simulated object | Typical use |
|---|---|---|
| Cloth simulation | Thin sheet with stretch and bend constraints | Garments, flags, curtains, sails |
| Soft body simulation | Deformable volume | Jelly, muscles, inflatable objects |
| Hair simulation | Chains of one-dimensional strands | Hair, fur, ropes, grass |
| Rigid body simulation | Undeformable solids | Falling props, debris |
| Pattern-based garment tools | Sewn panels draped on an avatar | Costume design and digital fashion |
Garment design tools such as Marvelous Designer start from flat sewing patterns and drape them on a figure, which makes them ideal for creating clothing. General-purpose solvers in Houdini, Blender, Maya nCloth or tyFlow are stronger for animated shots and effects, so many pipelines model the garment in a pattern tool and simulate the shot in a general solver.
Setting up a cloth shot in production
A reliable setup starts with a clean, evenly triangulated mesh without overlapping polygons, plus a simplified collision proxy for the body. Pinned or attached vertices hold the waistband, collar or flagpole edge, and a pre-roll of several dozen frames lets the garment settle from its modeled pose before the shot begins.
The decision table below summarizes common situations and practical choices.
| Situation | Recommended approach | Reason |
|---|---|---|
| Fast martial arts move | More substeps and thicker collision | Prevents tunneling through limbs |
| Layered costume | Simulate inner layer first, then outer | Simplifies self-collision |
| Crowd of background extras | Low resolution cloth or baked loops | Keeps cost manageable |
| Hero close-up | High-resolution mesh and wrinkle maps | Shows fine fabric detail |
| Real-time game character | Simple GPU cloth with few constraints | Must fit a frame budget |
Finished simulations are written to a cache on disk, often as Alembic or VDB-compatible geometry sequences. Caching separates the expensive solve from lighting, allows non-destructive fixes with sculpt or blend layers and keeps render farms from re-simulating the same motion.
Limitations and common mistakes
Cloth solvers approximate real textiles, so they share recognizable failure modes. Most problems trace back to scale, mesh quality or time stepping rather than to the solver itself.
- Wrong scene scale makes a coat behave like a handkerchief, because gravity and stiffness assume real-world units.
- Interpenetration at the start frame causes explosions as the solver pushes vertices apart violently.
- Excessive damping removes jitter but also makes fabric look slow and underwater.
- Stretchy, rubbery cloth usually means too few iterations or substeps, not too low stiffness.
- Long solve times grow quickly with self-collision, so artists test at low resolution first.
In simple terms
Cloth simulation lets a computer work out how fabric moves instead of an animator drawing every fold. The fabric is treated like a fine net of tiny weights tied together with stretchy threads. When the character walks or the wind blows, the computer calculates how each weight is pushed and pulled.
The artist decides how heavy and stiff the fabric is, what it may touch and how long to wait for it to settle. The key idea is simple: set up the rules, then let physics create the folds.
A practical example
An effects artist on an animated feature must simulate a long wool cape on a hero who leaps from a rooftop. The cape mesh has about 20,000 triangles, it is pinned at the shoulders and it collides with a low-polygon proxy of the body. A pre-roll of 40 frames lets the cape settle before the jump begins.
The first test shows the cape passing through the hero’s arm during the fast landing. The artist raises the solver from 3 to 8 substeps and increases collision thickness slightly, which removes the tunneling. Bend stiffness is raised to give the wool heavier, rounder folds.
The final solve runs overnight and is written to a cache. Lighting artists render the shot the next morning, and the director approves the cape motion without a single hand-animated fold.