
Hands-On C++ Game Animation Programming
Learn modern animation techniques from theory to implementation with C++ and OpenGL
- 368 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Hands-On C++ Game Animation Programming
Learn modern animation techniques from theory to implementation with C++ and OpenGL
About this book
Learn animation programming from first principles and implement modern animation techniques that can be integrated into any game development workflow
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.
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Information
Chapter 1: Creating a Game Window
- Open a Win32 window
- Create and bind an OpenGL 3.3 Core context
- Use glad to load OpenGL 3.3 Core functions
- Enable vsynch for the created window
- Understand the downloadable samples for this book
Technical requirements
Creating an empty project
- Open Visual Studio and create a new project by going to File|New|Project:
Figure 1.1: Creating a new Visual Studio project - You will see your project templates on the left-hand side of the window that pops up. Navigate to Installed|Visual C++|Other. Then, select Empty Project:
Figure 1.2: Creating an empty C++ project - Enter a project name and select a project location. Finally, click Create.

Creating the application class
Adding an OpenGL loader
Getting glad
- Go to the site, select Version 3.3 from the gl dropdown, and select Core from the Profile dropdown:...
Table of contents
- Hands-On C++ Game Animation Programming
- Why subscribe?
- Contributors
- About the author
- About the reviewer
- Packt is searching for authors like you
- Preface
- Chapter 1: Creating a Game Window
- Chapter 2: Implementing Vectors
- Chapter 3: Implementing Matrices
- Chapter 4: Implementing Quaternions
- Chapter 5: Implementing Transforms
- Chapter 6: Building an Abstract Renderer
- Chapter 7: Exploring the glTF File Format
- Chapter 8: Creating Curves, Frames, and Tracks
- Chapter 9: Implementing Animation Clips
- Chapter 10: Mesh Skinning
- Chapter 11: Optimizing the Animation Pipeline
- Chapter 12: Blending between Animations
- Chapter 13: Implementing Inverse Kinematics
- Chapter 14: Using Dual Quaternions for Skinning
- Chapter 15: Rendering Instanced Crowds
- Other Books You May Enjoy