SoftBody Collision Group

PaladaEX
Posts: 2
Joined: Fri May 29, 2009 12:11 pm
Location: São Paulo - Brazil

SoftBody Collision Group

Post by PaladaEX »

Hello everyone, i´m new on Bullet and i´ve an problem.

I´m using masks for Collision filtering of rigid bodies, no problems with that. But when i add a softbody in the world i don´t know how to add a mask to this new object. Therefore he doesn´t collides with anything. Can someone enlighten me in this subject? There is a way to continue using masks for my rigid bodies and add a softbody?
Candacey
Posts: 1
Joined: Tue Aug 04, 2009 7:18 pm

Re: SoftBody Collision Group

Post by Candacey »

We are the same PaladaEX. I am also new to Bullet and I am still wondering a lot of things about it. I am hoping that someone could answer your question.


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

Re: SoftBody Collision Group

Post by Erwin Coumans »

The latest Bullet 2.75 RC6 supports collision masks for soft bodies, as optional arguments:

Code: Select all

void	addSoftBody(btSoftBody* body,short int collisionFilterGroup=btBroadphaseProxy::DefaultFilter,short int collisionFilterMask=btBroadphaseProxy::AllFilter);
Hope this helps,
Erwin
adtpg
Posts: 10
Joined: Wed Aug 05, 2009 6:50 pm

Re: SoftBody Collision Group

Post by adtpg »

Greetings,

I noticed this method was missing in the 2.74 area and added it myself. Is there more code behind the scenes than just adding it with the flags though? Diffing through the soft body files I didnt come across anything. I'm hesitant to update to the RC since we have a lot of custom code throughout.

Thanks
adtpg
Posts: 10
Joined: Wed Aug 05, 2009 6:50 pm

Re: SoftBody Collision Group

Post by adtpg »

Also I noticed in the cloth demo :


///register some softbody collision algorithms on top of the default btDefaultCollisionConfiguration
m_collisionConfiguration = new btSoftBodyRigidBodyCollisionConfiguration();


m_dispatcher = new btCollisionDispatcher(m_collisionConfiguration);
m_softBodyWorldInfo.m_dispatcher = m_dispatcher;

////////////////////////////
///Register softbody versus softbody collision algorithm


///Register softbody versus rigidbody collision algorithm


Are these last comments like a todo on our part?
adtpg
Posts: 10
Joined: Wed Aug 05, 2009 6:50 pm

Re: SoftBody Collision Group

Post by adtpg »

Well, found my problem. We have custom collision algo overrides, and when upgrading to include the soft body stuff, I forgot to change out the overrides. Thus in runtime it couldnt find the virtual.