Crocodilum

Hello!

I needed to export a spine file into a JSON, to be able to import it into a new file having a reduced scale.
I read in your User Guide that having Nonessential data checked would keep some info, like bone color, or mesh info.

I made some diffchecker to see which kind of info was saved, and I saw the color info.


I also saw some informations about the meshes


So I understood what makes the JSON heavier if the Nonessential box was checked.

And if I wouldn't have check Nonessential Data, I'll have this error when importing.


Anyway, for my case, it's better to check the Nonessential Data. My question is, how does it work? Just been curious :happy:



What is exactely happening with the internal edges, as mentionned in the error message? I have the feeling Spine calculates some kind of ratio, because indeed, as in the screenshot, the bottom green image is exactely the same proportions as the original.
User avatar
Crocodilum
Posts: 137

Nate

With nonessential checked, the mesh edges are in the data. These are the connections around the hull and the connections made manually between vertices inside the mesh. Internal edges are normally created to control triangulation. Runtimes use the triangulation from the skeleton data, so edges are not needed at all, which is the definition of nonessential data. Internal edges may also be created because the animator likes how it looks, or wants to manipulate parts of the mesh and edges make it easier (especially when you select an edge while holding shift, for edge loop selection), eg the orange lines here:



If importing data with nonessential unchecked, Spine recreates the edges around the hull but it doesn't know about internal edges, so they are lost.

Nonessential data shouldn't cause a difference in the hull or UVs. Maybe its changing the image sizes that is causing it? The mesh image width and height is nonessential. Loading the data without knowing the mesh image width and height might change what Spine does when you change the images. Eg, if you let Spine load the larger images, it then knows the mesh images to be the large size, then when you replace them Spine will apply its resizing logic (which we know we need to improve). If you give it the resized images without it ever seeing the large images AND it doesn't know the expected image sizes since your imported data didn't have the nonessential mesh image width and height, then likely it won't apply the resizing logic.
User avatar
Nate

Nate
Posts: 8373


Return to Editor