Calire

Hi guys, I've got a issue to found a easy way for Texture Packing using subdirectories :/

Currently, it's very impractical to export a spine with an atlas that doesn't combine images from several subdirectories.
We have to:
1) Export the skeleton as binary (or json) without generating the atlas. (otherwise it will only generate one texture with everything combined as mentionned in the documentation)
2) Export using Texture Packer to export the atlas
3) Edit the resulting atlas because it doesn't reference the images the same way as the .skel

With a folder structure like this:
images/
images/folder1
images/folder2

The resulting atlas will reference images like this:
images/folder1/image1
rotate: false
xy: 0, 3
...

But the .skle / .json expects them to be referenced like this:
folder1/image1
rotate: false
xy: 0, 3
...


Notice the "images/" folder that's added when using Texture Packer.
The images are referenced properly when using the "create atlas" option during the binary export (But then the atlas only contains one texture)

Are we doing something wrong? We're not sure what's the point of using the Texture Packer export if skeletons can't use the resulting atlases directly.
User avatar
Calire
Posts: 29

Erikari

Hi Calire, I tried exporting the goblins project by placing a pack.json file in each folder and then using texture packer. The resulting atlas file has names like: goblin/eyes-closed which should be what you want according to your description. Could it be that when you choose the folder to pack, you choose the project folder instead of the images folder of the project?
User avatar
Erikari

Erikari
Posts: 1084

Calire

Hi Erikari :)

Actually, you right, it's working pretty well with your way to export. It's fine now , thanks !

Little question: Do you know why the option "texture packer" is not the same windows of "export" in spine?
User avatar
Calire
Posts: 29

Erikari

By same window do you mean why texture packer is in the main menu, and export is in the main menu under a different voice?
I think it's because you can basically pack any kind of image with texture packer, while export exports your project .
User avatar
Erikari

Erikari
Posts: 1084


Return to Runtimes