• Unity
  • Mecanim Transitions with Interruption Source Problem

Hello there, its me again with more problems with Mecanim.
Now I find another bug that I tried each settings I can think of, and I found a solution, but not a ideal one, so maybe there is another way.
What is happening is that I have some clips that I want to blend with some smooth transition, so I put transition around 0.4.

But to work it right I need to put a interruption source since I need to change animation instantly even if the animation is between a transition.
For the Spine Mecanim I put Auto Reset and all the MixiMode to Always Mix.

With this settings what happen is, if I change the animation during a transition the animation don't auto reset and all bones that aren't animated in the next clip stay where it was in the previous animation.

So I decided to create a keyframe for every bone on spine in the first frame, but it not worked as well.
The only way it worked is I create a animation with every single bone. Even to change 1 pixel or 1 degree. But it need at least 2 keyframes for each bone on rotation position and scale on each animation.

This way works perfectly, but extreme unproductive and annoying.

Am I missing something or is in fact a bug on Auto Reset?

Related Discussions
...

In general it is not recommended to use Always Mix on the base layer or on Override layers, see the documentation pages. Anyway, unless you know exactly what you are doing, it is best to disable Custom MixMode which will use the recommended mix mode at each layer.

We have just discovered a bug with default MixMode initialization, which is now following the recommended values, sorry for the inconvenience! A new 3.8 unitypackage can be downloaded here as usual:
Spine Unity Download: Download

Could you please try if the issue persists when disabling Custom MixMode?
If it does: Does the rotation get reset after the interruption animation has ended?

6 giorni dopo

Well, what happened when I disable Custom MixMode it simply jump to 1 animation to another instantly without smooth. If I increase the transition time inside mecanim, it stay in the first animation during the transition and when the animation transition is over, it simply change to the next animation without any blend in between.

The animations positions and rotation in fact is reseted but I don't have any smooth transition. What should I do?


Like I said before, I retried all configs, and the only problem with AlwaysMix is when I use Interruption Source in the Mecanim Transition Settings.
If it set to None, the animations blend perfectly, but if I changed to anything else, and I change the animation during a transition, the first animation aren't reseted.
What I believe is happening is that is when there are 3 animations blending together first 1 is ignored and isn't reseted, because when you use a Interruption Source, in fact you have 3 animations combined, since you have 2 animations and a transition and you stop that transition in the middle and start a new transition to another animation.

I am having a hard time expressing myself, but I hope you can understand what is happening. I can try to make a video showing what is going on, if you need.

MichelVictor ha scritto

Well, what happened when I disable Custom MixMode it simply jump to 1 animation to another instantly without smooth. If I increase the transition time inside mecanim, it stay in the first animation during the transition and when the animation transition is over, it simply change to the next animation without any blend in between.

During a transition interruption, the result of e.g. a Bone rotation is as follows:

result = lerp(lerp(A, B, interruptionTimepoint), C, time);

However, this only applies when all three animations key the bone rotation. If only A and B key the bone rotation, you will end up with the static rotation of

lerp(A, B, interruptionTimepoint)

until the transition to C is complete, then as A and B are no longer playing, Auto Reset takes effect and immediately clears the Bone rotation to setup pose. This is most likely why you see a non-smooth transition there.

So the fix should be to set keyframes as you pointed out in your first posting:

MichelVictor ha scritto

So I decided to create a keyframe for every bone on spine in the first frame, but it not worked as well.
The only way it worked is I create a animation with every single bone. Even to change 1 pixel or 1 degree. But it need at least 2 keyframes for each bone on rotation position and scale on each animation.

Did you perhaps enable Animation cleanup at export as shown here? If so, then all keyframes identical to setup pose will be removed, which would explain why you are seeing no effect at setup pose rotation, but do see an effect with minimal rotation added. Could you please check whether Animation cleanup is enabled and disabled it before a re-export?

Harald ha scritto

So the fix should be to set keyframes as you pointed out in your first posting:

Harald ha scritto

Did you perhaps enable Animation cleanup at export as shown here? If so, then all keyframes identical to setup pose will be removed, which would explain why you are seeing no effect at setup pose rotation, but do see an effect with minimal rotation added. Could you please check whether Animation cleanup is enabled and disabled it before a re-export?

Yes it was enabled, I disabled and now it worked with the first frame key. At least this is better than make small animations! Thank you for the assistance.

You're welcome, thanks for getting back to us.