we're currently integrating Bullet (currently using version 2.71) into our Ca3D-Engine. Bullet is awesome and it works very well so that we're making good progress, but as we're not (yet) familiar with all the Bullet implementation details, there is now the question which shapes are best to represent the static part of large and detailed worlds.
More precisely, our static parts are composed of:
- Heightfields (e.g. 1025*1025 points with a point spacing of 1m, so that the entire size is roughly 1 square kilometer),
- convex polyhedra ("brushes"), usually several thousand per level,
- triangle meshes computed from Bezier patches, used for anything curved, can be very big or small, e.g. pipes, handrails, etc., also usually used in hundreds or thousands per level,
- arbitrary triangle meshes e.g. for detail objects, currently used only rarely.
We have begun by adding all convex polyhedra as btConvexHullShapes to the dynamics world, relying on the worlds broadphase for spatial hierarchy.
Normally our next step had been to create one instance of btBvhTriangleMeshShape for each triangle mesh in our world, and add that to the collision/dynamics world as well.
To our understanding the broadphase should take care of organizing all these shapes well, for good performance.
However, some posts in this forum mention that one should better add the triangles of all objects of the static world into a single big btBvhTriangleMeshShape.
So our real question is:
Can we keep separate components of the static world in separate shapes (and rely on the broadphase to give optimal performance),
- or -
should we actually put all triangles of all static objects into a single big btBvhTriangleMeshShape (or rather btMultimaterialTriangleMeshShape) instance?
(Or should we employ a completely different strategy for the task? Which approach works best with Bullet?)
We'd be very grateful for your advice!!