Best way to create a sprite atlas?

Hello everyone.
I am looking to create a sprite atlas to load onto the GPU in one shot. Each sprite would be a row, with its frames as column cells.
I know there are multiple ways of achieving this in aseprite, but what’s the canonical technique if any?

  1. I could make each sprite its own layer, and then output the sprite sheet directly, but then I lose the value of layers.

  2. I could make each sprite its own file, but then I need to merge all the spritesheets later.

  3. I could use tags, but that really complicates things and I’d have potentially a thousand frames.

  4. A script?

Thank you for your help!

Hello! There’s actually a way to do this in-app without extensions, at least in the beta! Under File, there should be an option called “Export Sprite Sheet”, and if you have “By Rows” or “By Columns” selected under Sheet Type, you can select “Split Tags” in the Sprite tab in the same dialog box to split it into separate animations, with each frame in a tag together.

Maybe I’m misunderstanding the way tags work, but they seem to allow splitting by a group of columns, in a way. So if I were to use tags, I’d have the first sprite and its layers say in frames 1-8 with their own tag. Then frames 9-16 would have another tag, and that’s another sprite. Etc… but if I have 128 sprites I end up with 1024 frames. Which is very unwieldy.

Layers and frames are separate things if I’m understanding your concern correctly. Only frames are affected by tags, not layers, and it’s the amount of frames already in your project that will be in the new sprite sheet. If you have 128 frames, you’ll stay at 128 frames. The sprite sheet will merge all layers into one. If you do choose to separate layers too, then it’s going to raise your frame cost quite a lot, but not if you’re only separating by tags.

I understand tags are orthogonal to layers and that tags are collections of frames. The problem is that if I make a sprite per tag, and each sprite has 8 frames for example, I’ll end up with over a thousand frames which is painful to handle.
Maybe I’m not understanding your point correctly.

Isn’t that what you’re looking for though, to export all your sprites/frames into one sheet? You’re going to have a lot of frames in the sheet if you do that.

If you’re looking to make it so that the sprites are all in one sheet, but each has a separate metadata set and independent frame count, then Aseprite won’t give you that, since Aseprite treats each document as a single set of related animations that should be together. However, if you’re separating them by tags, you actually can still use Aseprite for the actual spritesheet, you’ll just need to take the accompanying JSON and transform its data into a format that you find more convenient, e.g. by listing the frame locations and numbers independently for each tag, instead of having a list of all frames and then a list of tags.

Makes sense, thank you both! I was trying to ensure I wasn’t missing something obvious. So what I’ll do is probably make a few different files for tiles that have similar animations and minimize the confusion.

1 Like