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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.