---
title: "Prevent seams between cells in a sprite sheet"
description: "Seams come from filtering, mipmaps and compression sampling the next cell. Pad each cell, keep content off the edge and use tile sizes that divide evenly."
canonical: https://appliedmanifold.com/guides/sprite-sheet-seams/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Guides](https://appliedmanifold.com/guides/)
3.  Sprite sheet seams

GUIDE // ANY ENGINE

# How to prevent seams between cells in a sprite sheet

Seams appear when your engine samples pixels from the neighboring cell, through filtering, mipmaps or compression. Leave an empty, transparent border inside every cell, keep the effect off the cell edge, use tile sizes that divide the sheet evenly, and limit mipmaps on sheets that are only ever seen close up.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [See the examples →](https://appliedmanifold.com/docs/pyrofx/examples/)

-   Godot 4 Available
-   Unity Manual setup
-   Unreal Engine Manual setup
-   Roblox Studio Manual setup
-   three.js Available

A draft compile is from $0.05, and new accounts start with $5 of usage.

**WINDOW\_FIREFINAL**

![First frame of the window\_fire bake](/bakes/window_fire/poster.webp)

Window fire, 3.9 x 4.7 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-window_fire)

01 // CAUSES

## How the next cell leaks in

-   Filtering: at the edge of a cell, bilinear filtering blends in the first pixel of the cell beside it.
-   Mipmaps: each smaller mip level averages blocks of pixels, so a 256 px cell becomes a 16 px cell four levels down, and its border melts into the neighbor.
-   Compression: block formats squeeze 4 x 4 pixel blocks, so a cell size that is not a multiple of 4 shares blocks with its neighbor.
-   Uneven grids: a sheet whose width does not divide by the column count puts cell edges between pixels.

02 // HOW TO

## Fix the seams

1.  Leave a transparent border inside each cell. 2 to 4 px stops filtering; each mip level you need to survive doubles it.
2.  Keep the effect's visible content off that border at its largest frame.
3.  Use cell sizes that are powers of two, such as 128 or 256 px, so the grid divides the sheet and the compression blocks.
4.  Set the texture wrap to clamp, so the outer cells do not pull pixels from the opposite side.
5.  If seams appear only at a distance, cap the mipmap levels or fade the effect out before it gets that small.

03 // WITH SPATIAL COMPILER

## Empty margins in every compile

**FIREBALLFINAL**

![First frame of the fireball bake](/bakes/fireball/poster.webp)

Fireball, 9.4 x 13.4 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-fireball)

Spatial Compiler frames every tile with an empty margin, 4% of the tile by default (`views.margin`), about 10 px on a 256 px tile. Tiles are 256 px on an 8 x 8 grid, so the 2048 x 2048 sheet divides evenly. When the effect touches the tile edge, the report your agent reads warns and names the setting to change.

04 // RELATED

## Related pages

-   [Tile sizeHow to pick a sprite sheet tile size from on-screen size, with 128 px and 256 px starting points and the Roblox Studio limit.](https://appliedmanifold.com/effects/sheets/tile-size/)
-   [Transparent backgroundHow a VFX sprite sheet keeps its background clear in alpha, why smoke and flame blend differently, and where the opacity sits in each sheet.](https://appliedmanifold.com/effects/sheets/transparent-background/)
-   [Texture atlasA texture atlas packs several different images into one texture, so objects and particles can share one material.](https://appliedmanifold.com/learn/texture-atlas/)
-   [Import a sprite sheet Godot 4Import a PNG sprite sheet into Godot 4, choose the import settings that matter for effects and cut the grid on the node.](https://appliedmanifold.com/guides/godot-import-sprite-sheet/)
-   [Sprite sheet resolutionPick a VFX sprite sheet resolution from on-screen size, with tile and sheet dimensions for 128, 256 and 512 px frames.](https://appliedmanifold.com/guides/vfx-sprite-sheet-resolution/)
-   [OutputsWith the default export, each view writes four sheets, `<view>_pos.png`, `_neg.png`, `_colour.png` and `_aux.png`, plus `layout.json`, two still previews, the animated `preview_anim.png` and `bake_report.json`. Sheets are 8 x 8 tiles of 256 px by default.](https://appliedmanifold.com/docs/pyrofx/outputs/)

[All pages in Guides →](https://appliedmanifold.com/guides/)

[← First and last loop frames](https://appliedmanifold.com/guides/loop-first-last-frame/)[Blend flipbook frames →](https://appliedmanifold.com/guides/blend-flipbook-frames/)

05 // FAQ

## Seam and bleeding questions

[All questions →](https://appliedmanifold.com/faq/)

**README.SPRITE\_SHEET\_SEAMS**

### How much padding should I add around each sprite sheet frame?

Add 2 to 4 pixels for filtering alone. For mipmaps, double the padding for every level you need clean, such as 16 pixels.

### Should particle atlases use power of two dimensions?

Yes, where you can. Power of two sheets and cells divide cleanly at every mip level and line up with compression blocks.

### How do I prevent visible seams between frames in a Unity sprite sheet?

Pad the cells, set Wrap Mode to Clamp in texture import settings and check that the Texture Sheet Animation grid matches the sheet.

### How do I prevent texture bleeding between frames in a Niagara sprite sheet?

Pad the cells and check that Sub Image Size matches the grid. Reduce mip levels in Mip Gen Settings if bleeding shows far away.

### How do I prevent texture bleeding between frames in three.js?

Pad the cells or shrink the UV window by half a pixel on each side. Setting minFilter to THREE.LinearFilter turns off mipmaps.

## Compile your first effect

You pay per compile and see the price before it runs. New accounts start with $5 of usage.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [Outputs →](https://appliedmanifold.com/docs/pyrofx/outputs/)

[All effects, guides and explainers →](https://appliedmanifold.com/effects/)
