• Editor
  • Problem applying animations in Playcanvas

Hello everyone!!
This is my first post in this forum. I came here before to look for answers and always was successful 🙂 , but now I have a problem I'm afraid I couldn't resolve by myself:

I have a sequence of animations, like this

Anim 1 (loop) > Anim 2 > Anim 3 (loop) > Anim 4 > Anim(5)

This is my code for that, first, the mixes:

this.entity.spine.state.data.setMix("normal","aburrido",0.2);
this.entity.spine.state.data.setMix("aburrido","aburrido_parpadeo",0.2);
this.entity.spine.state.data.setMix("aburrido_parpadeo","aburrido_enfadado",0.2);
this.entity.spine.state.data.setMix("aburrido_parpadeo","enfadado_parpadeo",0.2);

Then, the animations:

 this.entity.spine.state.setAnimationByName(0,"normal",true);
// Something happens and then:
this.entity.spine.state.setAnimationByName(0,"aburrido",false);                                    
this.entity.spine.state.addAnimationByName(0,"aburrido_parpadeo",true);
// And then lastly
this.entity.spine.state.setAnimationByName(0,"enfadado",false);                                    
this.entity.spine.state.addAnimationByName(0,"enfadado_parpadeo",true);

And the result I have is this:

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

Some elemets of the face are disappearing... then I change the animation tracks to something like this:

 this.entity.spine.state.setAnimationByName(0,"normal",true);
// Something happens and then:
this.entity.spine.state.setAnimationByName(1,"aburrido",false);                                    
this.entity.spine.state.addAnimationByName(1,"aburrido_parpadeo",true);
// And then lastly
this.entity.spine.state.setAnimationByName(2,"enfadado",false);                                    
this.entity.spine.state.addAnimationByName(2,"enfadado_parpadeo",true);

And I could fix everything BUT the mouth.. I still have the same problem. Any Ideas?

Thank you in advance!!!

Related Discussions
...
  • Изменено

Spine has different things happen on tracks and they acculumate together to generate the result.

I would check the enfadado animations to see if they set keys or touch the eye bones or slots.

Ideally, if you're using tracks, the 'higher' tracks have no impact upon the lower track's slots or bones.

The only time parts of the face would disappear is if part of your animation actually makes those parts disappear, even if temporarily.
Is this true for your animations?
If that's the case (pre-3.5), you need to always make sure the state you want to be able to see is keyed at the beginning of the animation you're playing. The version 3.5 runtimes remove this requirement.

Also, what's Playcanvas? Is the spine runtime you're using a third-party integration into it?
Did you integrate the js-compiled spine-ts into it yourself?

Thanks for you comments, Pharan and Xelnath.

First goes first:

Also, what's Playcanvas? Is the spine runtime you're using a third-party integration into it?
Did you integrate the js-compiled spine-ts into it yourself?

Playcanvas is a very nice 3D HTML5 and WebGL game engine, you should check it out: www.playcanvas.com

They just made a spine plugin, it's runtime is announced in the Runtimes page.

Pharan:

The only time parts of the face would disappear is if part of your animation actually makes those parts disappear, even if temporarily.
Is this true for your animations?
If that's the case (pre-3.5), you need to always make sure the state you want to be able to see is keyed at the beginning of the animation you're playing. The version 3.5 runtimes remove this requirement.

We've checked the anims, and fixed some stuff with the animation. And we have this situation: we made a separated scene:

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

Smooth and perfect. The problem comes when implementing this into scene.

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

I am completely noob at this, so not sure if I am doing somthing wrong. Code must be ok, as The first gif shows the transitions are smooth. But when we integrate it to the whole scene we have this issues with some face parts.

We use one only model with different skins.

This actually looks like a runtime code problem. It might be that the Playcanvas runtime is sharing things like draworder etc. across Skeleton instances, which would result in the problem you see in your second image. I'm afraid I can't find any information on the Playcanvas website about their new Spine integration, so I can't help more than that. In general, we don't do support for 3rd party runtimes. Could you also bring this up on the Playcanvas forums? They can also contact us if they need help with their runtime.

In fact, just with what you sais I could identify the problem. When I change the draw priority to an actor, some of the animations flick as we've seen.

Has it something to do with the way we animated it in Spine, or is it just a drawOrder priority problem of the runtime?

Really hard to say, the symptoms could be caused by many things.

Yeah, this sounds that the runtime from the Playcanvas guys is sharing data between instances it shouldn't. Please follow up with Playcanvas on the issue. I can't find any information on their Spine runtime anywhere.