Review Index:

ATI Physics Acceleration Gets a Voice

Subject: Processors
Manufacturer: ATI

One Final Voice

It seemed only fitting that after talking with NVIDIA and AGEIA on the subject of gaming physics on GPUs and PPUs that I stop by and seeing ATI at GDC this year to get their input.  As is usually the case, we got even more information on the subject in general, as well as a unique view point on the subject compared to their competition. 

First, I have to note that we have learned that the recently announced Havok FX add-on to the Havok API will in fact run on ATI's video cards in the same way that NVIDIA has publicly stated theirs will.  As you'll see in this article, ATI claims they'll run it better.

ATI's View on Gaming Physics

When sitting down with ATI, they decided to give us some detailed information on how current generation physics simulations work in games when running on the CPU, or any hardware system for that matter as well.  We'll go over these points briefly here with you so that we all have the same information and background on the technology.

This diagram shows the various shapes that physics objects can have in their simulated environment.  The most basic method is AABB cube separated object that essentially has edges directly to the cubed edges in terms of interaction.  The sphere method allows a higher resolution of physics simulations at the expense of more processing power.  Tetrahedrons are the third option that physics simulation has use where a complex polygon of space surround the rigid body and are the physical edges of the object.  Finally, a mesh is the best option for physical simulation (in particular, a single pixel mesh) but it is very compute bound.

When objects interact with each other in a game, the items changes in their phase representations as interactions occur.  In the above example, the two cubes are moving towards each other and once their AABB cube models breach each other, the physics simulation knows it needs to move to a more detailed simulation of the objects in order to more accurately present their interactions.  Once the objects have interacted and moved away from each other they can resort back to the more course physics models thus saving processing power. 

According to ATI, physics calculations are very heavy in floating point arithmetic and conditional branches to that test for item interactions.  In the example above, the code might say 'am I breaching another AABB cube?' over and over again to test for when to change physical resolutions.  If you have closely followed the R520 architecture and branching you might be able to see where this is going.

As is painfully obvious in all games out today, physics simulations on PCs are all hacked and modified versions of real 'text book physics'.  Programmers are forced to cut their simulations to lower resolutions in order to get the games to run at all and thus the need for AABB cubes, spheres and other physics shapes are necessary.  The ideal situation would be to have enough compute power to simulate physics perfectly, but we aren't anywhere near that yet. 

Unfortunately for today's games, mapping current physics code that is 'hacked' into appearing correct to GPUs won't really show much performance benefit to the end user.  Taking Half-Life 2, which is arguably the most sophisticated physics engine in a game, and moving just the current physics onto a GPU ATI claims we would see a minor 20-30% performance speed up.  Where the real magic will happen is when the level of complexity is extended farther where the GPU could outperform the CPU by much greater amounts.

Next Page - ATI's Architectural Advantages