Back To Home Page  
 
CURRENTLY VIEWING
CLOTH
Created a simple cloth simulation using a series of springs and length constraints
YEAR
TYPE
EFFORT
2008
Personal
Solo
Cloth
     + Introduction
     + Technical Details
@ Projects > Simulations
SECTION MENU
     + Stable Fluid (2008)
     + Cloth (2008)
     + Chain (2008)
     + Slinky (2008)
     + SPH2 (2008)
     + Multi-Type Collision (2008)
     + Soft Body Using Springs (2008)
     + Pressurized Soft Body (2008)

Introduction

A simple cloth simulation written using Microsoft XNA 3.0. This uses a series of springs (structural, shear and bend springs) and constraints. The two top corners of the cloth is pinned using a point constraint and can be controlled by the user.


Video showing a simple cloth simulation in action

Back To Top Back To Top


Technical Details

The main building blocks of a good cloth simulation are these three kinds of springs:

  • Structural springs: These are the main springs in the cloth that are placed along each quad edge
  • Shear springs: These are springs which helps maintain the diagonal shape of the cloth and are placed along the two diagonals of a quad
  • Bend springs: These are springs which help to control the bending of the cloth and are placed like the structural springs but connects vertices that are two vertices apart

To illustrate how these springs are important, I have created some videos to show how the cloth will look like without some of them.

The video below shows how a cloth simulation will look like without using shear and bend springs (i.e. using only structural springs). The cloth tends to lose its shape very easily, as can be seen when the two corners are brought close together.


Cloth simulation without shear and bend springs (i.e. using only structural springs)

The video below shows how a cloth simulation will look like without using shear and bend springs (i.e. using only structural springs). The cloth tends to lose its shape very easily, as can be seen when the two corners are brought close together.


Cloth simulation without using bend springs (i.e. using only structural and shear springs)

Constraints are another important building block of a good cloth simulation. Length constraints help to maintain the distances between the vertices and can be thought of as a spring of infinite stiffness. The video below shows how a cloth simulation will look like without using length constraints. The cloth tends to be very elastic and quite unstable as the different springs fight against one another.


Cloth simulation without using length constraints

Back To Top Back To Top

 
CG:SKEELOGY
ABOUT ME
I have experience with physics simulation programming, character rigging and R&D on anatomical and deformable models. In my free time, I work on small personal projects such as casual games and tools development.
MY OTHER SITES
SUBSCRIBE TO SITE
SHARE THIS PAGE
Site best viewed with
IE 6.0+ and 1024x768+.