Advertisement

Problem about Super Elastic in Cloth Simulation

Started by November 14, 2002 02:51 AM
3 comments, last by Dickens 22 years, 3 months ago
Hi, I have setup a cloth sim model base on Euler''s method. I use it to simulate long hair for a female human character. However, when the character is moving relatively fast (about 10unit/timestep and the cloth length is just about 5 units). The cloth stretch a lot. I have read X. Provot''s paper, but the method is highly depend on the order of the cloth patricle which I do not know. Anyone know about how to prevent over stretch of a cloth model? Thanks a lot.
The main problem is that if each hair consists of N particles, and the head of the female moves, it will take N Euler iterations before the other end of the hair gets information of the movement of the head. This is because the normal (so called explicit) Euler''s method has only local interactions, that is, every particle only affects its neighbour (or two neighbours).

For hair this problem is easily solved by changing the simulation from parallel to sequential, which is of course more inaccurate but stable and supports much stiffer hair. That is, you first move the "root" hair particle (apply the Euler equations to it), then you move the particle next to it, etc. (there will be some more force computation of course).

There are two good models for this kind of simulation generally. The first one is the backward Euler method (aka. implicit integration), which is explained in Baraff, Witkin, "Large steps in cloth simulation", 1998 (I recommend reading Baraff''s course notes "Implicit methods for differential equations" from SIGGRAPH first).

The other model assumes that the cloth is infinitely stiff, that is, the particles will always stay at the given distance apart. This is called "constrained dynamics", I haven''t implemented it yet, but I''m looking towards it.

Both of these general methods are quite hard because they require forming and solving a huge sparse matrix, which is already another branch of science in itself, but very interesting indeed.

- Mikko Kauppila
Advertisement
If you think that seems a bit hard, just increase the stiffness of the springs and take smaller time steps. Adding damping also helps usually. For small systems, the advantages of implicit integration are smaller because of the high overhead associated with building the sparse matrix. Another idea is to use post stretch correction which works fairly well.
GammaCat: Actually, implicit integration is extremely well-suited for hair, because the matrix has an easy form (tridiagonal or "qvindiagonal"), which is quick to form and fast to solve (O(n)).

Another trick is to modify the normal Euler's method from:

p(n+1) = p(n) + v(n)*dt
v(n+1) = v(n) + a(n)*dt

to:

p(n+1) = p(n) + v(n+1)*dt
v(n+1) = v(n) + a(n)*dt

This is easy to implement in the code (just exchange two lines). This increases stability alot, and also doubles the speed of local interactions in the cloth (bigger time steps possible). All these improvements are connected.

- Mikko Kauppila

[edited by - uutee on November 14, 2002 2:45:08 PM]
Thanks uutee and Gamecats,
yes, I am already using v(t+1) for my model and also increase the stiff value. However,this doesn''t solve the problem of taking N iterations to make the Nth patricle know the movement.

Also I have tried to increase stiff value, but it become really unstable( and it also seem to slow down the effect of gravity, although I donno why)

I will try to use the post stretch correction method in my model.

Anyway, thanks a lot.

This topic is closed to new replies.

Advertisement