A physics engine is a computer program that simulates Newtonian physics models, using variables such as mass, velocity, friction and wind resistance. It can simulate and predict effects under different conditions that would approximate what happens in real life or in a fantasy world. Its main uses are in scientific simulation and in video games.
There are generally two classes of physics engines, real-time and high-precision. High-precision physics engines (or dynamic simulations) require more processing power to calculate very precise physics and are usually used by scientists and computer animated movies. In video games, or other forms of interactive computing, the physics engine will have to simplify its calculations and lower their accuracy so that they can be performed in time for the game to respond at an appropriate rate for gameplay. This is referred to as real-time physics. Computer games use physics engines to improve realism.
One of the first general purpose computers ENIAC was used as a very simple type of physics engine. It was used to design ballistics tables to help the United States military estimate where artillery shells of various mass would land when fired at varying angles and gunpowder charges, also accounting for drift caused by wind. The results were calculated a single time only, and were tabulated into printed tables handed out to the artillery commanders.
In most computer games, speed of simulation is more important than accuracy of simulation. Typically most 3D objects in a game are represented by two separate meshes or shapes. One of these meshes is a highly complex and detailed shape which the player sees in the game, for example a vase with elegant curved and looping handles. However, for purposes of speed, a second highly simplified invisible mesh is used to represent the object to the physics engine. To the physics engine, the object may be processed as nothing more than a simple tall cylinder. It is therefore impossible to insert a rod or fire a projectile through the handle holes on the vase, because the physics engine does not know the handles exist and only processes the rough cylindrical shape. The simplified mesh used for physics processing is often referred to as the collision geometry. This may be a bounding box, sphere, or convex hull. Engines that use bounding boxes or bounding spheres as the final shape for collision detection are considered extremely simple. Generally a bounding box is used for broad phase collision detection to narrow down the number of possible collisions before costly mesh on mesh collision detection is done in the narrow phase of collision detection.
February 2006 saw the release of the first dedicated Physics Processing Unit (PPU) from Ageia (later merged into nVidia), called PhysX, which functions in a similar manner to the Graphic Processing Unit (GPU) in a graphics card - off-loading the majority of the physics processing weight off the CPU and into a dedicated processor. The unit was most effective in accelerating particle systems. Only a small performance improvement was measured for rigid body physics. The Ageia PPU is documented in depth in their US patent application #20050075849.
GPGPU ("General Purpose processing on Graphics Processing Unit") is another promising approach for realtime physics engines, including rigid body dynamics. ATI and NVIDIA provide rigid body dynamics on their latest graphics cards. ATI claims that their X1900 XT should deliver 9 times the performance of an nVidia PhysX card.
For More Information: Physics Engines
Source: Wikipedia (All text is available under the terms of the Creative Commons Attribution-ShareAlike License)
|