Loading bones in the mesh renderer

In this recipe, we will modify the mesh renderer to support transforming vertices based on the underlying bone structure. This necessitates the loading of the armature from the loaded mesh. This is required in order to implement mesh animations.

The Visual Studio graphics content pipeline includes bones and animations from Autodesk FBX models in the resulting CMO file. Bones are stored in the file as an array of bones, consisting of a parent index and the inverse bind pose, the bind pose, and bone local transform matrices. The root bone in a hierarchy of bones has a parent index of -1.

Getting ready

We will be using a new Autodesk FBX model along with a texture file that can be found in the downloaded content. The ...

Get Direct3D Rendering Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.