A paper describing Dual Quaternion Skinning http://webir.tcd.ie/bitstream/2262/64125/1/sdq.pdf has some interesting solutions. Though I find it very hard to grasp.
What it does is that instead of passing 4x4 Bone matrices to the GPU, it passes 2x4 matrices containing Dual Quaternions. On the Vertex Shader the appropiate Dual Quaternions are weighted and added together to form the final Dual Quaternion. Which in turn is converted to a matrix that transform the vertex.
So here are some new questions:
Is it possible to apply the same weighting and addition used for skinning, to add together Animation Tracks?
Currently a T-Pose bone is built by converting a quaternion to a matrix, and building a translation matrix from a position vector, these are then multiplied to form the T-Pose bone. I could convert the T-Pose from matrix form to Dual Quaternion form, but can I build a Dual Quaternion directly from a quaternion and a PosVector?
So, is this how I should Animate characters?
1. Build T-Pose bones in Dual Quaternion form.
2. Create a list of animation tracks to blend and set a weight for each track.
3. For each bone, enter every animation track and get the Bone Quaternion at time t by Slerp(key1, key2, t'), convert it to Dual Quaternion, weight it and add it to T-Pose bone.
4. Combine all T-Pose bones which are now animated and send the skeleton to the GPU.
5. Use Dual Quaternion skinning to weight and add influencing bones and build a transformation matrix.
6. transform vertex by matrix, then by world matrix, then by view matrix and finally by projection matrix.
Am I thinking right?
I found an article describing "nlerp" http://number-none.com/product/Understanding%20Slerp,%20Then%20Not%20Using%20It/ . Supposedly it is more CPU friendly than Slerp and supposedly it is commutative, meaning I can blend the animation tracks in any order with the same results. Anyone here have experience with nlerp?