Tanja Munz

Science meets Art

Animation Software Engineering - Cloth Simulation

The goal of my first project at Bournemouth University was the implementation of a software system for cloth simulation.

A rectangular piece of cloth is modeled using a mass-spring system. By taking internal and external forces into account the deformation of the cloth is achieved. These forces include spring forces, damping, gravity and wind. For integration over time the Euler integration method is used. It is possible to use constraints presets to get simulations for cloth that is fixed at one or multiple points or edges like a towel hanging on a clothes hook or a table cloth resting on a table. Collision handling works for simple obstacles (spheres and cuboids).

The tool is implemented in C++ using OpenGL and the NGL library for the visualization of the cloth and Qt for the user interface. The Doxygen documentation style is used. Git is used as version control system.

Examples for fixing the cloth at different positions:

ClothSimulation_2 ClothSimulation_1

Influenced by wind forces:

ClothSimulation_wind_1 ClothSimulation_wind_2

Collision with simple obstacles:

ClothSimulation_collision_1 ClothSimulation_collision_2 ClothSimulation_collisino_3 ClothSimulation_collision_4

In this video different scenarios for the implemented cloth simulation are shown: behavior by fixing the cloth at different positions, collision with spheres and cuboids as well as wind influence.

This publication is used as base for the implementation: Provot, Xavier. Deformation Constraints in a Mass-Spring Model to Describe Rigid Cloth Behavior. Graphics Interface. 1995.