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: 32

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: 1175

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: 32

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: 1175

Calire

I mean, it make senses I think to have this kind of window:

With texture packer option:
avec.png


Without the texture packer option (actually in spine):
sans.png
User avatar
Calire
Posts: 32

Erikari

I don't think it's really alright to have it there, as you're only exporting skeleton and images of the current project, so that's why you can specify the atlas export, while with texture packer you can include multiple projects as well as images that don't belong to any Spine project.
User avatar
Erikari

Erikari
Posts: 1175

Calire

Sorry, it's not easy to explain precisely what the issue is ( ^-^);

So the fact is, the option "combine subdirectories" doesn't works when you export with the "normal" way.
combine.png


-When it's select with "normal Export", it's make only 1 atlas at the end.

-When it's not select with "normal Export" , it's make only 1 atlas at the end.


export-normal.png





If this option work, we can do separate atlas directly in the "classic" Export's option, and manage all the atlas at the end.

Since I use "Texture packer" option in different projects, I always have to do the link between the Json and the Atlas.
I mean, it's logic to have a link by default and unselect the option if you need to generate only the atlas :yes:

-
User avatar
Calire
Posts: 32

Crocodilum

Hey hey, I just found this topic, I could have a great use of this small checkbox also. Having several textures for several skins could help a lot.
User avatar
Crocodilum
Posts: 124


Return to Runtimes