Book Image

Hands-On C++ Game Animation Programming

By : Gabor Szauer
Book Image

Hands-On C++ Game Animation Programming

By: Gabor Szauer

Overview of this book

Animation is one of the most important parts of any game. Modern animation systems work directly with track-driven animation and provide support for advanced techniques such as inverse kinematics (IK), blend trees, and dual quaternion skinning. This book will walk you through everything you need to get an optimized, production-ready animation system up and running, and contains all the code required to build the animation system. You’ll start by learning the basic principles, and then delve into the core topics of animation programming by building a curve-based skinned animation system. You’ll implement different skinning techniques and explore advanced animation topics such as IK, animation blending, dual quaternion skinning, and crowd rendering. The animation system you will build following this book can be easily integrated into your next game development project. The book is intended to be read from start to finish, although each chapter is self-contained and can be read independently as well. By the end of this book, you’ll have implemented a modern animation system and got to grips with optimization concepts and advanced animation techniques.
Table of Contents (17 chapters)

Summary

In this chapter, you explored how to optimize an animation system for several scenarios. These optimizations reduce the number of uniforms that a vertex skinning shader requires, speeding up the sampling of animations with many keyframes and generating the matrix palette of a pose faster.

Keep in mind that there is no one-size-fits-all solution. If all the animations in a game have a few keyframes, the added overhead of optimizing animation sampling with a lookup table might not be worth the additional memory. However, changing the sampling function to use a binary search might be worth it. Similar pros and cons exist for each optimization strategy; you must pick what makes sense for your particular use case.

When looking at the sample code for this chapter, Chapter11/Sample00 contains the code for this chapter in its entirety. Chapter11/Sample01 shows how to use pre-skinned meshes, Chapter11/Sample02 shows how to use the FastTrack class for faster sampling, and Chapter11...