Matrix Additive animations


I’ve recently been trying to use additive animations and have hit a few issues. I have looked through the forum for answers, and did find a number of useful topics, but as I am using babylon animations and skeletons rather than glb I’m not sure that they are relevant to my specific issues.

I have a skeletal character exported from Maya. I also have a number of skeletal animations for this character that have also been exported from Maya within animation groups.
Looking into the .babylon animation files I can see that all animation frames are configured to edit the _matrix parameter of a bone rather than storing the quaternion, scale and position separately.

If use the AnimationGroup.MakeAnimationAdditive method to make the animation group additive, the animation looks fine, but is not additive. Instead it seems to be ignored. Note that this animation is actually just rotations, but has been turned into matrices when exporting from maya.

If I set the isAdditive property of the animation group to true then the animation distorts the character in strange ways and I am unsure if the animation is actually additive.

I guess overall, my question - can animation groups be additive if they are matrix animations? If so, can someone help me figure out what I’m doing wrong please?

Thank you

Just a quick update, I have narrowed the issue down to having seperate animations where one is setting the bone’s quaternionRotation, and the other is setting the _matrix, so it’s not a surprise that one is not taking effect.
This is happening despite both save animation files explicitly setting the _matrix, so there is a conversion from _matrix to quaternionRotation somewhere…
The thing is, it may be my code… so I’ll report back when I’ve figured it out. No point anyone else wasting their time… sorry to bother everyone

This was in fact my code. I forgot that a while ago I had written a conversion from a matrix animation to a quaternion one. The base animations used this code, but the additive animations did not. So the base animations were animating the quaternion of a bone and the override animation was updating the _matrix of a bone and the override animation was probably being lost as it would be recalculated when the skeleton realised the quaternion was dirty.

1 Like