hyodongwoo

Hello!

I have issues with export and optimization.

I can't export my spine file, it is still processing now for 2hours. (attached 'exporting image')

The spine file has 432 skins (we have many characters) and 18 bones and 12 animations in it.

There are resource images that contained 420 folders which are contained 15 images(30x30 pixel).
The total amount of images is 6,300.

I made my resource image folders like this.
"Images > images folder > 28 folder (ex. character A1~A10, character A11~A20...) > 15 folder (ex.character A1, A2, A3...)
> 15 images per a folder"

Is it too heavy? How can I optimize my spine file or resource image files or skins to export for unity??
이 게시글에 첨부된 파일을 보기위한 권한을 요청할 수 없습니다.
hyodongwoo
  • 전체글: 4

Erika

Hello! could you please post your export settings to see what is causing the slow down? Regarding optimization, you can likely append the skins at runtime since you are not using meshes (at least from what I can tell from the screenshot). But I will ask Harri to chime in :D
사용자 아바타
Erika

Erikari
  • 전체글: 2419

Harald

You could theoretically place the single images in your Unity project as Sprites and attach them to the Spine Skeleton, as shown in the example scenes Spine Examples/Other Examples/Mix and Match and Spine Examples/Other Examples/Mix and Match Equip that come with the spine-unity unitypackage. You could then pack the atlas at runtime as in the examples, which would be only a small atlas per character.

However I would not recommend going down this path, as all your assets of the 420 folders should fit into two 2048x2048 textures. Having all characters on two atlas pages would be preferable in terms of draw calls, unless you always only have a single skin of the 432 showing in the whole scene.
Could you please post a screenshot of the Texture Pack Settings that you have used? Especially the Packing type under Output would effect the time and resources it takes to pack, did you try different settings here: Grid, Rectangles and Polygons? I would guess that e.g. Polygons could be problematic at such a high image count.

You could also try packing multiple smaller atlas pages by setting the Max width and Max height to e.g. 1024 or 512 instead of 2048.

Packing Skeleton and atlas separately
In general I would suggest not packing the texture atlas along with the skeleton, but exporting the Skeleton without the Atlas first (Texture atlas: Pack disabled), and then exporting the atlas separately as described here.

If this still fails, you could also try adding a very simple pack.json file in folders that you want separate pages for, and export the top directory with option Combine subdirectories enabled - it will then go over all your subdirectories and process them at once, with the pack.json files acting as atlas page separators.
사용자 아바타
Harald

Harri
  • 전체글: 1727

hyodongwoo

Thanks for your answers!
But I'm still having trouble :lol:

There are 2 linked meshes for legs of 432 characters in my spine file!

I assumed that complex folder configurations and too many skins might affect export speed.
That has nothing to do with it, right?

Attached Images about exporting settings and Hierarchy settings!

+ I exported with the 'Grid packing type' of the output setting and It works smoothly! However, there are too many images :think: is this the only way to export my file??
이 게시글에 첨부된 파일을 보기위한 권한을 요청할 수 없습니다.
hyodongwoo
  • 전체글: 4

Harald

hyodongwoo 작성: I exported with the 'Grid packing type' of the output setting and It works smoothly! However, there are too many images :think: is this the only way to export my file??
Sorry to hear that there are still problems remaining.
Are the exported textures that you show of size 2048x2048, or 1024x1024 or smaller?
Is each one of the atlas texture pages of the same size and fully packed? Or are some half-empty? If they are only partly filled, could you please check if there are any pack.json files in any of the texture subdirectories?

Have you tried executing the texture packer separately (separate from the skeleton export as described in my previous post)?
사용자 아바타
Harald

Harri
  • 전체글: 1727

hyodongwoo

Thanks again!
These result I checked!

Q. Are the exported textures that you show of size 2048x2048 or 1024x1024 or smaller?
A: the texture's size is 1994 x 1976! All images are the same except for the last one!

Q. Is each one of the atlas texture pages of the same size and fully packed?
A: the texture is the same size and fully packed, I think!

Q. You could also try packing multiple smaller atlas pages by setting the Max width and Max height to e.g., 1024 or 512 instead of 2048.
A: I tried! but it doesn't work

Q. could you please check if there are any pack.json files in any of the texture subdirectories?
A: I did and attached images!

Q. Have you tried executing the texture packer separately (separate from the skeleton export as described in my previous post?
A: I did and attached images!

--------

Did I do right? Can I make the separated texture, which is separated by folder group to one or two large texture?
이 게시글에 첨부된 파일을 보기위한 권한을 요청할 수 없습니다.
hyodongwoo
  • 전체글: 4

Harald

Thanks for your detailled reply!

Your screenshot shows a pack.json file in the subdirectory 128images/b1~5.
Now an important question: Is there a pack.json file in every subdirectory, like one in b6~10, one in b11~15 and so on? If that is the case, then you can delete them (or move them to a backup location in case they had a purpose) from the subdirectories, otherwise each pack.json file will result in a separate atlas page. The single pack.json file at the top directory 128images can stay as it is.
사용자 아바타
Harald

Harri
  • 전체글: 1727

hyodongwoo

Yes! There was a pack.json file in every subdirectory!

When I delete them, export was not going well;

So I decided to adjust my file structures!

Thanks for your advice!!
hyodongwoo
  • 전체글: 4

Harald

Thank you for the clarification.

You could place every ~5 (or 10?) of your subfolders into a new parent folder with a pack.json file _only_ in the parent where you are receiving too many "narrow" atlas textures (e.g. 256 x 2048 px), and remove the pack.json file from the ~5 subfolders. This should then combine the ~5 subfolder atlas textures to a larger one.

Anyway, it is a pity that export is "not going well" otherwise, as this should all be done automatically.
사용자 아바타
Harald

Harri
  • 전체글: 1727


다시 돌아감: 한국어 Spine 사용자