Dividing bullet shapes optimally

Hi all,

I was wondering what the best way would be to divide a series of bulletTriangleMesh shapes used as “into” collision solids for a terrain. Which would yield faster results: having a few shapes per rigid body, or having a rigid body with many shapes?

I know when using Panda3D’s collision system, since bounding volumes are used for tests, having many collision nodes with a few collision solids each is faster than having a few collision nodes with many collision solids each.

Is this the same for how bullet handles its collisions? I could run my own tests with pstats and such, but I thought it wise to ask if anyone has any experience in this regard first.

Thanks in advance.

For terrain, the answer is unequivocal: to have collision fragments around the character, remove unnecessary fragments at a remote distance.

By analogy:

So the implication is that bullet will do physics tests with everything, regardless of how one puts shapes into rigid bodies, i.e. having a few shapes per rigid body, or having a rigid body with many shapes? It doesn’t have anything similar to Panda3D’s bounding volume tests for collision nodes?

If I answer your question to the point and directly. The BulletTriangleMeshShape class has a bvh parameter, but I don’t know how it works.

This is the answer from the developer of binding bullet.

1 Like

Alright, so it seems that it’s best to just have a BulletTriangleMeshShape with many BulletTriangleMesh(es) in it and then to let bullet’s internal algorithms deal with the rest, from what you’ve pointed me to.