Saturday, 25 April 2009

Big, Fast Crowds on the Sony PlayStation 3

Craig Reynolds first introduced flocking to the computer graphics area by creating the Boids artificial life simulation in 1986. It was a computer model of coordinated animal motion such as bird flocks or fish schools, that allowed for collision avoidance and goal seeking. This model has had various applications such as bat swarms and penguin flocks in the movie 'Batman Returns'. A video of the early model can be seen below, further details can be found here


The above model has a complexity of O(n2), as each boid needs to consider each other boid in order to determine whether its a nearby flockmate. The complexity can be reduced to O(n), by the use of spatial hashing that keeps the boids sorted according to their location, and therefore, increase the population of the boids.

Craig now works for the US R&D group of Sony Computer Entertainment. Recently he created a crowd simulation on the Sony PlayStation 3, which extends from the very early model above. As spatial hashing is used in order to accomodate large numbers of agents, here, it forms the basis of a scalable multi-processor approach to create large, fast crowd simulations. The PlayStation 3 has Cell processor, which consists of a Power Processor Unit (PPU), multiple Synergistic Processor Units (SPU) - 6 available to the model, and an RSX GPU. The model makes use of this architecture to spatially subdivide regions, and use the multiple SPUs to update a number of regions in parallel, accelerating the crowd simulation. The model has been able to incorporate 15,000 agents running at 60fps. A video can be seen by clicking the picture below:


It is interesting to see how different architectures can be used to create crowd simulations, and how the parallel processing nature of today's video games consoles, make them low-cost and high performance platforms for parallel execution. I will be looking forward to see other general purpose applications of the Sony PS3.

No comments:

Post a Comment

ShareThis