Sprite Sheet Tool
  • AI Generator
  • Pricing
2026/09/11· Last updated 2026/11/08

Sprite Sheet Padding and Spacing: A Texture Bleeding Guide

A thin line from the next sprite appears at the edge of the current frame. A character develops a dark halo when scaled. A tile looks correct in the source PNG but flickers in motion. These symptoms are often grouped under “texture bleeding,” yet adding a random gap is not always the right fix.

The first step is to separate three terms that are easy to mix up:

  • Outer padding is empty space around the outside of the whole sheet.
  • Spacing is the gap between neighboring frame cells.
  • Edge extrusion copies a sprite's border pixels outward into a surrounding gutter.

Sprite Sheet Tool supports outer padding and inter-frame spacing. For edge extrusion, use a packer that copies border pixels into the gutter. Those copied pixels behave differently from transparent space when the renderer samples near a sprite boundary.

Why neighboring pixels can appear

A texture sampler does not always read one exact source pixel. Filtering can combine nearby samples to create a color between texels. Scaling, subpixel camera movement, texture coordinates near a rectangle edge, and mipmaps can all change which neighbors contribute.

On an edge-to-edge sheet, a neighboring sample may belong to the next frame. With a transparent gap, the neighbor may instead be transparent black or another background value, which can create a faint fringe. With edge extrusion, nearby samples repeat the current sprite's border color.

That is why “use two pixels of padding” is incomplete advice. You need to know the sampler, mipmap behavior, camera scale, and importer coordinates. The same sheet can look clean in one setup and bleed in another.

First rule out a slicing error

Bleeding and incorrect rectangles can look similar. Before changing the artwork, check:

  1. The frame width and height match the exported cell size.
  2. The importer uses the same outer offset and inter-cell spacing as the sheet.
  3. The sheet was not resized after it was packed.
  4. The final row does not include a partial or unintended blank cell.
  5. Every frame rectangle stops at the intended cell boundary.

If the importer assumes a gapless grid but your sheet contains spacing, every origin after the first column or row will drift. Adding more space makes that problem worse. Start from exact layout math, not visual guesswork.

When zero spacing is the best setting

For a regular grid sliced by cell size or by row and column count, zero spacing and zero outer padding simplify the layout. The sheet width is exactly cell width × columns, and each origin is a multiple of the cell dimensions.

This is the default approach on the Unity sprite sheet preparation page and Godot sprite sheet preparation page. It is especially reasonable when pixel art uses nearest-neighbor-style filtering, mipmaps are not part of the chosen 2D pipeline, and the camera keeps sprites on a stable pixel grid.

If the renderer still samples across rectangles, check the import and filtering settings or use a pipeline that supplies an appropriate gutter.

When spacing or extrusion helps

Spacing can physically separate adjacent cells and may prevent one frame from sitting immediately beside another. It is useful only when the importer can account for the same gap. Outer padding protects the first and last cells from the sheet boundary, but it does not separate internal neighbors.

For filtered or mipmapped atlases, edge extrusion is often more robust than an empty gap because it gives the sampler a matching edge color. The required gutter depends on the renderer and how far down the mip chain the texture will be sampled. Choose its size in an engine-aware atlas packer; Sprite Sheet Tool does not calculate extrusion gutters.

Keep the sprite background transparent. A solid rectangle behind the whole sheet will show through in the game; it does not reproduce edge extrusion.

Include spacing in the frame coordinates

With cell width W, outer padding P, spacing S, and zero-based column C, a cell begins at:

x = P + C × (W + S)

Rows use the same relationship with cell height. The full width is:

sheet width = (2 × P) + (W × columns) + (S × (columns - 1))

If you change spacing after generating atlas JSON, regenerate the metadata. Coordinates from an older layout no longer describe the PNG.

The free sprite sheet editor calculates its PNG and optional generic or Phaser JSON from the same current layout. Export them together if your runtime reads rectangle metadata. If your engine slices a fixed grid without JSON, record the cell, spacing, and padding values alongside the asset.

Test the layout, then the sampler

Use four 32 × 32 frames, two columns, spacing 2, outer padding 1, and 100% scale. The result is a 68 × 68 PNG. The four 32 × 32 rectangles begin at (1, 1), (35, 1), (1, 35), and (35, 35). Slicing that PNG simply into two equal rows and columns instead creates 34 × 34 regions containing gaps and borders. That is a rectangle error, even if it resembles bleeding.

Either import the matching rectangle metadata or repeat the export with zero spacing and zero padding for a 64 × 64 fixed grid. Keep the original four frames unchanged during this comparison. Sprite Sheet Tool's generic and Phaser JSON describe the export layout; they are not native importer files for every engine.

Once the rectangles are correct, compare the same sprite at the same camera scale with only the filter setting changed. Next compare the chosen mipmap setting separately. Godot's image import documentation explains mipmap generation and alpha-border handling; these are different controls from adding transparent spacing. Unity's Sprite Atlas reference documents its own atlas padding and filtering controls. Engine atlas padding does not imply that this browser packer generates extruded pixels.

Record the rectangle, pivot, filter, mipmap setting and display scale for each comparison. Keep a copy of the gapless source and change one setting at a time. Check the smallest on-screen size and moving frames as well as a magnified still.

For pixel art, test the engine's nearest-neighbor-style filtering and chosen mipmap policy. If smooth filtering is required, compare an extruded atlas. If the frames are aligned but play at the wrong speed, use the animation timing and FPS guide.

When padding will not help

Padding is not the answer when the visible line is already painted into the source frame, the sheet was compressed with a lossy format, or the importer is using the wrong rectangle. It also may be unnecessary for UI sprites shown one-to-one without filtering or mipmaps.

A dedicated atlas packer may help when your runtime uses trimmed rectangles, rotation, per-sprite pivots or extruded gutters. Sprite Sheet Tool exports unrotated, untrimmed rectangles; choose a packer that provides the additional fields your importer needs.

All Posts

Table of Contents

  • Why neighboring pixels can appear
  • First rule out a slicing error
  • When zero spacing is the best setting
  • When spacing or extrusion helps
  • Include spacing in the frame coordinates
  • Test the layout, then the sampler
  • When padding will not help

Author

S
Sprite Sheet Tool TeamThe product team that builds and documents Sprite Sheet Tool.

Categories

Sprite Sheet Fundamentals

Tags

Game AssetsPaddingTexture Bleeding

More Posts

Character Reference Sheet vs Sprite Sheet: What Your 2D Game Needs
Sprite Sheet Fundamentals

Character Reference Sheet vs Sprite Sheet: What Your 2D Game Needs

A character reference sheet records a design. A sprite sheet contains game images. See how to turn an existing character into walking frames, or pack frames you already have.

Sprite Sheet Tool Team
2026/11/11
Phaser Sprite Sheet vs Texture Atlas: Which Loader Should You Use?
Sprite Sheet Fundamentals

Phaser Sprite Sheet vs Texture Atlas: Which Loader Should You Use?

Choose load.spritesheet or load.atlas in Phaser using the same two real poses. Compare numeric frames, named frames, spacing and common loading errors.

Sprite Sheet Tool Team
2026/11/07
Why Does My Sprite Character Change Between Directions?
Sprite Sheet Fundamentals

Why Does My Sprite Character Change Between Directions?

Separate character changes from frame alignment and playback problems, then check the reference, equipment and each direction before using an AI walk cycle.

Sprite Sheet Tool Team
2026/11/04
Sprite Sheet Tool

Free browser-based sprite sheet workspace for 2D game developers.

Email

© 2026 Sprite Sheet Tool All Rights Reserved.

Ferramentas grátis em português

  • Criar sprite sheet
  • Gerar atlas de texturas
  • GIF para sprite sheet
  • Separar sprite sheet
Links
  • Pricing
  • Sprite Sheet Maker
  • Sprite Sheet Splitter
  • Animation preview
  • Sprite sheet to GIF
  • Texture Atlas Generator
  • GIF to Sprite Sheet
  • Unity Sprite Sheet Maker
  • Godot Sprite Sheet Maker
  • Contact
Legal
  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Cookie Policy
Resources
  • Guides
  • Blog
  • What’s new