Exporting SpriteSheet transparent spacing

We’re trying to fix graphics artifact in our game by adding little spacing between frames in sprite sheet. There is Boder section in “Export Sprite Sheet” window which let us set spacing value, but spacing pixels by some reason is always not transparent but filled with some color (depending on nearest pixel color in frame i guess). Is there a workaround to make transparent borders?

Hi @TonyMax, actually using the “Spacing” option the border should be transparent, and using the “Extrude” option it should extend each frame/sprite border one pixel (copying the color of the border). Could you please share your sprite with us privately at support@aseprite.org so we can give a try?

We’ve received the GIF file. It looks like a bug. This is because:

  1. The file being exported is indexed mode (is a GIF file)
  2. The sprite is transparent (to background/opaque layer)
  3. The transparent color in the file is index 26 (instead of index 0)
  4. The File > Export Sprite Sheet action is using index 0 to clear borders instead of the transparent index (26).

This is a bug, we’ll try to fix in the next release: Export Sprite Sheet with Spacing will fill borders with index 0 instead of the real mask color index · Issue #3391 · aseprite/aseprite · GitHub

You can try to drag and drop the transparent color (index 26) to index 0, then remap de colors (You will see a “Remap Palette” button in the color bar). After that the File > Export Sprite Sheet will work as expected.

1 Like

Always happy to find bugs :slight_smile:
Thank you for support, your advice with remaping colors works.

For those who will face similar problem: you have color palette which containes all unique colors which your sprite has. Each of this color have index, which you can inspect by hovering pixel. Also colors layout in palette sorted by theirs indexes. The point of this workaround is to find transparent color, which in this case was with 26 index instead of 0 which it should be, and then just drag and drop this color to the top left position in palette (index 0). After that you will see colors swapped in sprite and button “Remap” will appear in color pallete. Press it, and colors will be reindexed, so sprite will look like before. After that bordering works as intended.

1 Like