The Photo-Realism Challenge: Physics

by ps3iso on June 5, 2013

physics formula

Physics!  Uhn!  What is it good for?  Absolutely . . . er, quite a lot, actually.

Physics in games is one of those strange things that you don’t notice until it stops working right.  Example: in older games, where physics processing was not a big deal, no matter how an enemy was shot, he fell with the same pre-canned animation.  This is actually more realistic than modern games; people do not fly backwards when shot like in the movies.  But the point is, the animation was not dynamic, resulting in a death animation that did not look right.

dead mario

Yeah, I’m not buying it.

This brings us to a subject I don’t think I’ve covered in these articles before: what does “photo-realism” actually mean?  First, what it does NOT mean: photo-realism does not mean looking outside (or down a corridor or whathaveyou) and your game looking identical.  That would just be realism.  “Photo-realism” is looking like a photo (or video) of the world around us.  That means that post-processing effects, like light bloom, which occur in photography but not in real life, are a part of photo-realism.  Since video is involved, elements like motion blur are a big part of photo-realism.  Likewise, movie physics, although unrealistic, are a part of photo-realism.  When they get shot, people fly backwards.  It’s what we expect.

photorealism

Sorry, real life just doesn’t look like this!

Enter physics!  A simple definition of physics is the description of matter moving through space.  This gets incredibly complicated, as you have to consider fluid dynamics, dynamic clothing, ragdoll physics, volumetric smoke, and so on.  As a result, PC physics engines have grown incredibly complex in their physics calculations, and I’ll try to (briefly!) give a history of video game physics (if I gloss over your favorite physics engine, sorry!).

physics

Ooh, I can’t wait to see what happens!

The earliest 3D games, like Doom or Wolfenstein 3D, had no physics (I know, they were ray casted, but it doesn’t much matter here).  The enemies were sprites, and when shot, a pre-made animation caused them to fall when shot. There were no fluid dynamics, wind effects, volumetric smoke, or the like.  When the earliest proper 3D games came out, the first proper physics implementation was collision detection.  Collision detection determined two things: 1) were actors or players running into each other? And 2) did a bullet hit an actor or player?  The solution was to create a sort of box (called a “hit box”) around the models.  If the space of the bullet/ first actor interfered with the hit box of another actor, then action took place, and was resolved.

More robust models of physics were developed (ragdoll physics was especially popular—dead enemies actually fell like dead people fall!), but the biggest revolution occurred in 2000 when the Havok Physics middleware was released.  It was a risk—middleware that only did physics?—but it has paid off in dividends, looking at the impressive portfolio of titles that Havok has powered.

havok

Kids these days don’t know it, but this was hot stuff back in the day!

The next big step forward in physics came from an unknown company named Ageia.  Havok worked (and still works) entirely via software through the CPU.  Ageia, however, had the idea of creating  physics co-processor (called the PhysX add-on card) to offload physics processing, improving both CPU performance and physics performance.  It worked wonderfully, but the industry adoption was lackluster—not enough people owned Ageia PhysX PPUs to attract developers, and there weren’t enough games to spur sales.  Fortunately, Nvidia, who were working on their GPGPU initiative, purchased Ageia.  Instead of using a special physics processing unit, physics is handled in CUDA cores.  The result is that the gamer gets the same unparalleled physics performance as they did with Ageia, with less hardware to buy.

arkham

Yes, accelerated physics really does make a huge difference.

This was not great news for AMD owners, however, and like AMD’s TruForm tessellation, PhysX adoption has been spotty.  Havok had announced a GPGPU physics solution, but since its acquisition by Intel, the status of Havok FX is unclear.  Still, it is clear that through increased parallelization of processor cores, physics simulations should continue to improve, and that is a game that everyone wins.

In closing, this article makes me want to get physical, physical.

Happy gaming!

Tweet this!Tweet this!


Previous post:

Next post: