Paperbot

Hello, I am really sorry to trouble you and I apologize further if this has been answered before. I've looked around for a few days and couldn't find much help on the topic.

Some context: I've made a "paperdoll" skeleton which attachment textures are meant to be swappable on an individual basis, This is not so much for re-skinning but customization of pretty much every part, out of hundreds of parts.
This, of course, does not fare well with atlas repacking, which I understand is very efficient and convenient for 99% of projects. In my case, however, it's not viable for the aforementioned reason.

From testing, and as I understand it, it would be possible to manually edit the atlas.txt file to do exactly this, by treating each image as its own atlas "page". But lacking an automated process, and considering the skeleton may have to be updated and re-exported, manual editing would become an almost Sisyphean hurdle.
The behavior I require is pretty much how skeletons are handled at playback on the editor.

I understand why the atlas packer is in place, I get it makes a huge difference when it comes to resource management. But for my specific case efficiency is not an issue, ease of customization has full priority as I'm not exactly making a mobile game and the whole point of what I'm trying to achieve relies on texture customization.

I just wish to know if there's a GUI, CLI, or any solution to this I've missed. I'll take workarounds too, I'm not picky.
Thank you.
Paperbot
  • Postovi: 8

Misaki

Hi,

Have you tried to place each image in a folder, and export them checking Image folders during data export? I mean this option:
Texture packing - Spine User Guide: Packing during data export
This may also be a bit of a hassle since you need to change the path of each attachment in the skeleton to display the skeleton correctly in the viewport after organizing the images, but I think it will be easier to export afterwards once it is set up.
Avatar
Misaki

Misaki
  • Postovi: 651

Paperbot

Thank you for replying so quickly, Misaki

It's a good idea. Renaming the paths isn't that much of a hassle since it only needs to be done once. The only problem i see is that I'd have to re-index everything manually in the atlas. While It's not as bad as manually editing everything, the prospect of having to do this every time the skeleton is modified is a bit jarring haha.
Ideally I need things to be intelligible, Having mouth.png, nose.png, head.png, iris.png... is better than skeleton1.png, skeleton2.png, skeleton3.png....
It doesn't sound like a big deal, but I'm dealing with a ridiculous amount of elements.

Thank you for the idea though, it at the very least allows me continue with testing :)

EDIT: I guess I could batch rename files and atlas content. The pages are defined in alphabetic order by folder name, right?
Paperbot
  • Postovi: 8

Nate

The packer processes folders in the order the filesystem gives them. This should be consistent from run to run, though it may not be well defined exactly what order you get.

Atlas page images are not something you normally care about. You create an atlas and ask if for a region, you don't care about the name of the image file that the region came from. If you did, you could get a region (eg a known hair region) and then determine the file it came from, then you'd know which image file had all the hair regions (if they fit on one page).

You don't have to use an atlas, it's just the most efficient way to draw at runtime. You could modify how rendering works so you can use individual images, if you are OK with the performance impact. Likely it's fine on desktop, but not on mobile if you are rendering 100s of regions. If you have every part (hair, shirt, shoes, etc) on a different atlas page, you likely won't be rendering more than one image from each page, in which case you lose almost all efficiency from using an atlas in the first place.

One solution that many others are using is to distribute individual images with your app and pack them into an atlas at runtime. This is complex, but powerful. If you know what images are needed for characters in a level or game area, you can pack just what is needed, possibly on a single atlas page. That allows you to have many thousands of images, yet still render efficiently.
Avatar
Nate

Nate
  • Postovi: 11852


Natrag na Editor