Fast Simple Cloth Simulation using

 Jacobi/Gauss Seidel Relaxation and Verlet Integration Physics

 

Jon Davis-Marsh

CSC 471 Spring 2004

Zoë Wood

 

Project Description

 

The essence of the project was to simulate a fast, believable cloth and its motion.  To do this I created a particle system based on the literature I found by the head of R&D Thomas Jacobson of IO Interactive.  He discusses the workings of an Advanced Character Physics he used in the making of IO’s game Hitman: Codename 47.

 

Once I had created a working particle system I made 45x45 square of points and assigned a Quad to each square in the system.  Each quad was then textured using the BMP and normals calculated for proper lighting.  I cannot stress enough how much proper lighting technique can transform a seemingly 2D object like a cloth into a beautiful 3D object.  It was mostly because of lighting that my cloth “looks” cool.  The physics “is” still cool, but physics only sales if you can see it in fantastic motion, not sloppy action.

 

I have included below links to a zipped executable.  Enjoy!

If you would like to offer me a job email me at jdavisma at calpoly dot edu.

 

The EXE

        CLOTH POWER.zip

 

Users Guide

 

            <> 'r' = Reset the program

            <> 's' = Step through the animation

            <> 'a' = Start the animation

            <> 'n' = Toggle drawing of cloth normals

            <> 'p' = Toggles drawing of single point cloth particles

            <> 'f' = Toggles drawing of textured cloth faces

            <> '1' = Pin cloth to clothesline

            <> '2' = Let cloth fall from clothesline

            <> '3' = Rotate perspective left

            <> '4' = Rotate perspective right

            <> '5' = Zoom in

<> '6' = Zoom out

            <> 't' = Rotate through 10 different cloth textures

            <> '+' = Increase “spring constant” between cloth points

            <> '-' = Decrease “spring constant” between cloth points

<> ']' = Increase physics time step value

<> '[' = Decrease physics time step value

            <> 'q' or 'Q' = Quit the program

 

 Sample Screen Shots

 

Picture 1.  Typical fall cloth texture (Restrained).

 

Picture 2.  Typical fall cloth texture (Unrestrained).

 

Picture 3.  Successive zoom shots to show that the same texture is mapped to each quad.

 

Picture 4.  Normal vector drawn for each quadrilateral face.

 

Picture 5.  Dots represent the vertices of the particle system.

 

Resources

 

This is a great resource for free textures:

http://infinitefish.com/textures/

This man is the bomb.  Not only is his Physic described here awesome, but it is very very simple to understand and implement.

http://www.ioi.dk/Homepages/thomasj/publications/gdc2001.htm

This is a helpful link to understand some of the math that Thomas Jacobson Refers to in his Advanced Character Physics document.  Specifically numerical methods for solving linear systems of equations.

http://mathworld.wolfram.com/

This site has some very helpful information about C++.  The tutorials are nice, especially the section on operator overloading in order to right a robust 3D Vector class.

http://www.cplusplus.com/

Here is an interesting paper on cloth modeling.
 http://graphics.snu.ac.kr/~kjchoi/publication.htm