shadowslair

Hello, while experimenting with ik constraints I noticed some weird things going on, so I`ll try to describe them here:

Repo steps:
1) Create a Spine project and setup a scene using 1 or 2 bone ik constraints
2) Modify the Ik constraint timeline`s 'Options', leaving the 'Mix' untouched at 100
3) Export to .json and check the exported values
4) Notice there might be a problem

According to Spine: JSON export format: IK constraint timeline the ik constraint options can be animated.
For 1 bone ik:
- Mix
- Compress
- Stretch
- Uniform (not mentioned in docs as animated, but it is not disabled in Animate mode)


For 2 bone ik:
- Mix
- Smoothness
- Positive (Bend positive)
- Stretch


I created a test project:
ik.spine
which has the mentioned animations.
If you drag over the timeline you`ll be able to see how the options change in time.

The resulting file is here:
ik.json

"ik": {
"1 bone ik": [
{}
],
"2 bone ik": [
{ "time": 1, "stretch": true, "curve": "stepped" },
{ "time": 2.3333, "curve": "stepped" },
{ "time": 3, "bendPositive": false, "curve": "stepped" },
{ "time": 3.6667, "stretch": true, "curve": "stepped" },
{ "time": 4, "bendPositive": false, "stretch": true }
]
}
Obviously, the "1 bone ik" is missing the animated "Compress" and "Stretch" parameters. I did not animate the "Uniform" parameter because it`s not mentioned in the docs and is treated as constant for the whole animation, although in this case it should be disabled (grayed out) in Animate mode.

If I make changes to the "Mix" parameter, then some values are exported, but I want the "Mix" to stay at 100%.

The "2 bone ik" animation has most of its parameters exported, although the "Softness" is animated, but not exported. It's also missing the key at frame 40 (time 1.33) where the "Stretch" parameter changes from 'true' to 'false'. It's missing key at frame 60 (time 2.0), where the "Smoothness" parameter should change. The "Positive" and "Stretch" are at default values, but "Smoothness" is not, so key should not be skipped here. Similarly, it`s missing the keys at frame 70, 90 and 100, which do hold changes.

Overall, I'm a bit confused with this output, also which parameters I can and cannot change.
When I import the .json back to Spine I see different visual output, so I guess this in not the expected behavior.

Thanks for your time.
У вас нет необходимых прав для просмотра вложений в этом сообщении.
Аватара пользователя
shadowslair
  • Сообщения: 8

Nate

Sorry for the delay. It looks like you have covered the problem thoroughly. We'll dig into this today!
Аватара пользователя
Nate

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

shadowslair

Any updates on this?
Аватара пользователя
shadowslair
  • Сообщения: 8

Nate

Apologies again! We have dug into this and there were a surprising number of issues. Softness wasn't being written in the JSON correctly, the wrong curve type was used, and animation clean up was incorrect for IK constraint timelines. We've made the fixes in 3.8.76, which should be available later today. No changes to the Spine Runtimes were needed.

Thanks for reporting the problem! :beer:
Аватара пользователя
Nate

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

shadowslair

Thanks for the fix. Any more bugs I find I`ll report them as well. :beer:
Аватара пользователя
shadowslair
  • Сообщения: 8


Вернуться в Bugs