Mass–spring topology
Structural springs for stretch resistance, shear springs for diagonal stability, and flexion springs for bending resistance across the particle grid.
Computer graphics · UW CSE 457 final artifact
A real-time mass–spring cloth solver built in Unity, combining stable integration, stretch constraints, configurable pinning, collision response, and interactive wind.
The solver
I modeled the cloth as a grid of particles connected by three spring families. Structural springs resist stretching, shear springs stabilize diagonal deformation, and flexion springs resist bending.
Each frame accumulates spring and global forces, advances non-fixed particles with Verlet integration, resolves collisions and overextension constraints, and writes the corrected positions back to the rendered mesh.
Fixed-point rules support several pinning configurations. The loop also integrates the project’s collision and surface-aware wind utilities, including turbulent gusts and real-time direction and strength controls.
Implementation
Structural springs for stretch resistance, shear springs for diagonal stability, and flexion springs for bending resistance across the particle grid.
Spring forces pull particles together when stretched and push them apart when compressed, using rest length, stiffness, and spring direction.
Verlet integration plus an overextension constraint that corrects springs before unrealistic stretching destabilizes the cloth.
Per-frame pipeline: force accumulation, integration and collision handling, constraint resolution, then mesh-vertex updates.
Fixed-point detection for multiple pinning patterns, with the provided collision and wind helpers integrated into the simulation loop.
Simulation scenes