Parallel collision detection with job scheduler

bknafla
Posts: 1
Joined: Sat Jul 18, 2009 10:34 pm

Parallel collision detection with job scheduler

Post by bknafla »

We uses Bullet in a game ai demo for the line-of-sight (LOS) checks of agents against other agents and obstacles, therefore mainly using the whole collision module.

We are thinking about running this sensing in parallel using a job scheduler instead of raw threads. The plan is to run the whole sensing in parallel to prepare for future many-cores, so I want to parallelize the near- and the broad-phase if it isn't completely pointless.

From a quick look into the sources Bullet seems to have a sequential broad-phase that collects possible collision pairs and batches these to the near-phase(dispatcher) that can feed multiple threads that pose as a kind of SPU.

Deploying a job scheduler or task scheduler for the near-phase would be straight forward. But what about the broad-phase?

On a first look the collision pair cache would need to be synchronized or distributed to be thread local or you could just enqueue jobs into a near-phase-collision-queue. However, it looks like there are other side effects happening during the traversal of the btDbvt data structure.

Has anyone parallelized the broad-phase and has experience how much time it takes to detect and remove all side effects that prevent parallel btDbvt traversal?

Cheers,
Bjoern
alexjc
Posts: 1
Joined: Wed Jul 29, 2009 2:39 pm

Re: Parallel collision detection with job scheduler

Post by alexjc »

Bump.

I'm very interested in getting an answer to this as well!

Anyone done any kind of parallelization on the PC with Bullet?

Alex