• Editor
  • Export confusion...

Hi everyone,

Having a bit of spine export confusion with my team.

If I export as .png images with an atlas, is the use of a .json still required? as there is no option to export as .PNG with both an .atlas and also a .json. Are these .PNGs baked as such and not editable at a bone level in the code?

If I am still able to use a .json would I just use the one created when I run the Photoshop script on my images?

Thankyou, any feedback is much appreciated

Related Discussions
...

Hello Adamation,

The json exported from Photoshop includes only the position of the images(layers) inside your Photoshop canvas, therefore you can use it to import said position in Spine, but on export you wouldn't have animations, just this position, so you don't want to actually use this json.

When you export from Spine, on the contrary, 3 files are usually generated:

  1. the png file with all the images you used inside it. They are arranged to make the best use of space usually, therefore some may be rotated, etc.
  2. We said in the png file these images were arranged, rotated etc. how do we know where an image starts and how it was rotated? This info is stored in the .atlas file. This file simply stored the arrangement of all these images in the single/multiple png from the output.
  3. but then where are the animations? this is where the json that outputs from Spine comes in use. This file stores all the bones, the names, animations, skins, etc.
    Don't be fooled by the fact that both the Photoshop output file and this one have the same extension, because json is actually widely used to store information all across the web, and that's exactly what this json does as well.

Combining all of these files with the Spine runtimes you can read the information and make use of it in your game engine of choice.
I'm not a coder, so I made this explanation simpler 😛

For the code-savvy people, these pages go definitely more in-depth and can answer everything on a higher level: Spine: Documentation
Details on JSON format in Spine: Spine: JSON export format
Details about exporting (this is very useful if you want to know what every setting does and why): Export - Spine User Guide

Hi Erikari thanks for the explanation in simpler terms that is very kind and very much appreciated.

This leaves me with one more question, when I export > image as .PNG

I only get the .atlas and the .pngs once exported.

To then get the .json do I do a separate export > data as a .json (and uncheck ''Create Atlas'' as I already have one?)

Thanks again.

Png export is something you would use if you don't plan to use the spine runtimes, as the png is way heavier and yu can't do things like controlling bones through code etc.

Export Json is what people usually use in Unity, Game Maker, Corona, etc. and Create Atlas is the right way to obtain the images and the atlas file. Nonessential data allows one to reimport the info into Spine and Pretty Print makes it human readable. If you want to have the lightest version of a json you should uncheck these two options (but check Create atlas) to have the most common Spine export.

This is actually convenient because once set you just need to export everyting one time though the Json export (: