Softbody drifting when self collisions enabled !!!! Help!!

winspear
Posts: 77
Joined: Thu Nov 26, 2009 6:32 pm

Softbody drifting when self collisions enabled !!!! Help!!

Post by winspear »

Whenever I enable the self collisions for soft bodies, they start drifting like crazy. Here are the collision flags used.

Code: Select all

psb->m_cfg.collisions = btSoftBody::fCollision::CL_SS+
		btSoftBody::fCollision::CL_RS + btSoftBody::fCollision::CL_SELF;
When I remove CL_SELF from the above line, the drifting stops.
Anyone know what I am doing wrong here.

Thanks
You do not have the required permissions to view the files attached to this post.
winspear
Posts: 77
Joined: Thu Nov 26, 2009 6:32 pm

Re: Softbody drifting when self collisions enabled !!!! Help

Post by winspear »

Not sure if there are other ways to fix this but I found that I can control the drifting by adjusting 2 factors.

1. Number of clusters (adjusting generate clusters). The drifting linearly increases with the number of clusters.
2. Position solver iterations (piterations). The drifting decreases linearly with increase in solver iterations.

BUT, you will have to find the sweet spot for both the above factors for your soft body simulation to run smoothly without artifacts.

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

Re: Softbody drifting when self collisions enabled !!!! Help

Post by Erwin Coumans »

The reason is collisions between closeby collision clusters. The self-collision support is very basic and doesn't deal properly with this case, so the only workaround is trying to fix it at soft body creation time.

Thanks,
Erwin