• Editor
  • Animation Transitions, Noob Question

Related Discussions
...

Hi guys,
I'm just getting into Spine Pro and I've got a REALLY noob question. :$

To my understanding, there is no way (and it's the whole point) to set up the actual animation transitions, the blending between 2 animations is done by Spine.

Now let's take a real basic setup, 2 animations, run and sword attack.
When I'm in animate mode and want to create my sword slash animation, I should Not begin by swinging my arm back, right ?
First frame should BE the arm in back position so when I transitate from any arm position to my attack, Spine can extrapolate the arm movement from whatever position to the position of sword attack frame 1, am I correct ? :wonder:

Now bonus question here :wait:
What would be the basic setup for :

  • attack by swinging arms (available during different animations : running, jumping)
  • attack implying the whole body including leg (like a more complex attack) -> for this one, I don't really get how the feet transition could not look weird from running to attacking.

Sorry for my poor knowledge, and thank you to those who'll get the courage to answer this ! 🙂

When I'm in animate mode and want to create my sword slash animation, I should Not begin by swinging my arm back, right ?
First frame should BE the arm in back position so when I transitate from any arm position to my attack, Spine can extrapolate the arm movement from whatever position to the position of sword attack frame 1, am I correct ?

Correct. If you set the first frame have the arm in the back position, Spine will mix from the current arm position to the arm in the back position when you mix the animations. How long this mixing takes is specified at runtime.

  • attack by swinging arms : Here you only animate the arms and not the rest of the body. This animation is then player on top of the other animations. Make sure you do not set keys for any other bones than the arms.

  • attack implying the whole body : This takes more work to get right if you don't want the feet to look strange when transitioning between running to attacking. You could make a separate animation for the feet that is played right before the full attack animation.
    I find it best not to worry about this too early. If the animations don't look good when blending you can add additional animations to use for blending, but first see if you can get by without extra animations.

Shiu a écrit

You could make a separate animation for the feet that is played right before the full attack animation.

First of all thank you for your answer Shiu.
About that feet/attack matter I didn't really understand what you meant by separate animation for feet before the full attack :$

The solution I imagine would be :

  • wait for the right frame before allowing the animation system to switch to the attack (like, if your attack is right foot steps forward and swing an axe turning your body the animation needs to wait for the right foot to be in that "back position" of the run cycle)

I can't really imagine how much this delay would impact the gameplay though :/

Then is that possible to come with a better version of this :

  • on attack input : speed up the animation to get faster to that frame -where the foot is in the right position of the cycle- then trigger the attack (pretty much the same than the first solution but reducing the delay)

I'm just throwing idea here, I haven't think of how this would be set up... ^^'

Mix times are often quite short, long enough to get smooth interpolation between animations without snapping, but not so long you notice things looking odd. There are some worst case scenarios, such as when one leg is forward for running but backward for an attack. Often even this can look just fine, eg click Roar on the first demo here:
Spine: Demos
It looks pretty OK even in the worst case, and the mix time is pretty long. Also keep in mind that demo is playing at 50% speed by default, you can use the slider to increase it.

If you really don't like the mix, you could have 2 attack animations, one with the leg in front, one in back. In your run animation loop, note two animation times: 1) when the leg is maximally in front, and 2) when the leg is maximally in back. When running and you start playing attack, use the animation time to determine which leg is more in front, then play the appropriate attack.

Before doing any of this, I suggest making sure the problem needs to be solved. You can use Skeleton Viewer to see how your animations mix. Soon you'll be able to do that in the editor.

Thank you Nate ! 🙂