• Editor
  • Automatically adjust the size value when exporting


Hello, 🙂

I'd like to request a function that I need

When exporting a spine, the original image is large, so if you want to tie it to the Atlas image in size 512x512, it's cumbersome to check by adjusting the size value several times. This part is more annoying than I thought.

So, the function I want is that if you set the size (512x512), the size value is automatically adjusted and exported according to the size.

If you have that function and I don't know, please teach me

Thank you.

Related Discussions
...

This is harder than it seems. The only way we can know if the images fit within a size is to do the full packing. Then if too large, how much do we reduce the scale? If we reduce it a small amount, it will still be too large and we'll have to do it again, potentially hundreds of times. If we reduce by too much, you won't be happy that your stuff is tiny. If we did pack many times to figure out the optimal value, it will be very slow.

Is there a reason it needs to fit on such a small image? 512x512 is quite small. There should be no problem using 1024x1024 or 2048x2048 on mobile devices.

Is there a reason you choose power of two and square? Those options will make the image larger than necessary. Blank parts of the image still take up the same amount of memory at runtime. Ideally you uncheck both of those, set the min size to something low like 256x256 (or lower, but if the min size is much lower than the actual size packing will take a little longer) and set the max size to something large but still reasonable like 1024x1024 or 2048x2048. Then the packer will try to pack into a reasonably small size.

Thank you for your quick response 🙂

In the engine we use, we want a square 512x512 size as a way of optimization(Capacity savings due to compression) . The maximum size we allocated per character was set at 512x512.
So I'm trying hard to put the original images as big as possible in size 512x512.

All I want is to make 1 Atlas image with the best resolution.
Atlas images must consist of one, not two
Exporting to size 0.5 will make 2 Atlas images (failure), then I'll re-size it to 0.45 and export it. If Atlas becomes 1 here, it's a success. I repeat this work every so many characters
I would be happy if I could reduce this part.

"It automatically adjusts the size and draws it with one atlas image" I wish a magical check box 🙏

  • Nate відповіли на це.

    Have encountered that workflow many times but not enough that it annoys me. In fact I actually enjoy doing it it makes me feel I really made an effort to optimize the quality lol.

    hwadock I wish a magical check box

    We did this for you hwadock, because you are awesome! 💗 In 4.2.13-beta:
     Loading Image

    Check Auto scale and it starts by packing everything at the specified scale (in the Output section). If it doesn't fit on one atlas page image, it reduces the scale by 0.01 and packs it again until it fits. This can take a while, depending on how many times it needs to pack, but it is a lot less work than doing it manually.

    You can look in the atlas file for what scale ended up being used, eg to fit spineboy within 512x512 it was:

    scale:0.55

    You could then set this scale explicitly instead of checking Auto scale, if you want packing to be faster.

    This auto scale feature isn't useful for everyone, but when you just want to fit all your images on a single atlas page, it can be useful.

    Oh my God ,You're my savior 😍
    I think 4.2 is really very very! amazing~!
    I'm so happy to try new features
    thanks~!