split or merge static geometry before broadphase?

monkeyman
Posts: 22
Joined: Sat Nov 26, 2011 5:41 pm

split or merge static geometry before broadphase?

Post by monkeyman »

Hi,

this is in the Bullet wiki:
Other Tips For Increasing Broadphase Speed

If you have a large amount of static trimesh collision shapes, batch them together using a single btBvhTriangleShape. This will only have one entry in the broadphase.
Could someone weigh in with pros and cons here?

Since normally the broadphase should be used to do a culling before narrowphase, the above must assume that in this particular case, the internal tree of the btBvhTriangleShape is so efficient in narrowphase that it is meaningless to do any (hierarhical) lookups in the broadphase as well... is this really so, and in all cases? Is there no benefit of using any of the Bullet broadphases?

What I'm worried about is that even though it has a tree internally it could perform badly since every update of every dynamic object in the world has to do a new narrowphase check with the triangleshape, and the broadphases should be very optimized for this kind of lookup.

By the way, a somewhat related question, in case an answerer here knows that too: the narrowphase pair contact points, I know they are cached, but if one of the objects move, aren't they completely regenerated? Or can it reuse the previous contact points and update them in some way?