• EditorBugs
  • Physics Constraint, Export & Import with Skin

Bonjour !
J'utilise votre contrainte physique (bêta), qui pour l'instant est vraiment très bien comme je l'ai déjà dit dans un autre post, mon seul probleme viens de l'import.

J'ai fait un système de preset pour le visage qui utilise de la physique pour les cheveux.
Ce système est destiné a être importé dans d'autre scène afin de faire gagner un temps précieux sur le rigging et grâce a la physique, du temps d'animation aussi, bref on s'éloigne du sujet.

Ce preset de visage possède plusieurs éléments qui ont des variations (yeux, bouche, cheveux, ect)
J'utilise la physique sur les cheveux avant et arrière, avec un total de 129 os utilisé (Certains pour un skin uniquement, d'autre sont partagés entre plusieurs skins)
Pour garder mon projet propre et rangé, j'ai tout mis dans les skins correspondant.
Cela fonctionne parfaitement, même sur Unity, il n'y a aucun problème a ce niveau.

Le problème vient quand j'importe les données (en utilisant "Import Data" et le JSON exporté du preset).
Quand il n'y a pas de skin, l'importation se passe sans aucun soucis.
Mais si il y a des contraintes physique à l'intérieur d'un skin, l'import rend une erreur :

Spine Launcher 4.1.09
Esoteric Software LLC (C) 2013-2022 | http://esotericsoftware.com
Windows 10 Pro amd64 10.0
NVIDIA Corporation, NVIDIA GeForce RTX 2060/PCIe/SSE2, 4.6.0 NVIDIA 536.23
Starting: Spine 4.2.09-beta Professional
Spine 4.2.09-beta Professional
Licensed to: <removed> Started.
OpenAL 1.1, Default audio device
ERROR: Error importing skeleton data file: C:\Users\Pentacles\Desktop\Unity Project\Spine Animation\Exported Animation\Export Test Physics\Skinned Physics.json
Veuillez vous assurer de choisir un fichier JSON ou binaire valide de squelette.
[error] Error reading skeleton: Skinned Physics
at s.ggR.(:664)
at s.ygt.(:317)
at s.ygt.L(:280)
at s.mlB.S(
:1065)
at s.aMt.L(:403)
at s.IVi.
(:91)
at s.aPo.
(:28)
at s.Csf.
(:188)
at s.Csf.
(:158)
at com.badlogic.gdx.scenes.scene2d.ui.Button.L(
:125)
at s.gtO.(:93)
at s.pKb.(:88)
at s.zfL.(:71)
at s.AYm.L(:354)
at s.Kdp.L(
:124)
at s.CFr.L(:104)
at s.vxo.
(:46)
at s.CFr.
(:35)
at s.Anm.run(
:259)
<events>
Cause: [ioob] index can't be >= size: 3 >= 0
at s.yPd.(:155)
at s.ggR.(:431) ...

J'ai fait des test sur des projet beaucoup plus petit, avec juste 6 os, dès le premier skin qui contient une physics, cela plante a l'import...

J'ai cherché mais je n'ai pas vu d'autre personne rapportant ce bug, j'espère donc que je ne fais pas un doublon

Related Discussions
...

Hello !
I'm using your physics constraint (beta), which so far is really great as I already said in another post, my only problem comes from the import.

I've made a preset system for the face that uses physics for the hair.
This system is intended to be imported into other scenes in order to save precious rigging time and, thanks to physics, animation time too, in short to get away from the subject.

This face preset has several elements that have variations (eyes, mouth, hair, etc.).
I use physics on the front and back hair, with a total of 129 bones used (some for one skin only, others are shared between several skins).
To keep my project neat and tidy, I put everything in the corresponding skins.
This works perfectly, even on Unity, there's no problem at all.

The problem comes when I import the data (using "Import Data" and the JSON exported from the preset).
When there's no skin, the import goes through without a hitch.
But if there are physical constraints inside a skin, the import returns an error:
(See "Detail" on the previous post)

I've done tests on much smaller projects, with just 6 bones, and as soon as the first skin contains physics, the import crashes...

I've searched but haven't seen anyone else reporting this bug, so I hope I'm not duplicating anything...

With research, I founded that my Spine Launcher is a little outdated so I updated it to the 4.2.02 launcher, and still getting the error.

Also, some resume of how to do it :
1) Create one bones
2) Add physics constraint
3) Create a skin
4) Assign the bones and the constraint to the skin
5) Export the data (Spine -> Export -> JSON)
6) Import the data (Spine -> Import Data -> JSON or binary)
The import fail with the error submitted upthere (I'll add the error of the newest launcher but it's the same error).

I dunno about the binary though, I don't know how to export it in binary.

Spine Launcher 4.2.02
Esoteric Software LLC (C) 2013-2023 | http://esotericsoftware.com
Windows 10 Pro amd64 10.0
NVIDIA Corporation, NVIDIA GeForce RTX 2060/PCIe/SSE2, 4.6.0 NVIDIA 536.23
Starting: Spine 4.2.09-beta Professional
Spine 4.2.09-beta Professional
Licensed to: <removed> Started.
OpenAL 1.1, Default audio device
ERROR: Error importing skeleton data file: C:\Users\Pentacles\Desktop\Unity Project\Spine Animation\Exported Animation\Eyes Base Physics\Face Base.json
Veuillez vous assurer de choisir un fichier JSON ou binaire valide de squelette.
[error] Error reading skeleton: Face Base
at s.ggR.(:664)
at s.ygt.(:317)
at s.ygt.L(:280)
at s.mlB.S(
:1065)
at s.aMt.L(:403)
at s.IVi.
(:91)
at s.aPo.
(:28)
at s.Csf.
(:188)
at s.Csf.
(:158)
at com.badlogic.gdx.scenes.scene2d.ui.Button.L(
:125)
at s.gtO.(:93)
at s.pKb.(:88)
at s.zfL.(:71)
at s.AYm.L(:354)
at s.Kdp.L(
:124)
at s.CFr.L(:104)
at s.vxo.
(:46)
at s.CFr.
(:35)
at s.Anm.run(
:259)
<events>
Cause: [ioob] index can't be >= size: 3 >= 0
at s.yPd.(:155)
at s.ggR.(:431) ...

Ha, cool Details expanding section. I didn't even know the forum had that. You can also use a code block with ``` on a line by itself, before and after your text:

like this

This was a bug in 4.2.09-beta. Sorry it caused you suffering, but thanks for letting us know! We've fixed it in 4.2.10-beta. We hope to release that soon, though it may still be a couple days as we finish up folders for constraints and slots. That has been... quite a project.