About Me

Friday, July 3, 2009

Cloth Simulation

The implementation of the simulation is based on this article appeared on Gamasutra in 2003.

A common model for simulating Real-Time Cloths consists of a system of interconnected springs and particles. The corresponding system of ODE suffers of instability in presence of stiff springs (especially when solved with an explicit integrator). On the other hand weak springs lead to elastically looking, bouncy cloths.

The alternative proposed in the article consists of modeling the cloth over a set of constrained particles, where the constraint is the distance between adjacent particles. The corresponding over-constrained linear system of linear equations is solved through a Gauss-Siedel Relaxation. The absence of the spring equations in the model leads to a quite stable simulation.

Collisions are handled projecting the particles out of the external bodies, perpendicularly to the contact direction.