I wish to animate a human character by layering e.g. walking and shooting animations. At this point, I have implemented simple MD5 mesh animation system.
I suppose I will add masks for each animation to select the bones that they should affect. I would like that the upper-body animation (say shooting) could be reused for different character stances, which would be described by lower-body animations. The lower-body should control the root bone to move the whole character and the upper body should always follow.
I then see a problem in interpolation: thus far, I have first constructed two keyframes and then interpolated the final positions vectors and orientation quaternions of the bones. If I apply this to the two animations separately and then combine the animations, the upper body can appear incorrectly as the root bone is only affected by the lower-body animation.
One solution might be to interpolate the bones in local spaces for the two animations and then combine the animations. The parent multiplication would be performed during the combination procedure. Then the upper body would be transformed by a correctly transformed root bone. These operations probably don't commute, so it is not clear that this will lead to good results. How is this usually done?