Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Apr 20, 2011 12:43 pm 
Offline

Joined: Tue Feb 22, 2011 1:00 pm
Posts: 32
Hello everyone,
I have a problem. I use in my app. btGImpactMeshShape's, and soft bodies. I found that btGImpactMeshShape's do not collide with softBody shapes. However, if I create a bullet shape, for example Cylinder, it collides with the softBody. How can I do btGImpactMeshShape's to collide with soft bodies, anyone?

Thank you!


Last edited by XMight on Wed Apr 27, 2011 1:12 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Apr 20, 2011 3:16 pm 
Offline

Joined: Tue Feb 22, 2011 1:00 pm
Posts: 32
XMight wrote:
Hello everyone,
I have a problem. I use in my app. btGImpactMeshShape's, and soft bodies. I found that btGImpactMeshShape's do not collide with softBody shapes. However, if I create a bullet shape, for example Cylinder, it collides with the softBody. How can I do btGImpactMeshShape's to collide with soft bodies, anyone?

Thank you!


I found that there exists an algorithm: btSoftBodyConcaveCollisionAlgorithm that theoretically must do what I need, but I don't know how to use it. It is used by default in SoftBodyRigidBodyCollisionConfiguration or I must register it somehow? Coz there is no such method, like in the case of btGImpact btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher);

EDIT: I see that this algorithm is used in btSoftBodyRigidBodyCollisionConfiguration. However, the concave dynamic rigid bodies can pass through the soft bodies, even if they can slightly change the position of the soft body. Is this a configuration issue, or what? How can I change so that rigid bodies not pass the soft ones and inverse?


Top
 Profile  
 
PostPosted: Thu Apr 21, 2011 11:34 am 
Offline

Joined: Tue Feb 22, 2011 1:00 pm
Posts: 32
Doing some work of the kind "try and see what you obtain", I found that collision detection of btGImpactMeshShape with a softBody does not work in the case when I register btGImpactCollisionAlgorithm. However, if I use btGImpactMeshShape's without registering the collision algorithm, soft bodies do collide with concave objects correctly, but obviously the collision between btGImpactShapes is very very slow.

Also, the collision happens only if I set the margin to 0.5 (bullet default is 0.04)

Someone can explain why this happens and what can I do about it? Please Admins, or developers of Bullet :)


Top
 Profile  
 
PostPosted: Tue Apr 26, 2011 12:39 pm 
Offline

Joined: Tue Feb 22, 2011 1:00 pm
Posts: 32
Here is what I discovered during these days of using Bullet. There is the explanation, and some remarks.

There are two ways to do collision between rigidBody and soft body (that I discovered):
1. register only VF_SS, but in such case no btGImpactCollisionAlgorithm must be registered, otherwise no collision between soft and rigid from mesh will be done. Also no clusters must be used. Better simulation. No collision between concave rigid bodies will be present.
2. register CL_SS + CL_RS, generate clusters, and m_kLST = 1.0f (material) must be used. btGImpact collision algorithm can be used, thus all objects will collide. Worse soft body simulation than in the point1, but maybe this is because I used the same parameter values for the softBody configuration and material.

Remarks: 1. Every object in the scene must have the mass set depending on the volume of the object, but how to calculate this for the models that are imported from different model files, I don't know.
2. The value of the force applied to the soft body must be based on the mass of the whole object. Otherwise the simulation may become unstable, objects blow up and disappear.
3. Bullet mixes up my vertex indexes at the creation of the softBody from a trimesh, so if I want to apply a texture on the softBody, it will not be applied correctly. I didn't figure for the moment how to correct this. The only thing I can think about is to create a map, and to map every vertex of the softBody to the original index, but this will cost too mush computation performance.
4. Collision between softBody and other bodies is dependent of the tessellation, so you must find what's the best value for your case.
5. I must use collision margin for the soft bodies and rigid bodies of 0.5; I would like to know the relationship of the collision margin to the simulation stability, since if I leave collision margin = default, my soft bodies blow up.


Top
 Profile  
 
PostPosted: Wed Dec 21, 2011 8:53 pm 
Offline

Joined: Mon Dec 05, 2011 8:36 pm
Posts: 12
@XMight; Did you figure out a way to apply texture correctly?? I am stuck at this. Please help me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group