Sign in to follow this  
andy_s_1

Cloth Simulation Integration methods

Recommended Posts

andy_s_1    122
Hello, i would first like to say I have been reading these forums (which i have found very helpful) and using them for my work so i thought it might be best for me to actually sign up contribute and ask a few questions of my own. so my first questions are: I have started a cloth simulation project which i started off using Euler Integration, which to no surprise turned out useless for what i needed, with constant cloth explosions i needed to change the integration method, so i looked around and found out about the Runge-Kutta method which i tried to implement. but to be honest i have had nothing but trouble trying to implement this method. Looking around these forums people have been saying that the Verlet integration method is a good one to choose, now my question is this. What are the pros/cons of using these 2? which one will be more stable? i am not intending to use this simulation for realtime at the present so speed is not a factor just yet! Many thanks for your time :) Andrew

Share this post


Link to post
Share on other sites
Eelco    301
If time is not an issue, then why not just stick with euler (the NSV variant preferably)?

Newmark integration is the best there is afaik if you want much bigger timesteps, but thats quite a lot more involved than just explicit integration.

Share this post


Link to post
Share on other sites
Alrecenk    400
Quote:

with constant cloth explosions i needed to change the integration method

There are lots of reasons the cloth might explode that do not have to do with the integration method. For instance, if you handle collission response too quickly or don't apply friction correctly, or maybe you just need to use a smaller timestep. I have gotten a cloth working using euler. The integration you use largely depends on what you expect your cloth to do. Verlet for instance is probably good for a stiffer cloth and it is easier to resolve complex collissions using verlet, but if you aren't doing complex collissions euler is of course the easiest to implement. I've never done any RK myself, but I think I read somewhere that the primary advantage to RK methods are the higher order of stability. However, collissions are of infinite order so RK4 is not going to help too much with stability for collissions. However, if you're applying a vector field for acceleration or velocity(maybe for wind or something) I think RK will be more accurate. No matter what you use though you will probably have to do a considerable amount of number tweaking to get a decent simulation. Also, if time is less of an issue a smaller timestep should increase stability. My suggestion is that if you have the time just try them all.

[Edited by - Alrecenk on December 16, 2006 9:40:19 PM]

Share this post


Link to post
Share on other sites
Gagyi    192
Using euler to animate cloth makes it look elastic, and hard to do, because it is not stable, and you have to add much damping.
Verlet instead is extremely stable (there is no speed stored actually, and no such thing as spring constant), and makes cloth look like realistic and not like rubber. It is fast too, and easy to implement.
There are a couple of cloth physics articles on this site, you shhould take a look at them. And gamasutra has some good resources too. ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this