Large worlds, again

Post Reply
Calim
Posts: 3
Joined: Mon Sep 10, 2007 7:26 pm

Large worlds, again

Post by Calim »

Hi. I'm new to Bullet, I've already looked through the code a bit, but I've decided to ask for advice now ...

I'd like to build a space simulator where the player(s) should be able to freely move through a whole star system.
It should have extents of about 1e9 units, when the default spaceship is about 5 units in size.

I've already decided to use double precision, but I'd like to use a multiple coordinate system approach as well,
storing positions as 3 integer [i,j,k] (coordinate system indices) and 3 double coordinates [x,y,z].

Now how would I best go about for collision detection with Bullet ?

- build multiple CollisionWorlds (I want to do the Dynamics myself)
(too much overhead moving objects around & handling objects near coordinate system boundaries?)

- put all objects in 1 world and reject pairs based on their [i,j,k] values
(which would be a bit inefficient, although there won't be more than about 500 objects at a time, most
would be accumulated near some point of interest (planet, space station))

- somehow utilize the MultiSAP broadphase (when it's ready); how difficult would it be to let it handle additional
positional information [i,j,k] ?

And, a final question, when CCD is re-enabled, would it be usable with such a multiple-coordinate scheme /
would I just be able to call a CollisionWorld->performContinuousCollisionDetection() ?

Thank you, Christoph
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Large worlds, again

Post by Erwin Coumans »

Hi,

I recommend to use the new bt32BitAxis3Sweep for large worlds (just provide a world aabbmin/max as 'small' as possible).

Later, when the multi-sap is finished you can consider switching to that one. When using double precision, you might not need the integer indices. For the upcoming multi-sap, the objects will be defined in a 'primary' child-broadphase local space. It is up to the user how to map that to a global space.

CCD should work with any broadphase, once re-enabled.
Thanks!
Erwin
Calim
Posts: 3
Joined: Mon Sep 10, 2007 7:26 pm

Re: Large worlds, again

Post by Calim »

Erwin Coumans wrote:Hi,
Later, when the multi-sap is finished you can consider switching to that one. When using double precision, you might not need the integer indices. For the upcoming multi-sap, the objects will be defined in a 'primary' child-broadphase local space. It is up to the user how to map that to a global space.
For multi-sap, will I still have to specify a global world AABB ? On adding a CollisionObject, can I specify which local space the object should be put into (so I don't have much extra work if I want to use the integer indices scheme), or is this done automatically / internally (p.e. by just collecting objects that are near to each other according to their m_worldTransform and putting them into some arbitrary coordinate system) ?
Erwin Coumans wrote: CCD should work with any broadphase, once re-enabled.
Thanks!
Erwin
Will there be a broadphase that uses something like time-swept bounding boxes and a time-of-impact calculation ?

Bye, Christoph.
Post Reply