I have a fully working skinned animation system that operates on matrices, and I'm working to get weapons and equipment parented onto bones.
Problem is, the code I'm using to batch draw static models (like for parented weapons/equipment on characters) positions the models based on translation/scaling/rotation values that are turned into matrices in the vertex shader.
I would like to do the same thing with the animation system. I want to represent each bone transformation as a position/scaling/rotation value to pass into the shader. This would allow me to use the position/scaling/rotation values from a bone directly to position the animated-model-attached models.
So, my question is: Is it possible to compute positions/scales/rotations for bone transformations using local bone translation/scale/rotation values instead of matrices? I don't know how to apply vec3 positions, float uniform scales, and quaternion rotations in a parent->child bone hierarchy to produce the correct results.
Is this possible, or will I have to suck it up and do all of the transformations with matrices, before running some kind of matrix decomposition to get the values back out. I could also draw the bone attachment items separately using the matrices, but I would rather render everything the same way.
Thank you guys!
Edited by DementedCarrot, 16 September 2013 - 03:47 PM.