• Editor
  • My Autogenerated Transitions between animations are a mess

Hello dear community,

I am working on multiple animations for one character, right now I am just testing the transitions between two animations "Idle Normal" to "Combat Idle", here is the issue, when I put both together in the Timeline the transitions between both animations looks terrible, the images and even the bones go in an unintended position. I will put some examples below:

This Image shows the transition from one animation to the other one.

Here is the capture of the abomination.

For the project I am using the same bones, same images, nothing change apart from the positions. In the next image you will see more crearly what is being generated in spine:

Here you will be able to see the abomination and the "must not" movements that my images and bones are doing.

Summing up: Is there any configuration I am missing ? maybe a setting or parameter in Spine that I need to check for my transitions to be ok? Help please.

Related Discussions
...

I see the jumpy transition, but it's hard to tell why it's happening.

Are you using constraints that affect rotation and the mix is not 0 or 1? When a rotation mix is between 0 and 1, there are 2 ways around the circle, so Spine chooses the shortest way around. When your character is animating, the short way around may suddenly become the long way, causing your rotations to jump to the other side. For this reason it's often best to use rotation mix between 0 and 1 only briefly.

If you're still having trouble, can you send us the .spine file? contact@esotericsoftware.com

Hello Nate, thank you for the response, I sent the file via email. If I am not wrong I am not using any Rotation in my constraints, however, I might be missing something or not totally get what you are meaning in the explanation.

Thanks. Everything looks fine changing animations in the Preview view. I see you have a Test_2: Idle to Idle Combat animation and it shows jerky motion. Is that where the issue is? You wouldn't normally combine two animations into a single animation, instead you would play the animations at runtime using AnimationState to "crossfade" between them.

What game toolkit are you using? Here's a video explaining how it works with spine-unity:

All runtimes work similarly, so this is worth watching even if you use a different runtime.

You can use Preview to switch between animations, equivalent to calling setAnimation at runtime. Set the mix duration to control how long the mix (crossfade) takes.

Maybe your goal is to create custom transitions rather than have it done automatically? You can do that, though it's more effort than letting the Spine runtime do it for you. In your Test_2: Idle to Idle Combat animation, it looks like frame 60 is the end of the idle animation and frame 78 is where you pasted your next animation. Your problem is many of your timelines are not keyed in idle but they are keyed in the next animation (and vice versa, probably). Those timelines have the setup pose until frame 78, then they jump into place.

To fix it, make sure the dopesheet is unlocked, press space (or escape) to deselect, then set the timeline position to frame 60 and press ctrl+shift+L, which is a hotkey for Key Shown. This sets a key for all timelines shown in the dopesheet. Now your idle animation holds the pose for those problematic timelines until frame 60, then you get a transition from 60 to 78 for all timelines.

Note this will likely be a worse transition than using AnimationState. That is because AnimationState is playing the both animations while the first animation is mixing out. That makes for a smooth transition where everything is moving. After Key Shown as described, you'll find the animation sort of pauses during the transition. It would take some adjustment to make it look good. With enough work you could probably make it look as good or even better than AnimationState, the main downside to that is doing it for every possible transition between two animations, the number of which quickly becomes unmanageable. Another downside is if you change either animation, your transition animation may need to be redone.

Lastly, once you get your transition like you want. you probably delete all keys before 60 and all keys after 78, then move all the keys so frame 60 becomes from 0. That gives you just the transition animation, then you'd play idle with AnimationState, when you want to change you'd play the transition (with setAnimation) and then queue the next animation (with addAnimation).

Hello Nate, I gotta say that I tested the "Custom" way just for practical purposes and it definitly fixed the issues I described before, that's good understanding that as you said I could probably make it look even better (That's not our purpose now because we want to use the automaticatly generated transitions rather than custom ones however It is worthwhile have this knowledge).

Tackling your question about the Engine, we are moving to Godot, in regards to that my partner have a question, do you mind if I paste it here in the thread?.

It goes like this:

We will use the Godot Runtime (with .Net Support) but in the last version published (http://esotericsoftware.com/spine-godot) the GodotSharp folder is empty. Do I need to build the Editor from the source code to fix this?

Thank you,

You can build from source, but the downloads should work. My colleague Mario can take a look at it tomorrow and fix the download if needed.

Than you Nate, appreciate it.

Good morning Nate, this is maybe an unrelated topic considering the original title of this discuss. It's there a posible way to hide Slots only for one animation and at the same time keep it visible for the others?

  • Nate odgovara na ovo.

    Now, in regards to the Runtime, my Programmer partner updated me with the next:

    "I got this error when i try to run the editor. As you can see, i have the .net sdk installed but i think that the problem is that the GodotSharp folder is empty. How can I solve this problem?"

    18 dana kasnije

    Hello community, the info provided above was very useful, thanks, this time I come with a different situation also related to animations.

    I have multiple animations for my character, this time I want to create a custom transition, I made the involved frames into key frames:

    However, when I paste the keyframe into the "basic_attack_and_transition_together" animation seems like the bones positions supposedly copied from "idle_combat" is not being followed into the new animation uppon pasting:

    And this is the result:

    In my understanding, if I am copying a keyframe with the exact same images that should not be a problem, however what I am seeing is making me spend more time than the expected trying to fix this.

    Can anyone take a look into this and let me know what I am doing wrong?

    • Uređeno

    Keys belong to timelines. Each timeline represents the values of a property (sometimes more than one). For example, a rotate key on the head bone. If you copy and paste that key to some other animation, it will only change that property: rotation on the head bone. That is separate from any other keys you may have.

    It sounds like you want to copy/paste the entire pose. Instead you are copying the keys, which is not the entire pose if you have other keys, as explained in the last paragraph.

    Also, in your screenshot showing what you copy, some timelines don't have a key on frame zero, so you are not copying the value for that timeline (which comes from the setup pose). As explained earlier in this thread, you can use Key Visible (ctrl+shift+L) to set a key for every timeline, then copy the keys.

    Even when copying all the keys in one animation, when you paste, it will only set keys for what you copied. There are other properties that could be keyed in the animation where you pasted. Those other keys will be left unchanged and may affect the pose in a way you don't want.

    Lastly, when a key is the first key on a timeline and it is on frame > 0, the setup pose is used before the key value and the transition from the setup pose to the key is stepped. If you don't want this, you need to set an earlier key and configure the curve.

    It may help to do your test with only 1 or 2 keys in each animation so you can better understand what is happening. There are many keyable properties and you almost never want to set a key for ALL of them.

    If you want the position of all the bones from one animation to another, you can select all bones in the viewport, copy, go to another animation, and paste the bone positions. This may be more like what you want, but note that it won't bring over keyed values like IK constraint mix, etc. You can use a combination of copying keys and bone positions.