Vadym

Hi. PixiJs Game having issues after few animations switches. For example vfx wich are visible in setup pose come becomes visible on switching. Or some assets which becomes hidden only on some animations after few cycles not apearing any more.

A have been asked by Devs to make setup pose same as 1st frame of animation and to hide all vfx in setup pose(like in first frame) to give them possibility to reset state ect.
It seems strange to me) because I thought that setup pose is just for comport of animator, am I wrong? Is it ok for all PIxiJs games? ( After rig I used to change pose a bit and also character usually has different states).
Vadym
  • Сообщения: 32

Nate

Sorry for the delay!

You're right that the setup pose is for the comfort of the animator, though it is also used for other things. The programmer can explicitly reset the bones and slots to the setup pose. When using AnimationState to mix (crossfade) and layer animations, the setup pose can be used as the state to return to when something is not keyed in the animations being applied.

You don't want to key all slots to hide attachments on the first frame of every animation. You want to minimize the number of timelines that need to be applied at runtime, and doing that would add a timeline for each slot. It's not a lot of processing power wasted, but it's completely unnecessary. The programmer can reset the slots when they change animations, if they want, eg:
skeleton.setSlotsToSetupPose();
animState.setAnimation(0, "run", true);
However, even that should be unnecessary. If you are using AnimationState and encountering the wrong attachments being shown, that would be a bug that we'll fix. First, are you using the 3.8 runtimes? If not, that is the first step. If so, can you reproduce the problem using Preview or Skeleton Viewer? If so, please send us the project and instructions on how to reproduce the problem: contact@esotericsoftware.com If you can't reproduce it there, then it could be a problem specifically with spine-ts, which is what Pixi uses. In that case, please ask your programmers to make a simple-as-possible app that shows the problem. Ideally they use spine-ts rather than Pixi, as we don't actually do Pixi ourselves (the Pixi guys integrate our spine-ts runtime).
Аватара пользователя
Nate

Nate
  • Сообщения: 9302

Vadym

Thank you so much! I will manage that in few days and write you again.
Vadym
  • Сообщения: 32

artofshada

Hi guys! Animator here! I've encountered this issue also and I still can't find a fix for it. When changing between animations, the objects get stuck in setup mode and because my setup mode it is not identical to the 1st frame of each animation, everything looks weird.
So, I've been asked to make the setup pose identical to the first animation frame but this is absolutely crazy as I have tons of bones and slots to change one by one and everything I change in setup mode messes up all the animations. Is there an easier fix for this? Preferably a code solution to avoid sending the animations into setup mode when switching between them?

PS: I'm using Spine 3.8.61
Dev side: PixiJS engine.
artofshada
  • Сообщения: 2

Nate

There is no requirement that animations be identical to the setup pose on the first frame. If your programmers are using AnimationState, the only way things can get stuck is if they use AnimationState clearTracks or AnimationState clearTrack. If you can show in the Skeleton Viewer how to change animations in a way that causes attachments to be shown when they should not, then we can fix it. Alternatively, maybe your programmers can provide AnimationState method calls that cause the skeleton to be in a bad state. Either way, we need to be able to reproduce the problem. Please note that debugging your entire application is not within the scope of our support, so we rely on you to isolate the problem.
Аватара пользователя
Nate

Nate
  • Сообщения: 9302

artofshada

thank you! I will check it out with the devs.
artofshada
  • Сообщения: 2


Вернуться в Runtimes