If a model is compose of two cubes, upper cube and lower cube aligned along z axis, and lower cube is parent of upper cube.
Giving two skeletal animation:
animation A: upper cube keep static, lower cube rotate-z clockwise.
animation B: upper cube keep static, lower cube keep static
skeletal animation file stored local transformations.
that is,in animation A, lower cube may have two key frames: frame 0: rotate 0 degree, frame 50: rotate 360 degree
then blend A and B by
A: upper_weight = 1 lower_weight = 0
B: upper_weight = 0 lower_weight = 1
what's the correct result?
a. both upper and lower keep static
b. upper cube rotates counterclockwise
i think they should keep static, that's blend in global space, because A's lower weight = 0, means ignore lower transformations?
but if i blend them in local space, according to the A upper cube's local rotation, it will rotate.
i google and see people saying it's better to blend local transforms, but i don't think it gives the correct result, any suggestions?
i think they should keep static, that's blend in global space, because A's lower weight = 0, means ignore lower transformations?
No.
You said that the upper body is the child of the lower body. This means that if the lower body has a local rotation, this rotation affects the "global" rotation of every child of that bone.
Therefore, the "global" rotation of A's upper body will be a 360 degree rotation. Even if you mask off the transformation of the lower body, that's still the accumulated rotation defined in A's animation data. So if your animation data is stored as "global" transformations, then A's upper body will still have that rotation, even though the local transform is static.
This is a big part of why animations do not use "global" (more accurately, model-relative) rotations. If you want to be able to compose multiple animations, the only reasonable way to do that is locally, with each bone's animation relative to its parent.