Some problems with SpinePlugin. Correct the problem of model corruption when loading using Spine's mesh

I created a model to deform with Spine 3.6.52 and loaded it with SpinePlugin.
However, just by flagging the mesh, it was troubled that the vertices of the model became disjointed.
Since I could not find an article on how to cure, I write what I understood.

It seems that there is a problem with json data output by Spine, not a problem of Plugin.

This can be understood by comparing json of heromesh in SpinePlugin with json of hero-pro in Spine’s example

There is a problem with the tag of json data. Edit and fix it.

Spine: JSON export format
http://ja.esotericsoftware.com/spine-json-format
This is the official publicly available format

1.Rewrite “mesh” to “skinnedmesh”.
Look at the “skins” using the mesh.
See “type”.
“mesh” or “skinndedmesh”?
Look at “vertices”.
Format when it is just a rectangle = (x, y, x, y …) and “type”: “mesh”
Format when it is a mesh = (borncount, bornindex, x, y, weightbornindex …) and “type”: “skinnedmesh”
However, in most cases “type” is output as “mesh”.
This only supports format (x, y, x, y …). When skin is using mesh.
Open json and rewrite “type” directly from “mesh” to “skinnedmesh”.

2.Change all parts of “animation” written as “deform” to “ffd”.
“ffd” is not written in the official format.
But when you look at SpringPlugin 's heromesh json, the place of “deform” is all written as “ffd”.

I think that these two can be cured in general.

3.hero-pro’s foot is bent 90 degrees
Looking at “bones”, at the end of “foot 1” and “foot 2”
Rewrite the part written as「" transform “:” noRotationOrReflection “」 as follows.
「” InheritRotation “:” false "」

Since I can not find an article that touches on this problem in the first place,
I thought that my way of exporting was wrong.
However, I am fortunate to be of help to those who have the same problem.

The project that tried this problem
https://playcanvas.com/project/558612/overview/spine_meshmodel_test

2 Likes

Hi there,
Im using Spine 3.6.53,

I have created an octopus animation using bone and mesh,
It’s still doesn’t work in placavas,
I think I’m, doing export wrong in Spine,
Can you Please show me the options you have selected while exporting the file.

Thanks.

Hi Sai_Kiran,

Thanks for reaching out. As a first step, I’d suggest to try your exported file with Spine’s Skeleton Viewer - this would help us to see if the problem is with the asset creation / export process using Spine tools, or with rendering in Playcanvas. Please give this a go: http://esotericsoftware.com/spine-skeleton-viewer

Thanks
Martin

1 Like

Hey mvaligursky,
Thank you for your suggestion, I have opened the hero char in the spine-skeleton-viewer, It work.

however, I tried opening my file and it gives this the attached file error.
I have been using path tangent for the tentacle rigging to compare the diff between the Hero rigg and my rigg.

50

may I know what is that i’m doing wrong (export) from the file I have attached in the previous msg?

Hi Sai_Kiran,

I am not familiar with Spine Editor to this detail. I think it would be the best to seek the support on Spine website - either Forum or Support Section. When the exported file works in their Skeleton Viewer, that should make it work correctly in PlayCanvas as well.

http://esotericsoftware.com/forum/

Thanks
Martin

Thanks for the Info mvaligursky.
Appreciate your help. :slight_smile:

Hi Martin,

I’m having the error, even if the char is shown in skeleton viewer

Can you please suggest whats is that’s causing the problem

That’s a progress, glad you found out how to export it to play it in the skeleton viewer.
From the error message, it seems it still does not load using spine SDK, it’s not immediately clear what’s causing it. Are you able to share your project with me to have a look? (you can edit the team of the project and add mvaligursky to it).
Perhaps make sure all the slots are named … it seems some name is not set up correctly.

Hi Martin,

Here is the project.
Please let me know if have any thoughts.


I have used the same setup in a lower version of the Spine and it works now,
I think the latest version of the spine is not compatible with Playcanvas?

Hi Sai_Kiran
Octopus has moved so I will report it.
https://playcanvas.com/editor/scene/910499

What I tried
Open ellipes.json with a text editor
I saw three settings for “slots”.

  1. “Head-idel” of Head-idel
  2. “Tentacle-1-Idel-animation / Tentacle-1-Idel-animation_00000” of root
    Both were set in ellipes.atlas.

But 3. the name “tentacle-1”, which is the attachment of “tentacle-1”
I guess this is the cause of the error because it is not set in ellipes.atlas.
“tentacle-1” to “Tentacle-1-Idel-animation / Tentacle-1-Idel-animation_00000”
I fixed it and it was displayed safely.

In other words, as mvaligursky says, the reason is that the image name is not set.

By the way, I opened spine for the first time in a year
I was asked for an activation code, but I cannot log in because the password does not match.
So I’m not able to confirm the original data, sorry. XD