SV: SV: [ODE] Particle/cloth/skeleton (was: Re: Choleski factorization)
Joakim Eriksson
jme at snowcode.com
Mon Mar 24 03:35:02 2003
> > If you do it wrong the body would simply
> > pass through the cloth when it has a high enough speed.
> > And that would sort of break ode in a way. Then you would be
> > forced to think about max speeds and such
>
> This is a danger that ODE already has, though. Geoms can
> cheerfully pass through each other if they're going fast
> enough, are thin enough in one dimension, and your collision
> detection steps are infrequent enough, requiring hacks with
> rays and ccylinders for bullets, etc.
>
Yes but that can be fixed with time extruded collision. However
when it comes to the cloth you wont even need to be moving fast
to mess it up. It would be enough to just push an object through it.
Take a square cloth and lock each corner to the world so it forms
a sort of safty net. Now let a rigidbody fall into that net.
Because the integration loop most likely will look like this
- Find collisions
- Solve LCP
- Solve "verlet" distance constraints (Thats the cloth)
- Integrate cloth and rigid bodies
Then the collision is found between the body and the cloth. The
cloth gets to react on the body (and apply force to the body).
Then you need to run the constraints in the cloth. Now because
the cloth doesnt know about the rigidbody he will happly adjust
the cloth so it goes through the rigidbody. This happen when
you simply streach the cloth enough. You dont even need any
high velocity for it to happen.
There are a few solutions to the problem. One would be to time
extrude the cloth. But that would be very slow. The other is to
create distance constraints at the collision points. But you would
also have to adjust the mass of the cloth during the normal collision
step otherwise it would still pass through. That also means you
have to calculate how streached the cloth is at any given point.
Well.. simply to say it would get messy.
If anyone has a robust solution to this problem then I'm happy to
hear about it.
/Joakim E. - http://www.planestate.net