• RuntimesUnity
  • Spine animations reused in Unity by other Skeleton

Hi,

I have a case here that I would like to double check, this will define how we´ll proceed with our production.
We have a spine file with a bunch of fighting animations, this file was duplicated and other art was rigged.
None of the base bones was changed, it is an humanoid structure. We only added physics IKs and extra bones to the new character.

Using the first spine file animations in this new spine file works perfectly on Unity. Even though I change the bones name, such as the arm bone.

Here is the test in real time in Unity:

Is possible to confirm this works? I mean, I can see it is working, but the reason it does is unclear to me. Even if I change the bone name this works.

But regarding slot changes in the animation, that does not went through. As its possible to see only the original (character in the right) changes this face expressions. Both have the same slot name and skin slots names identical.

SLOTS test failed:

Here is the list and name of the slots, it follows the exact same structure for both spine files.

If the bones works (would be great to learn why), is there a workaround to make the slots also work?

Thank you,
Andre

  • Misaki ответили на это сообщение.
    Related Discussions
    ...

    In Unity, it is possible to reuse animations from one Spine skeleton on another, even if the bone names have been changed, as long as the bone structure remains compatible. This is because the animations are applied based on the bone hierarchy and not strictly on the bone names. However, when it comes to slot changes, such as changing attachments or expressions, these are keyed specifically to the slot names and attachments. If the slot names and attachments are not identical or not correctly keyed in the new skeleton, the slot changes will not be applied. To make the slots work, ensure that the slot names and the attachments are identical and correctly keyed in both skeletons.

    decoamorim In your description, I understand that there are two skeletons with the same basic rig (but not identical. Another skeleton is made by duplication), but I am a little unclear about the "using the first spine file animations" part. Does that mean they use the same AnimationReferenceAsset?

    It is possible for a skeleton to work with another skeleton's animation reference asset if the skeletons have the same name for their animations. For example, it is possible to play Hero's run animation with Spineboy's run animation's AnimationReferenceAsset still set.

    Why this happens is as explained in the script:

    So if the animation name matches, it may work. However, animating skeletons with different rigs by using another skeleton's AnimationReferenceAsset is not the recommended method. Use the AnimationReferenceAsset of the appropriate skeleton.

    Hi Misaki,

    I´m not sure about the usage of the AnimationReferenceAsset. Is this something running on the backend of the integration or it must be created and implemented to aim this function.

    But to not get this too complicated. What I meant is that:
    Animations are implemented using Unity´s Animator (Mecanim).
    Therefore:
    1.Spine Hero A - has all the animations.
    2.Spine Hero B - uses in Unity the Spine Hero A animations.

    But now running some tests I´ve noticed it is actually simply calling "Spine Hero B" equivalent animation as you said.

    I´m trying to improve our workflow in that regard, by centralizing the animations in "Spine Hero A" as it will have the same animations for all characters: for instance the get hit animations, etc...

    Can you point me to the right direction to optimize that in production.
    To avoid having to update all characters, per character, if we update animation "getHit_1" for example.
    In this example, we would need to update getHit_1 in all spine characters: Spine Hero A , Spine Hero B, Spine Hero C, Spine Hero etc...

    Thanks!

    decoamorim I’m glad to hear you've figured it out! Also, thanks for posting the video. It will be helpful in case you want to apply the same animation between different skeletons. 🙂