Acknowledgments
About the Author
Contents
Introduction
1 Introduction to Character Animation
What Is Character Animation?
A Brief History of Character Animation
Morphing Animation and Skeletal Animation
The Soldier
Coding Conventions
Conclusions
Further Reading
2 A Direct3D Primer
DirectX 9 versus DirectX 10
STL and the D3DX Library
Setting Up a Project in Visual Studio Express 2008
VC++ Directories
Creating a New Project
Linking DirectX Libraries
Application Framework
WinMain
Creating the Window
Basic Rendering
Creating the DirectX Device
Direct3D Rendering Loop
Loading a Mesh
Loading an Effect
Rendering a Mesh with an Effect
Conclusions
Further Reading
3 Skinned Meshes
Skinned Meshes Overview
Bone Hierarchies
The D3DXFRAME Structure
Loading a Bone Hierarchy
The CreateFrame() Function
The CreateMeshContainer() Function
The DestroyFrame() Function
The DestroyMeshContainer() Function
The ID3DXAllocateHierarchy
Applying a Mesh to the Bone Hierarchy
Software Skinning Overview
Hardware Skinning Overview
Software Skinning Implementation
Hardware Skinning Implementation
Rendering Static Meshes in Bone Hierarchies
Conclusions
Chapter 3 Exercises
Further Reading
4 Skeletal Animation
Keyframe Animation
Animation Sets
The ID3DXAnimationController Interface
Loading the Animation Data
Multiple Animation Controllers
Conclusions
Chapter 4 Exercises
5 Advanced Skeletal Animation Techniques
The Track Structure
Blending Multiple Animations
Compressing Animation Sets
Animation Callback Events
Motion Capture (Mocap)
Optical Motion Capture Systems
Magnetic Motion Capture Systems
Mechanical Motion Capture Systems
Comparison of the Different Mocap Systems
Lapland Studio Interview
Conclusions
Chapter 5 Exercises
Further Reading
6 Physics Primer
Introduction to Rigid Body Physics
Forces
The Effect of Forces on a Rigid Body
Quaternions
Describing the World
The Oriented Bounding Box Class
Physics Simulation
Position, Velocity, and Acceleration
The Particle
The Spring
Conclusions
Chapter 6 Exercises
Further Reading
7 Ragdoll Simulation
Introduction to the Bullet Physics Engine
Integrating the Bullet Physics Library
Download Bullet
Build the Bullet Libraries
Setting Up a Custom Direct3D Project
Hello btDynamicsWorld
Constraints
Constructing the Ragdoll
Updating the Character Mesh from the Ragdoll
Getting a Bone’s Position from an OBB
Getting a Bone’s Orientation from an OBB
Updating the Bone Hierarchy
Conclusions
Chapter 7 Exercises
8 Morphing Animation
Basics of Morphing Animation
Using Multiple Morph Targets
Morphing Animation on the GPU
Custom Vertex Formats
Creating the Morph Vertex Declaration
The Morphing Vertex Shader
Combining Skeletal and Morphing Animation
Skeletal/Morphing Vertex Format
Skeletal/Morphing Vertex Shader
Conclusions
Chapter 8 Exercises
9 Facial Animation
Facial Animation Overview
Facial Expressions
The Eye of the Beholder
The Face Class
Loading Multiple Targets from One .X File
Extracting Meshes from a D3DXFRAME Hierarchy
Implementing the Face Class
The Face Controller Structure
Animation Channels
Face Factory
Conclusions
Chapter 9 Exercises
10 Making Characters Talk
Phonemes
Visemes
Basics of Speech Analysis
Sound Data
The WAVE Format
Automatic Lip-Syncing
Conclusions
Further Reading
11 Inverse Kinematics
Introduction to Inverse Kinematics
Solving the IK Problem
Look-At Inverse Kinematics
Two-Joint Inverse Kinematics
Conclusions
Chapter 11 Exercises
Further Reading
12 Wrinkle Maps
Introduction to Normal Mapping
What Are Normal Maps?
Encoding Normals as Color
Putting the Normal Map to Use
The TBN-Matrix
Converting a Mesh to Support Normal Mapping
The Normal Mapping Shader
Creating Normal Maps
Creating Normal Maps in Practice
Specular Highlight
Specular Maps
Wrinkle Maps
Conclusions
Chapter 12 Exercises
Further Reading
13 Crowd Simulation
Flocking Behaviors
Boids
Introduction to Crowd Simulation
Smart Objects
Following a Terrain
Conclusions
Chapter 13 Exercises
Further Reading
14 Character Decals
Introduction to Decals
Picking a Hardware-Rendered Mesh
Creating Decal Geometry
Calculating the Exact Hit Position
Selecting Triangles for the Decal Mesh
Copying the Skinning Information
The CharacterDecal Class
Calculating Decal UV Coordinates
Conclusions
Chapter 14 Exercises
15 Hair Animation
Hair Representation
Hair Modeling
The Control Hair Class
The HairPatch Class
Growing the Hair
Rendering the Hair Patch
Creating a Haircut
Animating the Control Hairs
The Hair Class
Conclusions
Chapter 15 Exercises
Further Reading
16 Putting It All Together
Attaching the Head to the Body
The Character Class
Future Work
Character Level-of-Detail
Root Motion versus Non-Root Motion
Animation Trees/Animation Graph
Track Masks
Separate Mesh and Animation Files
Alan Wake Case Study
Interview with Sami Vanhatalo, Senior Technical Artist
Interview with Henrik Enqvist, Animation Programmer
Final Thoughts
Further Reading
Index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Z