Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering C++ Game Animation Programming
  • Table Of Contents Toc
  • Feedback & Rating feedback
Mastering C++ Game Animation Programming

Mastering C++ Game Animation Programming

By : Michael Dunsky
close
close
Mastering C++ Game Animation Programming

Mastering C++ Game Animation Programming

By: Michael Dunsky

Overview of this book

With two decades of programming experience across multiple languages and platforms, expert game developer and console porting programmer Michael Dunsky guides you through the intricacies of character animation programming. This book tackles the common challenges developers face in creating sophisticated, efficient, and visually appealing character animations. You’ll learn how to leverage the Open Asset Import Library for easy 3D model loading and optimize your 3D engine by offloading computations from the CPU to the GPU. The book covers visual selection, extended camera handling, and separating your application into edit and simulation modes. You’ll also master configuration storage to progressively build your virtual world piece by piece. As you develop your engine-like application, you’ll implement collision detection, inverse kinematics, and expert techniques to bring your characters to life with realistic visuals and fluid movement. For more advanced animation and character behavior controls, you’ll design truly immersive and responsive NPCs, load real game maps, and use navigation algorithms, enabling the instances to roam freely in complex environments. By the end of this book, you’ll be skilled at designing interactive virtual worlds inhabited by lifelike NPCs that exhibit natural, context-aware behaviors.
Table of Contents (21 chapters)
close
close
Lock Free Chapter
1
Part 1: Populating the World with the Game Character Models
5
Part 2: Transforming the Model Viewer into an Animation Editor
9
Part 3: Tuning Character Animations
14
Part 4: Enhancing Your Virtual World
19
Other Books You May Enjoy
20
Index

Adding and removing model instances dynamically

Supporting multiple instances from multiple models was done by creating the class AssimpInstance in the model folder. Every AssimpInstance contains a smart pointer to access its base model, including the nodes and bones. Adding multiple instances of the same model requires one of two options to handle nodes and bones: using a copy of the node data structures in every instance or sharing the model’s nodes across all instances.

To avoid the duplication of all nodes in every instance, we will reuse the nodes of the model during the calculation of each final node position for the frame.

Reusing the bones for the sake of simplicity

To calculate the nodes during animation in the updateAnimation() method, we iterate the channels of the clip and use the model’s corresponding node:

  for (const auto& channel : animChannels) {
    std::string nodeNameToAnimate =
      channel->getTargetNodeName();
    std:...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering C++ Game Animation Programming
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon