• Editor
  • confusion about texture packer exports with multiple anims

Related Discussions
...

Hi,

I'm a bit confused how to best export the art for what we want to do here. Hopefully I can get it figured out with this post.

We have a Unity game (Unity 4.5 with the Unity Spine runtime). Each "level" for the game will be a single atlas (4096x4096 at 4x, 2048x2048 at 2x, and 1024x1024 at 1x).

In this single atlas, some of our sprites are animated via spine and some are just static non-animated sprites. I wanted to use the new Unity 2d sprite renderer for the non-animated sprites, but that doesn't seem possible since the unity spine runtime uses mesh renderer, and it doesn't seem smart to mix mesh renderer and sprite renderer with the same texture.

So, it seems like the best thing for us to do is to just throw all our sprites into Spine, animated or not. Then maybe make a stripped down version of the SkeletonAnimation component for static sprites that wouldn't have any animation overhead.

Does that all sound good so far?

The part that I don't know how to do is how best to setup our spine projects / spine exports to support this type of workflow. I've read this page a couple times but it doesn't really answer my question. http://esotericsoftware.com/spine-texture-packer

If we have multiple spine animations + multiple static images we want bundled up into a single atlas, how would we do that? Should each spine animation be its own project, and then exported via "Create Atlas"? Then, run "Texture Packer" and select the folder that contains the static sprites + all the individual animations? Or do we actually have to make some dummy spine animations that use the static sprites?


I was messing around with the "Texture Packer" feature in Spine, but it seems pretty limited, if I understand it correctly. It's not ideal for someone trying to take multiple spine animations and put them into the same atlas.

This is how I understand the "Texture Packer" intended usage:

1) put all your raw source images in the same root folder (with no unused source images there, because it will include them no matter what)
2) export your spine anims without spritesheet, so you just get a json file, and put the json file in the same root folder from step 1, and make sure the image path in the json file works with your directory structure
3) run Texture Packer on this folder

I am understanding that right? It's not very convenient.

I can think of 2 ways this process would be much more convenient for packing multiple spine anims into a single atlas.

A) when exporting a single anim, be able to export the raw images (just copy them from the source folder), instead of packed into an atlas. then, the json and images would automatically be setup for Texture Packer.

or

B) Texture Packer could read from a collection of exported spine animation json files (the full path to the source images would need to be included in the json files, which it isnt right now). Then, it would be able to build a single atlas.

Hmm this gives me a good idea on the Unity side heh.

The texture packer doesn't require an exported JSON file, it just packs images. It can be configured via a JSON file but that is different, not an exported skeleton.

You can put images in subdirectories. See the combine subdirectories feature, which can be set via a pack.json file.