What we want:
Root motion with blending.
The problem:
When two animations are blended (in blend tree or transition) and the root bone is at certain (seemingly random) angle the entire bone flips an arbitrary amount of degrees in one frame, and then back a few frames later. The animations each works individually. It also sometimes work if only one of the animations contains rotation on several axes.
GIF of the issue: Imgur: The magic of the Internet
Our setup:
We are using 3d studio max 2016 CAT rig. The animations are exported with Binary FBX 2013, No baking.
General Settings: Smoothing Groups, TurboSmooth, Convert Deforming Dummies to Bones & Preserve edge orientation are checked.
Up Axis: Y-up.
System Units: Centimeters
3ds max version: 18, SP3
We’re on Unity 5.3.4f1.
Reproduce:
Import the attached package.
Open AnimationTestBroken
Goto the blend tree, change the blend amount to anything other than 0 and 1
Preview the animation.
At this point we’ve basically tried everything we can think of when it comes to import and export settings and redoing animations to try to find why it breaks, with no proper solution in sight. Anyone have any ideas?
2661004–187620–BlendingBug.unitypackage (264 KB)
Can you show the two animations you are attempting to blend separately?
You might try to export as fbx 2012.
If you feel comfortable providing a fbx 2012 I can double check it this evening, or a max 2017 file I can check tomorrow morning.
They’re in the attached UnityPackage. We just made some really silly animation to show of the problem. But it started out happening with more ‘normal’ animations.
We’ve tried exporting with fbx 2012, no difference.
Tried with the latest beta, 5.4.0 beta 19, still same issue.
So this is kind of an odd test case.
I’m a little confused what the expected outcome is? I would expect some odd results when trying to blend a jump left animation and a jump right animation together, both with root bone rotations that rotate in the opposite direction.
This example is essentially attempting to blend two nearly opposite animations together - so the test package is pretty much useless.
What was the more ‘normal’ animations you were attempting to blend together where you first saw this unexpected animation hitch?
Its a nice model and rig - Suggest just animating it instead of trying to use humanoid animations on a quadruped. More complications involved with that process.
The expected outcome is of course something weird (considering the nature of the test animations) but not strange arbitrary 90-180 degree one-frame flips. Our animator just threw them together to demonstrate the issue. Blending ‘opposite’ animations does work in other cases, it’s just with root motion with rotations on more than one axes that this happens.
The more normal animations were basically run animations with a small jump (run left jump, run forward jump, run right jump). Completely reasonable things to animate/blend, we thought. The same animations blend well and work as intended if we don’t do root motion but instead rather bake everything in unity (rotation, y, xz) or animate in place (we tried both).
We’re not trying to use humanoid animations, not sure what you mean? We’ve done all the animations from scratch for this rig specifically.
By the way, tried the attached package on 5.2.1, and it did work. Unfortunately, it was only those specific animations that worked, not our actual normal animations. Also tried 5.2.4, which had the same result as 5.3.4 and the 5.4 beta.
Agree - I was expecting something weird - I also could not correct the one frame flip - which is just bizarre.
Do you think the flip is due to some kind of gimbal lock as a result of blending the rotating root bone?
I think a bug report would be the correct approach here.
I can confirm your findings as I also tested on 5.2.1 and the blend worked.