Real-Time 3D Character Animation Primer

Character animation is a huge topic, with entire volumes dedicated to it. However, as a 3D game developer, it is important to understand the most general concepts and terms and their effect on renderer design. Straightforward coverage of character animation techniques relevant to 3D games is discussed in this section. It is intended to describe the current state of real-time 3D animation techniques as well as identify essential components for a useful and usable animation system.

The techniques are separated into three main layers, where each new layer builds on the previous one. The three layers will be referred to as core techniques, mid-level techniques, and high-level components.

Core Techniques

All geometric animation requires altering render vertex data in some way in each frame to create motion. There are several techniques for performing these alterations, and the final render object will need to be supported as a dynamic geometry type.

Note 

Camera animation does not use these vertex-based techniques, but it does use the techniques explained in the mid-level section.

Vertex Transformation

Vertex transformation is a vertex animation technique that dynamically alters vertex data in a polygon set in which all the vertices in a given set are uniformly transformed by applying a parent matrix. This action gives the effect of translating, rotating, and scaling the entire geometry object. The general shape of the object defined by the vertex set is unchanged. Usually, the original vertex data is left unchanged because the transformation is stored in a matrix separate from the vertex data and used only to produce the render geometry for a given frame or for accurate collision tests. This type of animation can be done using static vertex array data, as explained in the previous Static and Dynamic Geometry section.

Vertex Deformation

Vertex deformation is a vertex animation technique that dynamically alters vertex data in a polygon set in which particular vertices are transformed or otherwise altered independently of other vertices in the polygon set. This action gives the effect of deforming the sets geometry. The general shape of the object defined by the polygon set can be completely changed to a new shape. As with vertex transformation, usually the original vertex data is left unchanged because the transformation is stored in a matrix separately from the vertex data and used only to produce the render geometry for a given frame or for accurate collision tests. However, sometimes the deformation is meant as a permanent change to the vertex data, for example, in the case of dynamic vehicle or terrain damage. This type of animation would use what was previously called dynamic vertex arrays in the Static and Dynamic Geometry section.

Vertex Blending

Vertex blending generates a new model geometry by doing N-linear interpolation between blend shapes, based on given blend-shape weights. This type of animation would also need to use dynamic vertex arrays as the renderer retained-mode structure. Blend shapes are what we call the individual geometries used in vertex blending.

These three techniques can be encapsulated in various scene-object-based architectures.

Transformation: Simple insertion of a matrix transformation object upon the target polygon set.

Deformer: Object used to control a set or subset of vertices in a polygon set, possibly independent of the other vertices in the polygon set.

Sculpt deformer: Deformer that uses geometry to influence the shape of other geometry.

Morph object: Object that stores the blend shapes for vertex blending and performs the blending based on its current weights. For more see, “Morphing under Freeform Animation.”

It is important to note that all or part of these techniques often end up being implemented directly in hardware, because graphics hardware has evolved to support the operations needed for these techniques.

Mid-Level Real-Time Animation Techniques

The core techniques are expanded on to build more sophisticated animation techniques. These higher-level animation techniques can be separated into two categories—hierarchical based and everything else. Here, everything else will be referred to as Freeform animation.

Hierarchical Animation

Hierarchical animation is any animation technique that uses a hierarchical data structure to animate the visual geometry.

Articulated animation: The simplest type of hierarchical character animation, where the character model is made up of groups of individual disjointed geometries that are animated using the vertex transformations technique based on keyframe data or procedural kinematics, usually in a hierarchical structure.

Skinned, Skin and bones animation (or simply Skinning): Similar to articulated animation, except that the final animated surface is made up of a continuous polygonal mesh that deforms to the underlining animated hierarchical structure. Skinning uses the vertex deformation technique. Because the “skin” geometry is deformed by some underlying structure, local transformations need to be computed to correctly deform the mesh, and vertex weights are often used to improve deformation across joints.

Vertex Weights: The amount of contribution an assigned bone, joint, transform, or other deformer applies to the given vertex. Multiple deformers can influence a vertex by assigning the associate deformers and determining how much each deformer influences the vertex by using a weight. Weights usually range from 0.0 to 1.0, where the total of all weights for a given vertex usually must equal 1.0.

Facial animation: Animation that uses skinning as its basis but has the added requirement of playback blending, usually multiple weights, and audio synchronization.

Rigid-body dynamics: A type of physics simulation where the individual objects act as rigid bodies, that is, they have physical-based motion and collision, but do not deform during motion and collision. This type of animation can be achieved using articulated animation and kinematics.

Templates: Reusable animation hierarchies, often parameter controlled, used to minimize memory for hierarchical character animation.

Freeform Animation

Freeform animation is any animation technique that makes changes to the vertex data in polygon sets to animate the visual geometry that does not follow a strict structure. Examples include the surface of water, special effects, deformation due to collision, morphing, and so on. There are potentially an unlimited number of animation possibilities that fall under Freeform animation, but all require dynamic vertex data sets as their core retained data structure.

Cloth animation: Animation that deforms nearly every, if not all, vertices in a polygon set and often performs some physics and collision detection to affect that deformation.

Morphing: Almost the same as vertex blending but often formalized as a higher-level object, as presented here. Morphing generates a new model geometry by doing N-linear interpolation between blend shapes, based on given blend shape weights.

Soft-body dynamics: A type of physical simulation where the individual objects act as soft bodies, that is, they have physical-based motion and collision but deform during motion and collision. This type of animation can be simulated using skinned animation but usually is implemented as freeform animation and dynamics simulation.

Animated textures: Textures that change from frame to frame. The textures are usually preloaded static texture images that repeat, for example, fire or flame textures for a torch object.

Dynamic textures: Animated textures that use dynamic texture images. These can be compressed movie formats rendered on a polygon, such as .mpg or .avi. The movie files can be loaded into main memory or come from a streaming source. They can also be dynamically generated as in the case of a changing fractal cloud texture or a mirror effect that uses an actual view rendered to a textured surface.

Support Objects

Also worth noting is the role of other support objects for mid-level animation. Bounding volumes are nonrendered geometry used to represent other geometry for spatial testing, as described earlier, but here can be used for point containment for joint, bones, or other deformer assignments.

Interpolators: Objects that perform the process of determining from two or more values what the in-between values should be.

It is important to note that the implementations of these techniques can vary somewhat, but for the most part the techniques are well known and alternate implementations should not affect a well-designed interface.

High-Level Animation Components

Finally, at the highest level of real-time 3D animation, the animation data needs to be managed in an efficient and flexible manner as well as support integration with other motion systems, such as physics or direct game logic control.

These techniques include but are not limited to:

Keyframe data management, control, playback, blending, and loading: This is often what is thought of as the Animation engine, but as we can see, this is only the top layer of a large process.

Animation data loaders: Needed for popular animation packages and of primary importance to developers. These loaders load the animation data generated by animation packages into the keyframe data management system.

Physics and dynamics systems: Can use the underlying animation support for managing and maintaining the objects the physics simulators want to manipulate. Physics systems often need access to higher-level information as well, such as an object hierarchy that it is meant to control and have the animation system deform to the manipulated hierarchy.

It is important to note that the high-level animation components vary greatly in their implementations and capabilities from system to system and from game to game.



Practical Java Game Programming
Practical Java Game Programming (Charles River Media Game Development)
ISBN: 1584503262
EAN: 2147483647
Year: 2003
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net