Problem with spritesheet generation

I’ve created an animation with blender and got 100 pictures for a spritesheet. I’ve tried 3 sprite sheet gens so far:
Photoshop script: didn’t work. TexturePacker: scatters the pictures all over the place not usable for animation. SpriteSheetPacker: scatters the pictures all over the place too but creates a .txt map file I don’t know if I can use in unity. Putting the images together manually would take hours, is there a good way to get a spritesheet that is usable? Why don’t these generators put the images just left to right and top to bottom in order?

Have you tried this Blender script?

Neat thx didn’t know it existed, but what if I get the same problem with another software? I plan on doing vector art, I might need something other than a blender script.

It depends on how you create the art. I just magically (i.e. artists don’t explain) get art either as individual sprites or sheets of not so tightly packed data.

In the first case I just trim the edges and drop them into Unity, then tag them as needed for different sprite sheets to be generated by Unity’s packer. In the second case there might be a little editing of boundaries needed in Unity. Or I use ImageMagick or a custom tool I made for the job. ImageMagick can cut and stitch pieces pretty well if there’s a decent amount of space around them, but it’s also tricky to use.

Tried to use Spritify but it can’t do animations. Mine is an animation… Even the Unity sprite packer seems to be only good for textures… guess I’m back to 0

I need a sprite sheet generator for animated sprites. Pretty much every sprite gen is only for textures and optimizes for filesize but destroys the animation by scattering everything all over the place.

There seems to be something for flash: SwfSpriteSheet 1.7 – Sprite sheets from Flash | { } Fermmm's AS3 and Haxe Blog! This is so simple why isn’t there something like that for an image sequence?

How do you guys animate the sprites? Do you pick every sprite manually from a spritesheet like this: https://cdn.codeandweb.com/blog/2014/03/28/using-spritesheets-with-unity/creating-sprite-sheets.png ??? The character is all over the place it’s easy to pick the wrong one while animating especially if you have a lot pictures for the animation. If I could use that map file from the SpriteSheetPacker all would be good, then I wouldn’t care about the pictures being scattered everywhere.

I don’t get sprite sheets with sprites all over the place usually. They’re in order, and typically one sheet per animation. When I get individual sprites they’re named so that they sort correctly.

Then how do the artists do that? Manually?

I think a lot of people have written their own custom scripts and various built-in tricks. For example, in Illustrator you can split the canvas into a grid for use as guidelines. When you import a grid-based sheet in Unity it has no trouble splitting them up, and the sprite packer will create more optimised, tightly packed sheets.

Photoshop users typically make animations in layers and use scripts like this: This is a PS script to make Sprite Sheets out of layers. Modified from http://www.garagegames.com/community/blogs/view/11527 · GitHub

Blender I dunno how to script, but it should be possible to write something that saves individual frames and names them with animation name+numbers. Clunkier, but until Blender itself gets a direct option it’s the best you can hope for.

To import already prepared sheets from Texture Packer, they have import scripts: https://www.codeandweb.com/blog/2014/03/28/using-spritesheets-with-unity

If you are getting sheets like those from artists, but no map data to get positions and rotations, the artists are at fault. Yell at them :slight_smile:

No matter how artists create animations, I prefer they save out frames in one folder or sheet per animation. Depending on the project the pivot point might change. In the middle works with mixed sizes, so the edges for every frame can be trimmed too, saving space. Simple pixel art in overhead tilemapped games will probably be better off basing it on a corner, and each frame being the same size. A perfectly square grid in sequence is always preferred then (still one sheet per animation for ease of use - Unity rebuilds them anyway).

1 Like

Alas I found out how to do this with the TexturePacker: I watched this video:

Basically all I had to do was use algorithm: basic and Sort By: Name

Well I’m the artist, coder, audio dev, game dev etc. Can’t yell at myself XD

Nice! Guess we pretty much have found all the solutions!

Probably not - tech surprises you with new ways all the time :wink:

I’ve just tested the PS script, works well takes a bit but better than having to spend 40€ just for sprite packing.

That’s 40 Euros yearly too!

Nice to have confirmation one of the free solutions work :slight_smile: