titidatiti

I'm using the lastest version of Spine Editor (4.0.56 pro) and I found there is something wrong with layer mixing. :bigeyed:
I guess this is due to the calculation of rotations around 360 degree. :think:

The animation on layer 0 has some hair bones with rotation around 10 degree.
The animation on layer 1 has some hair bones with rotation around 300+ degree.

When I mix the layers with different alpha, some of the hairs just rotate to the other side:
[wrong] 【Layer 0】100%, 【Layer 1】25%
1.gif

[Correct] 【Layer 0】100%, 【Layer 1】0%
2.gif

[Correct] 【Layer 0】100%, 【Layer 1】100%
3.gif


If there is nothing wrong, the hair should be in this area (Layer 0: 100%, Layer 1: 25%):
desiure.png


Is there any way to fix this problem or is this a bug in the new version editor?
There is no such problem in version 3.8. It only occurs after the updating.
Thank you!
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
Avatar
titidatiti
  • Postovi: 34

Nate

Can you email use the project file and images so we can see the problem firsthand? contact@esotericsoftware.com Please include a link to this post and we'll take a look ASAP.
Avatar
Nate

Nate
  • Postovi: 11852

titidatiti

Nate je napisao/la:Can you email use the project file and images so we can see the problem firsthand? contact@esotericsoftware.com Please include a link to this post and we'll take a look ASAP.
Thank you for reply.
I've posted the email. Hope the project file can help you to find the problem.

---

Are there any new developments? :)
Avatar
titidatiti
  • Postovi: 34

Nate

I'm very sorry for the delay!

We've received your project, thanks. It's a known issue, but we have some new ideas for fixing it, so I don't want to tell you there's no solution until we're sure. We'll work on it more tomorrow (Monday)!
Avatar
Nate

Nate
  • Postovi: 11852

titidatiti

Nate je napisao/la:I'm very sorry for the delay!

We've received your project, thanks. It's a known issue, but we have some new ideas for fixing it, so I don't want to tell you there's no solution until we're sure. We'll work on it more tomorrow (Monday)!
Glad to hear you have new ideas. Hope these ideas will work! :D
Avatar
titidatiti
  • Postovi: 34

Nate

When animations are on two tracks and mixed using TrackEntry alpha, the rotation for a bone from each track needs to be combined. How do we choose some percentage between rotations? It could be eg 25% around one way, or 25% around the other. We choose the shortest direction the first time the mixing happens and remember it, then use that direction for the rest of the mix. We do that because the rotations being mixed are animating, so which way is shorter can change and we don't want bones flipping to the other side mid-animation.

What happens for you is the initial direction that is chosen ends up not being the best direction for the rest of the animation. In other words, the bones are rotated the short way around at first, but then your bones rotate a lot, so that direction becomes the long way around and then your bones are pointed 180 degrees from the direction you want them.

We revisited the problem, but unfortunately there's not a great solution. The best we can do is provide an alternative way of mixing rotation. We could always choose the shortest rotation direction, without remembering the initial direction. This happens to work better for your particular animations. We'll start by making this an option at runtime, then the Preview view will need a setting for it somewhere.

Another option you have, and can do now, is to use additive animation, which doesn't have this problem:
Preview view - Spine User Guide: Additive

---

The runtime setting is TrackEntry setShortestRotation. It's in the 4.1-beta branch for the spine-libgdx runtime, will be in the others soon.
If true, mixing rotation between tracks always uses the shortest rotation direction. If the rotation is animated, theshortest rotation direction may change during the mix.

If false, the shortest rotation direction is remembered when the mix starts and the same direction is used for the restof the mix. Defaults to false.
Avatar
Nate

Nate
  • Postovi: 11852

titidatiti

Nate je napisao/la:When animations are on two tracks and mixed using TrackEntry alpha, the rotation for a bone from each track needs to be combined. How do we choose some percentage between rotations? It could be eg 25% around one way, or 25% around the other. We choose the shortest direction the first time the mixing happens and remember it, then use that direction for the rest of the mix. We do that because the rotations being mixed are animating, so which way is shorter can change and we don't want bones flipping to the other side mid-animation.

What happens for you is the initial direction that is chosen ends up not being the best direction for the rest of the animation. In other words, the bones are rotated the short way around at first, but then your bones rotate a lot, so that direction becomes the long way around and then your bones are pointed 180 degrees from the direction you want them.

We revisited the problem, but unfortunately there's not a great solution. The best we can do is provide an alternative way of mixing rotation. We could always choose the shortest rotation direction, without remembering the initial direction. This happens to work better for your particular animations. We'll start by making this an option at runtime, then the Preview view will need a setting for it somewhere.

Another option you have, and can do now, is to use additive animation, which doesn't have this problem:
Preview view - Spine User Guide: Additive

---

The runtime setting is TrackEntry setShortestRotation. It's in the 4.1-beta branch for the spine-libgdx runtime, will be in the others soon.
If true, mixing rotation between tracks always uses the shortest rotation direction. If the rotation is animated, theshortest rotation direction may change during the mix.

If false, the shortest rotation direction is remembered when the mix starts and the same direction is used for the restof the mix. Defaults to false.
Glad to hear that. I'm using Unity and I will wait until the runtime is ready. Thank you! :D
The "additive" feature sounds interesting, but I cannot find it in the preview window. My Spine editor version is 4.0.58 PRO. I also checked the 4.1.14-beta Pro and still cannot see the button. :lol:
QQ截图20220120114610.png
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
Avatar
titidatiti
  • Postovi: 34

Misaki

The Additive button will only appear when track 1 or more is selected.
additive.png

It will appear on the row of Alpha. There is no need to update to 4.1.
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
Avatar
Misaki

Misaki
  • Postovi: 651

titidatiti

Misaki je napisao/la:The Additive button will only appear when track 1 or more is selected.
additive.png

It will appear on the row of Alpha. There is no need to update to 4.1.
Thank you!
Avatar
titidatiti
  • Postovi: 34


Natrag na Editor