← Explore
Cloth and fabric
GPU cloth simulation technology demo: a gusty canvas flag, a scallop-pinned silk banner, a velvet curtain with a pendulum ball swinging through it, and a linen tablecloth draping over a sphere — all Verlet + constraint physics on compute shaders, rendered through a two-sided fabric shader with procedural weave and sheen.
About this world
Cloth and fabric
A technology demo of real-time GPU cloth simulation in Zero.
Exhibits
- Canvas flag — pinned along the pole, banded dye, strong gusty wind with form-drag response.
- Silk banner — scallop-pinned to a frame, gradient dye, low-roughness fabric with a cool grazing sheen.
- Velvet curtain — a pendulum ball swings through it every few seconds; the ball is mirrored into the simulation as a live sphere collider, so the cloth hooks, carries, and releases.
- Linen tablecloth — checkered sheet that free-falls onto a display sphere, drapes with contact friction, and re-drops on a timer via a GPU-side grid reset.
Technology
clothmodule: any number of cloth sheets in one shared GPU particle domain — Verlet integration, 11 Jacobi constraint iterations per frame (structural / shear / bend springs), pin presets, per-cloth wind + friction + sphere/ground colliders. Grids (re)initialize analytically on the GPU; the CPU never uploads particle data.- Three compute passes (
cloth_step,cloth_constrain,cloth_vertices) write each cloth's mesh vertex buffer directly — positions, smooth normals, and procedural pattern colours (bands / checker / gradient / border) — rendered as one live mesh per cloth. fabric_surfaceshader: two-sided PBR lit from the viewer-facing normal, per-vertex pattern colour, procedural thread weave, and a grazing-angle sheen term configured into four materials (canvas, silk, velvet, linen).
Enter play mode to run the simulation.
Comments · 0
Open discussion — no rating attached. Ask questions, swap notes, follow threads.
Sign in to join the discussion.