soft body and kinematic rigid body - penetration issue

User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: soft body and kinematic rigid body - penetration issue

Post by Erwin Coumans »

The collision detection between cloth/rope/soft bodies and rigid bodies is based on the vertices (nodes) of the soft body,
so it is easy to miss collisions when the collisions happen at the edge (between nodes).

If the kinematic object stretches the softbody too much, causing deep penetration, collisions might be missed. This means that you have to tesselate into many vertices/nodes, and create weaker links.

Adding anchors is quite a good idea actually. Another workaround is to attach rigid body capsules to the links of the softbody.
Thanks,
Erwin
gjaegy
Posts: 178
Joined: Fri Apr 18, 2008 2:20 pm

Re: soft body and kinematic rigid body - penetration issue

Post by gjaegy »

Erwin,

thanks for your answer, I thought I would never get one - I know you might be very busy, so this one is really appreciated !

Anyway, I think I will then go for the anchor solution. Increasing the number of vertices doesn't seem to be a good idea, as it would slow down the simulation (already > 4k vertices).

I am not sure what you mean by attaching a capsule. Should I create the capsule from the beginning, when I create the soft body ? I guess this should be done by creating two anchors between each capsule and the two nodes belonging to the link, am I right ?

Also, shouldn't the clusters solve this missing collision issue ?

BTW, I have noticed that normals are not updated when using tetras instead of faces (not sure this is a missing feature actually - as i guess the tetras vertices might not be coplanar).

THANKS for your answer :D
gjaegy
Posts: 178
Joined: Fri Apr 18, 2008 2:20 pm

Re: soft body and kinematic rigid body - penetration issue

Post by gjaegy »

I still wonder if the problem is due to some collision being missed; I increased the kinematic shape margin to a very big value (2.0) and they are still there.

Therefore I am not sure if my issue is due to that, or if the link force computed (computed in PSolve_Links()) doesn't get so big compared to the rigid body collision force (PSolve_RContacts()) that the second one isn't significant enough anymore ? I tried to find a way to have the second one (PSolve_RContacts) taking over the first one in all cases, but couldn't find a solution.

Erwin, you are sure that my problem is due to the first option (missing contacts), right ? As it works when I manually add anchors, you might be right !
neothemachine
Posts: 2
Joined: Tue May 17, 2011 7:55 pm

Re: soft body and kinematic rigid body - penetration issue

Post by neothemachine »

I am facing the same problem now. I have a cloth hanging down where the top two edges are fixed and the bottom two are loose. And when I drag a box towards the cloth, it pushes a bit against it but very soon penetrates it and goes through. Why?

I don't know why it works there but this recent example from Jitter is perfect: http://code.google.com/p/jitterphysics/ ... p&can=2&q=

Maybe someone can figure out where the differences are? I think that's quite an important issue and maybe it's solved there?

Thanks for taking time
neo