Dual quaternion blend skinning

Introduction

This is an implementation (in Direct3D 11) of the basic idea presented in this paper.

Code snapshot for this article (tagged dual_quaternion_blend_skinning-2016-10-16): .zip, .tar.gz. For latest version, go to the github page.

About

The idea is similar to linear blend skinning, except that instead of using a weighted linear combination of fully general matrices, we represent bone transforms as dual quaternions (which can represent rigid transformations), and use a weighted linear combination of those instead. This ensures that the blended transforms will not have certain undesirable properties, as the blended transforms are again just dual quaternions.

Future improvements

I have yet to add support for having a model with more than two bones, as well as having a vertex be affected by more than two bones. I think that this can be implemented easily by having a constant buffer of bone transformations (dual quaternions), and then adding to each vertex a four element long vector of indices referencing this constant buffer, beside the bone weights.

The dual quaternion normalization step can be optimized a bit, as pointed out in the paper. I haven't done that yet since I want to implement the above generalization first.