Bullet continuous collision

fred
Posts: 19
Joined: Tue Apr 24, 2007 12:38 pm

Bullet continuous collision

Post by fred »

Hello Erwin,

I work actually on the integration of bullet in our game engine on X360.

I need to connect a continuous collision version of bullet to avoid tunneling, indeed we develop a race game with high speeds.
The idea is to remain in discret for low speed and go in continuous for high speed :roll: .
Do you have some samples, some ideas to help me in this difficult task ?

Moreover, I would like to use the multi core capability of the X360 to optimize collision and constraint solver processes.
As we plan to use bullet for a future version on PS3, from your point of view, how can we seperate multi platform code form platform specific code ?

Thank you in advance :wink: ,

Regards.

Frederic Zimmer.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Bullet continuous collision

Post by Erwin Coumans »

fred wrote: I need to connect a continuous collision version of bullet to avoid tunneling, indeed we develop a race game with high speeds.
The idea is to remain in discret for low speed and go in continuous for high speed :roll: .
Do you have some samples, some ideas to help me in this difficult task ?
The continuous collision detection calculations are there, but the btContinuousDynamicsWorld framework to use the results (time of impact) is not in the latest release. I plan to provide the code and demo for this later.
Moreover, I would like to use the multi core capability of the X360 to optimize collision and constraint solver processes.
Bullet's SpuGatheringCollisionDispatcher for Playstation 3 performs most collision detection in parallel on multiple SPUs. It traverses the overlapping pair array on the SPU, calculates mesh/BVH tree and narrowphase (GJK) collision detection and contact management on SPU. A similar strategy works on XBox 360 too, exploiting 6 cores.

You can get more information about continuous collision detection and access to Bullet Playstation 3 SPU optimized version by sending a request using the Playstation 3 Devnet issue tracker. There is a presentation about Bullet Playstation 3 SPU optimizations at the physics track of DevStation 2007 in London next week, 4th of May 2007.

Thanks,
Erwin
fred
Posts: 19
Joined: Tue Apr 24, 2007 12:38 pm

Post by fred »

Thanks for the answer,
Erwin wrote :
The continuous collision detection calculations are there, but the btContinuousDynamicsWorld framework to use the results (time of impact) is not in the latest release. I plan to provide the code and demo for this later.
When do you plan to put btContinuousDynamicsWorld in Bullet ?

Do you think that the two methods (discret & continuous) can be used in the same frame in step simulation ?
I think that discret approach is faster than continuous and enough for low speed bodies (ex: a speed with a length of 50% of the size of the body).

In brief, for discret version, there is :

Build the contact point list with each overlapping pair body
Build the body island list based on contact point list
Resolve constraints for each island

And, I think, a continuous version should be :

ct = current time
do
{
ct = Search the next time of impact after ct
In ct to ct+dt
> Build the contact point list with each overlapping pair body
> Build the body island list based on contact point list
> Resolve constraints for each island
ct = ct + dt
} while ct < next step simulation time

It may be difficult to conjugate the two methods together. What is your point of view ?

Thanks,
Fred.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

When do you plan to put btContinuousDynamicsWorld in Bullet ?
This year, but not sure when yet.
Do you think that the two methods (discret & continuous) can be used in the same frame in step simulation ?
Collision response based on time of impact AND penetration depth can be mixed, and this has been frequently done in the past. Typically developers use penetration based rigidbody dynamics, and use some approximation (like raycast or sphere case, which is essentially continuous collision detection) for fast moving objects only.

You might also want to check out my draft continuous collision detection paper.

Hope this helps,
Erwin
fred
Posts: 19
Joined: Tue Apr 24, 2007 12:38 pm

Post by fred »

Ok,

thanks

Fred.