SpriterDotNet icon indicating copy to clipboard operation
SpriterDotNet copied to clipboard

Advanced blending features

Open Dharengo opened this issue 8 years ago • 7 comments

Is it possible to implement a feature that lets you blend together more than two animations?

What about a feature that blends a new animation into the current one?

Dharengo avatar Mar 20 '16 12:03 Dharengo

Blending multiple animations should not be complicated - I'll change the title of this issue and leave it as a to-do task.

Isn't blending a new animation into the current one the same as blending any two animations? If not - what's the difference?

loodakrawa avatar Mar 20 '16 22:03 loodakrawa

Well as it stands now, you have to know the names of both animations you want to blend, and they together become the new animation.

For example, you want to make a character blink once, but you want to do this regardless of whether the character is standing, walking or otherwise.

Dharengo avatar Mar 20 '16 22:03 Dharengo

Ah, ok, I understand. So it's something like blend animation X into the current one with a certain weight factor until animation X finishes and then continue playing current one?

loodakrawa avatar Mar 20 '16 22:03 loodakrawa

That and similar scenarios, yes.

Dharengo avatar Mar 20 '16 22:03 Dharengo

OK, I'll try to do this in a generic way that covers all the common scenarios and allows the users to create their own.

Probably I'll introduce a separate object with the blend info about all animations involved, methods that get called every frame to allow adjusting the blend factor(s) and callbacks for certain events (like animation finished).

loodakrawa avatar Mar 20 '16 23:03 loodakrawa

That would be cool. It'll go a long way in either implementing things like blend trees, or if Unity blend trees aren't directly possible (due to AnimatorController being horrifyingly difficult to tinker with), a different implementation that achieves the same effect.

Dharengo avatar Mar 20 '16 23:03 Dharengo

Just to complicate things further:

Transitioning from one blended state to another blended state. As well as transitioning only part of a blended state while leaving the other part of the state as is.

Dharengo avatar Mar 28 '16 16:03 Dharengo