|
A 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 The main building blocks of a good cloth simulation are the three kinds of springs:
To illustrate how the different kinds of 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 bend springs (i.e. using only structural and shear springs). The cloth looks decent when fully stretched out, but starts to show signs of poor deformation when it bends. It tends to fold too easily and sometimes even stays folded (e.g. at the end of the video). 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 Related postsLeave a comment: |
|