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:
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.
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.
Bleeding and incorrect rectangles can look similar. Before changing the artwork, check:
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.
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.
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.
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.
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.
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.

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.

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

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