animation, graphics, games, and other projects

Real-time Cloth Simulation

This project was an exploration of doing cloth simulation efficiently in real-time using a mass spring system. The cloth is simulated and collided against cylinders driven by optical motion capture data (Acclaim format). The simulator was developed under Linux using gcc and the FLTK windowing toolkit. It has the following major features:

  • Simulate shear, bend, and structural forces in cloth in addition to gravity
  • Collision detection against the character and response using penalty functions
  • RK4 numerical integrator to step simulation forward
  • Ability to attach (or constrain) cloth to any body part
  • Simple particle system “wired” with various types of springs


Download movie of Cloth Sim. Results (~5mb)