MOPP analogue
Posted: Sat Jun 12, 2010 12:40 am
We divide our large world into chunks and wrap all static collision for a chunk into a Hk MOPP. The broadphase contains only a couple static objects -- one for the MOPP, one with a custom heightfield shape.
There seem to be a few possiblilities to do this this in Bullet.
* Forget the container; batch-add all the static objects to the broadphase at runtime.
CON: Makes shifting the broadphase origin more expensive, forces us to build the acceleration structure at runtime.
* Use btCompoundShape with optional dbvt.
CON: ray and sweep tests don't use the acceleration structure (issue 25). Also, seems like a slight abuse of shapes; nobody will care about the combined inertia tensor, for example. Issue 25 looks easy for me to implement, but it _has_ been sitting around for a couple years -- is there some subtlety that I'm missing?
* use btMultiSapBroadphase; add a SAP for each chunk of the world, containing only that chunk's static data.
So, a couple questions:
btMultiSap or btCompoundShape for static collision? Or something else?
Is there anything tricky I'm missing about issue 25?
There seem to be a few possiblilities to do this this in Bullet.
* Forget the container; batch-add all the static objects to the broadphase at runtime.
CON: Makes shifting the broadphase origin more expensive, forces us to build the acceleration structure at runtime.
* Use btCompoundShape with optional dbvt.
CON: ray and sweep tests don't use the acceleration structure (issue 25). Also, seems like a slight abuse of shapes; nobody will care about the combined inertia tensor, for example. Issue 25 looks easy for me to implement, but it _has_ been sitting around for a couple years -- is there some subtlety that I'm missing?
* use btMultiSapBroadphase; add a SAP for each chunk of the world, containing only that chunk's static data.
So, a couple questions:
btMultiSap or btCompoundShape for static collision? Or something else?
Is there anything tricky I'm missing about issue 25?