2009
calculates the position of each object as time passes. In much the same way
that a motion picture is composed of many individual images or frames,
physical simulation splits time into small discrete steps and predicts the motion
of each object during each step. The cumulative effect of all these steps is
fluid, continuous, believable motion.
Unlike traditional keyframe-based animation, where the animator needs to
specify a set of keyframed configurations, physical simulation determines how
objects move based their properties. This takes the burden from the animator,
who now doesn't need to manually animate every piece in an explosion, every
bone in a character stunt animation, or every vertex in a piece of cloth.
In a physical simulation, physical properties such as mass and elasticity are
assigned to all objects in a scene. This is then complemented with a set of
external forces like gravity or wind and/or constraints, like a spring force or
a ball-socket configuration. From all this information, the physics engine
calculates a continuous set of states that can then be displayed in real-time,
if the calculations are fast enough, or converted into keyframes to be played
back later.
What Does A Physics Engine Do?
A physics engine like Havok has three basic tasks to perform:
1 Collision Detection
Track the movement of all the objects in the scene and detect when any
of them have collided.
2 Update System
Determine an appropriate response for objects that have collided by
resolving the collision according to the object properties and for all other
(non-colliding) objects update them according to the forces acting on
them.
3 Interface with Application
Once reactor determines the new positions and state of all objects, it can
display the objects in a 3D window or store their states in the form of
keyframes.
NOTE A physics engine knows nothing about how the objects it is simulating are
displayed. It simulates the motion and interaction of these objects based on a
physical (not graphical) description of the objects, and this information can be
used to generate a display that “tracks” the simulation.
3890 | Chapter 16 reactor