Glue Objects / Fracture

ramsampath
Posts: 19
Joined: Fri Sep 05, 2008 8:54 pm

Glue Objects / Fracture

Post by ramsampath »

Hello,

I only recently started using bullet and I was looking into compound objects (btCompoundShape) for performing a kindof glue operation, and we are trying to incorporate bullet into Side Fx's houdini as an alternate to their own rigid body solver.

To mimic some of the features of houdini's RBD, I would have to implement houdini's glue DOP.

For example, I would like to simulate a group of objects together all behaving as though they are part of a bigger rigid body, and then break them off into individual rigid bodies depending on the impact they feel...(ie if the impact each of them felt was greater than a threshold).

My question is basically, whether i can implement this operation using btCompoundShape ? or if not which is the best way to do this.

Thank you very much in advance.

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

Re: Glue Objects

Post by Erwin Coumans »

Yes, for such effect to glue and break those pre-fractured parts, a btCompoundShape is a good starting point.

Then, some logic needs to be added that breaks the btRigidBody with the single btCompoundShape into multiple btRigidBody objects that consist of one or multiple child shapes. A contact callback can break the object based on the applied impulse.

We try to extend the Demos/ConvexDecompositionDemo with this glue/fracture effect, for the next Bullet version.
Thanks,
Erwin
ramsampath
Posts: 19
Joined: Fri Sep 05, 2008 8:54 pm

Re: Glue Objects / Fracture

Post by ramsampath »

Thanks for the reply Erwin.

I deleted my earlier post regarding my misunderstanding regarding the usage of btCompoundShape...

if i add all the shapes to the compoundshape using btCompoundShape::addChildShape(...) and then create a btRigidBody with that compoundshape, it seems to work well and solves the shapes as one rigidbody, I got a bit misguided with CcdPhysicsDemo which uses compound shapes a bit differently.

Thank you again.
Ram.