Hands-On C++ Game Animation Programming: Learn modern animation techniques from theory to implementation with C++ and OpenGL

Szauer, Gabor



Key Features

  • Build a functional and production-ready modern animation system with complete features using C++
  • Learn basic, advanced, and skinned animation programming with this step-by-step guide
  • Discover the math required to implement cutting edge animation techniques such as inverse kinematics and dual quaternions

Book Description

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.

What you will learn

  • Get the hang of 3D vectors, matrices, and transforms, and their use in game development
  • Discover various techniques to smoothly blend animations
  • Get to grips with GLTF file format and its design decisions and data structures
  • Design an animation system by using animation tracks and implementing skinning
  • Optimize various aspects of animation systems such as skinned meshes, clip sampling, and pose palettes
  • Implement the IK technique for your game characters using CCD and FABRIK solvers
  • Understand dual quaternion skinning and how to render large instanced crowds

Who this book is for

This book is for professional, independent, and hobbyist developers interested in building a robust animation system from the ground up. Some knowledge of the C++ programming language will be helpful.



  • 使用C++建立功能完整且可投入生產的現代動畫系統

  • 透過逐步指南學習基礎、進階和蒙皮動畫程式設計

  • 探索實現先進動畫技術(如逆向運動學和雙四元數)所需的數學知識






  • 熟悉3D向量、矩陣和變換,以及它們在遊戲開發中的應用

  • 探索各種平滑混合動畫的技巧

  • 瞭解GLTF文件格式及其設計決策和數據結構

  • 通過使用動畫軌道和實現蒙皮來設計動畫系統

  • 優化動畫系統的各個方面,如蒙皮網格、剪輯採樣和姿勢調色板

  • 使用CCD和FABRIK求解器為遊戲角色實現IK技術

  • 瞭解雙四元數蒙皮以及如何渲染大型實例化群體




Gabor Szauer has been making games since 2010. He graduated from Full Sail University in 2010 with a bachelor's degree in game development. Gabor maintains an active Twitter presence, @gszauer, and maintains a programming-oriented game development blog. Gabor's previously published books are Game Physics Programming Cookbook and Lua Quick Start Guide, both published by Packt.


Gabor Szauer自2010年開始製作遊戲。他於2010年畢業於Full Sail大學,獲得遊戲開發學士學位。Gabor在Twitter上保持著活躍的存在,用戶名為@gszauer,並經營著一個以程式為導向的遊戲開發部落格。Gabor之前出版的書籍包括《遊戲物理程式設計食譜》和《Lua快速入門指南》,兩本書都由Packt出版。


  1. Creating a Game Window
  2. Implementing Vectors
  3. Implementing Matrices
  4. Implementing Quaternions
  5. Implementing Transforms
  6. Building an Abstract Renderer
  7. Exploring the glTF File Format
  8. Creating Curves, Frames, and Tracks
  9. Implementing Animation Clips
  10. Mesh Skinning
  11. Optimizing the Animation Pipeline
  12. Blending between Animations
  13. Implementing Inverse Kinematics
  14. Using Dual Quaternions for Skinning
  15. Rendering Instanced Crowds


- 建立遊戲視窗
- 實作向量
- 實作矩陣
- 實作四元數
- 實作變換
- 建立抽象渲染器
- 探索 glTF 檔案格式
- 建立曲線、幀和軌跡
- 實作動畫片段
- 網格蒙皮
- 優化動畫流程
- 在動畫之間混合
- 實作逆向運動學
- 使用雙四元數進行蒙皮
- 渲染實例化群體