Book description
Build your own OpenGL or Vulkan application in C++ and learn the latest techniques in character animation for modern games with this detailed, color guide
Key Features
- Learn how to create a game skeleton with keyboard and mouse controls along with modern graphics
- Gain insights into model loading, character animations, inverse kinematics, and debugging techniques
- Master the art of creating animated characters and controlling their various aspects
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description
If you‘re fascinated by the complexities of animating video game characters and are curious about the transformation of model files into 3D avatars and NPCs that can explore virtual worlds, then this book is for you. In this new edition, you’ll find expanded content on high-performance graphics and modern animation techniques, along with improved workflows and enhanced guidance on using OpenGL and Vulkan. You’ll learn everything you need to know about game animation, from a simple graphical window to a large crowd of smoothly animated characters.
First, you’ll learn how to use modern high-performance graphics, dig into the details of how virtual characters are stored, and load the models and animations into a minimalistic game-like application. Then, you’ll get an overview of the components of an animation system, how to play the animations and combine them, and how to blend from one animation into another. You’ll also get an introduction to topics that will make your programming life easier, such as debugging your code or stripping down the graphical output.
By the end of this book, you’ll have gained deep insights into all the parts of game animation programming and how they work together, revealing the magic that brings life to the virtual worlds on your screen.
What you will learn
- Create simple OpenGL and Vulkan applications and work with shaders
- Explore the glTF file format, including its design and data structures
- Design an animation system with poses, clips, and skinned meshes
- Find out how vectors, matrices, quaternions, and splines are used in game development
- Discover and implement ways to seamlessly blend character animations
- Implement inverse kinematics for your characters using CCD and FABRIK solvers
- Understand how to render large, animated crowds efficiently
- Identify and resolve performance issues
Who this book is for
This book is for curious C++ developers, game programmers, game designers, and character animators, either pursuing this as a hobby or profession, who have always wanted to look behind the curtain and see how character animation in games works. The book assumes basic C++ and math knowledge, and you should be able to read code and math formulas to get the most out of this book.
Table of contents
- C++ Game Animation Programming
- Contributors
- About the authors
- About the reviewers
- Preface
- Part 1:Building a Graphics Renderer
- Chapter 1: Creating the Game Window
- Chapter 2: Building an OpenGL 4 Renderer
- Chapter 3: Building a Vulkan Renderer
- Chapter 4: Working with Shaders
-
Chapter 5: Adding Dear ImGui to Show Valuable Information
- Technical requirements
- What is Dear ImGui?
-
Adding ImGui to the OpenGL and Vulkan renderers
- Adding the headers to the OpenGL renderer
- Adding the headers to the Vulkan renderer
- CMake adjustments needed for ImGui
- Moving the shared data to the OGLRenderData header
- Creating the UserInterface class
- Adding the implementation of the UserInterface class
- Adding the UserInterface class to the OpenGL renderer
- Creating an FPS counter
- Timing sections of your code and showing the results
- Adding UI elements to control the application
- Summary
- Practical sessions
- Additional resources
- Part 2: Mathematics Roundup
- Chapter 6: Understanding Vector and Matrix
- Chapter 7: A Primer on Quaternions and Splines
- Part 3: Working with Models and Animations
- Chapter 8: Loading Models in the glTF Format
- Chapter 9: The Model Skeleton and Skin
- Chapter 10: About Poses, Frames, and Clips
- Chapter 11: Blending between Animations
- Part 4: Advancing Your Code to the Next Level
- Chapter 12: Cleaning Up the User Interface
- Chapter 13: Implementing Inverse Kinematics
-
Chapter 14: Creating Instanced Crowds
- Technical requirements
-
Splitting the model class into two parts
- Deciding which data to keep in the model class
- Collecting the data to move
- Adding a new ModelSettings struct to store the instance data
- Adjusting the OGLRenderData struct
- Cutting the model class into two pieces
- Implementing the logic in the new instance class
- Enhancing the shader code
- Preparing the renderer class
- Changing the renderer to create and manage instances
- Displaying the instance data in the user interface
- What about Vulkan?
- The need for application speed
- Rendering instances of different models
- Using GPU instancing to reduce data transfers
- Textures are not just for pictures
- Summary
- Practical sessions
- Additional resources
- Chapter 15: Measuring Performance and Optimizing the Code
- Index
- Other Books You May Enjoy
Product information
- Title: C++ Game Animation Programming - Second Edition
- Author(s):
- Release date: December 2023
- Publisher(s): Packt Publishing
- ISBN: 9781803246529
You might also like
book
Hands-On C++ Game Animation Programming
Learn animation programming from first principles and implement modern animation techniques that can be integrated into …
book
Beginning C++ Game Programming - Second Edition
Get to grips with programming techniques and game development using C++ libraries and Visual Studio 2019 …
book
Beginning C++ Game Programming - Third Edition
Get to grips with programming and game development techniques using C++ libraries and Visual Studio 2022 …
book
Advanced C++ Programming Cookbook
A recipe-based guide to refining your C++ programming skills with the help of coding best practices, …