Understanding how to use dual quaternion skinning
This section will explore how you can take the dual quaternion skinning code that you have written so far and implement it in an existing application. This code is meant to be for reference only; you do not have to follow along with it.
Using the dual quaternion-skinned shader is trivial; it would be easy to switch between skinning methods at runtime. The following steps demonstrate how the dual quaternion shader or a linear-skinned shader could be used to animate the same model.
Keep track of both the dual quaternion pose palette and inverse bind pose palette, as well as the linear blend pose palette and inverse bind pose palette. Have a look at the following code:
// For dual quaternion skinning std::vector<DualQuaternion> mDqPosePalette; std::vector<DualQuaternion> mDqInvBindPalette; // For linear blend skinning std::vector<mat4> mLbPosePalette; std::vector<mat4> mLbInvBindPalette;
When the application...