• Editor
  • Up res to my already created hi-res art

Related Discussions
...

Back when I started my project I didn't understand correctly that one could create high resolution art, and then when exporting the atlas in Spine you can just select a scalar to create a smaller atlas suitable for a game runtime. Therefore, I have a set of high resolution images in Photoshop, and then a set of scaled down layers that are at a suitable size for the game runtime ... all my Spine animation data was created using these scaled down low resolution exported .png files.

So, I'm wondering i if I can correct this situation now even if its a pain to do once. If there is no way to do what I want from within the tool, perhaps there could be something done by exporting to a text format, running some tool over it, and re-importing it into Spine?

My first issue ... when switching a mesh that was deformed to use my high resolution image, the vertices are at the position for the old image size as seen in the screenshot attached. You can visually see that it would be a pretty easy scaling transformation that could get my vertex data from the old low resolution position to a new high resolution position .... I'm not not sure how to go about doing it.

Any thoughts much appreciated.

Export your project to JSON. Create a new project, delete the default skeleton. Import the JSON, specify a scale (eg 2 if your bigger images are twice as large). Use your larger images with this new project.

You can work in Spine using different resolution images than at runtime, so even the above is unnecessary. Leave your project with the smaller images. Run Spine's texture packer (on its own, not as part of export) and point it to your larger images. At runtime use this large atlas and specify a scale when you load the skeleton JSON (eg 2 if your bigger images are twice as large). This enables you to use bigger or smaller images at runtime (eg, for different screen resolutions), without changing your Spine project.

Thanks Nate.

I've been a little sloppy with the images in this part of the project, so I don't have a uniform or well known new size that I can easily use a scalar for.

I was doing a little experiment by exporting to JSON and then editing the exported text to point to my hi-res art and changing the "width" and "height" to be the correct new image size. Then I imported the JSON into a new project and it seemed to do what I wanted.

I'm currently in the process of just writing a little script that rips though my JSON and does the text replacement to the high resolution image with the corrected size ... does that seem like a reasonable approach or is there other data that I'll be missing in the conversion in this manner?

scale = newWidth / oldWidth
Eg, scale = 342 / 167 = 2.048.

You can use find and replace instead of a script.

You could just change your images path to point to a new folder if the different size images have the same name. It makes the most sense to use images with the same name in different folders.

Thanks Nate. I didn't know about the find and replace ... that's handy. I was able to get my rig using the up-ressed images by importing the JSON pointed at the new images with a scaling factor. It seemed to translate almost everything OK except for some positions of eyes and mouth on only one of my 20 heads for some reason, but totally doable.

Now I just have to tweak all the vertices for the new image sizes a little since I added some padding to them (the process makes adding future vertices outside of pixel data a bit easier) and fix any nodes that didn't have the right scaling because it wasn't consistent for me across all images from low to high.

Thanks much.