Sprite Sheet Slicing: Grid Size, Padding and Pivot Mistakes
· 8 min read · Loopixel team
Grids drawn on a real Loopixel sheet; engine fields from the official docs
You import a sprite sheet, press Slice, and the animation plays with a sliver of the next frame, a head cut off or a character that wobbles left and right. Slicing mistakes look like art problems but they are almost always three numbers: the cell size, the padding and offset, and the pivot. This guide shows how to work them out and where each engine asks for them.
On this page · 6
Work out the cell size first
Do the arithmetic before you open any dialog. For a sheet with no spacing, the cell width is the sheet width divided by the number of columns, and the cell height is the sheet height divided by the number of rows. A frequent mistake is typing the sprite’s size from memory instead of reading the image size.
| Sheet | Image size | Columns × rows | Cell size |
|---|---|---|---|
| 1 direction, 64 px | 512 × 64 | 8 × 1 | 64 × 64 |
| 4 directions, 64 px | 512 × 256 | 8 × 4 | 64 × 64 |
| 1 direction, 32 px | 256 × 32 | 8 × 1 | 32 × 32 |
| 4 directions, 128 px | 1024 × 512 | 8 × 4 | 128 × 128 |
Loopixel sheets follow this rule exactly: sheet width is 8 × the frame size, a single direction is 1 row and 4 directions are 4 rows. The sizes are 32, 48, 64, 96 and 128 px, with no padding, offset, trimming or rotation. So if your engine’s cell size is not the image width ÷ 8, the number you typed is wrong.
Padding, offset and spacing
These three fields describe space that is not part of any frame. Offset is the margin before the first cell, and padding (or spacing) is the gap between cells. Tools that pack sheets with extra space need them; a sheet with none needs zeros. If you type a padding of 1 on a sheet with no gaps, each cell shifts one pixel further than the last, and by frame 8 you are slicing the wrong pixels.

| Symptom | Likely mistake | Fix |
|---|---|---|
| A sliver of the next frame at one edge | Cell size too wide, or offset too high | Recompute width ÷ columns, set offset to 0 |
| Each frame is further off than the last | Padding or spacing is not 0 | Set padding and spacing to 0 |
| Last frame is empty or cut off | Wrong frame count or columns | Check the count is 8 per row |
| Frames in the wrong order | Reading order or row mix-up | Rows run top to bottom: front, right, back, left on a 4-direction sheet |
| Old and new slices both show | Existing slices were kept | In Unity use Method: Delete Existing, then Slice |
Where each engine asks for the numbers
Unity
- Select the PNG, set
Texture TypetoSprite (2D and UI)andSprite ModetoMultiple, then click Apply. - Open the Sprite Editor and use the
Slicedropdown in the toolbar. - Choose
Grid By Cell Sizeand setPixel Sizeto the cell size (64 × 64). LeaveOffsetandPaddingat 0. Or chooseGrid By Cell Countand set the columns and rows (8 and 1, or 8 and 4). - If you sliced before, set
MethodtoDelete Existing, then clickSlice. - Check the red preview outlines sit on the frames, then click Apply in the toolbar.
More detail, including animation clips, is in the Unity sprite sheet guide.

Godot 4
- Add an
AnimatedSprite2D, create a SpriteFrames and click “Add frames from a Sprite Sheet”. - Pick the PNG and set
Horizontalto 8 andVerticalto 1 (or 4 for a 4-direction sheet). Godot divides the image into that grid, so you give counts, not pixel sizes. - Leave any offset or separation fields at 0 if the dialog shows them, select the frames and click “Add N frames”.
There is a full walkthrough, including a free import script, in the Godot sprite sheet guide.
GameMaker
In the sprite’s image editor, GameMaker’s Import Strip Image option (and Convert to Frames for an image already in the sprite) opens a window where you set the number of frames, the frame width and height, and any offsets. For a single-direction Loopixel sheet that is 8 frames at the frame size, with offsets at 0. For a 4-direction sheet, we suggest importing one row at a time, or cutting each row out first, because the documentation describes the window in terms of a strip.

Aseprite
File > Import Sprite Sheet takes an offset (x, y), the sprite width and height, and padding if there are gaps. Set the width and height to the frame size and everything else to 0. See the Aseprite sprite sheet guide.
Put the pivot at the feet
A pivot (or origin) is the point the engine treats as the sprite’s position. By default it is often the centre of the frame. That causes two problems for characters: a character placed on a ground point sinks half a frame below it, and when you flip or scale it, it moves around the centre instead of staying on its feet.

- Unity: in the Sprite Editor Slice overlay, set
Pivotto a bottom option, or toCustomand enter a value inCustom Pivot. You can also change the pivot per sprite afterwards. - Godot: the
AnimatedSprite2DhasCenteredandOffset. Keep Centered on and set Offset to (0, −half the frame height), or turn Centered off and set Offset to (−half the width, −the full height), so the node’s origin is at the feet. - GameMaker: sprites have an origin that you set in the sprite editor; set it to the bottom centre of the frame.
- All engines: use the same pivot for every animation and every direction so switching animations never moves the character.
The pivot is relative to the frame, so a sheet where the character’s feet are not on the bottom row of the cell needs the pivot at the feet pixel rather than the cell edge. Check one frame at 4× zoom and note the feet row before setting it. This is also why a shared feet line matters across directions, covered in the 4-direction alignment guide.
Sheets that slice with a plain grid
Loopixel sheets are made so the numbers above are easy: cells are fixed squares (32, 48, 64, 96 or 128 px) with no padding, offset, trimming or rotation, 8 per row, so the cell size is always the image width ÷ 8 and every spacing field is 0. A plain grid slice always works. Every ZIP holds all five sizes, plus atlas_{size}.json with frame rectangles, single-frame PNGs in frames_{size}/ and a GIF.
Specs are on the facts page. If you are starting from a character image, image to sprite sheet explains the flow, and pricing lists the credit packs, paid once. The open-source Godot import script does the Godot slicing for you.
Good to know: the pivot is a setting you make in your engine. Sizes are square only, and 4 directions means walk cycles. The animation is AI-generated, so a frame may sit a pixel off the feet line; check and nudge single frames in Aseprite before final export if it matters.
Quick answers
My sheet has extra space between frames. What do I type?
Measure it. The gap goes into padding (or spacing), the margin before the first cell goes into offset, and the cell size is what remains. If you cannot measure it, open the image and zoom to a cell edge.
Should I slice with a grid or use automatic slicing?
Use a grid for fixed cells like these. Automatic slicing cuts around opaque pixels, so frames end up different sizes and the pivot jumps between frames.
Why is every frame offset by the same amount?
That is a pivot or offset issue, not a slicing one. All frames share the same wrong origin. Set the pivot once and apply it to every sprite.
Sources
Engine menu paths and property names above were checked against the official documentation:
- Unity: Slice into sprites automatically
- Unity: Sprite Editor window reference
- Unity: Sprite (2D and UI) texture Import Settings
- Godot: 2D sprite animation
- Godot: AnimatedSprite2D class reference
- GameMaker: Image Editor
- Aseprite: Sprite Sheet
Try it with one image
Upload one image and get an 8-frame pixel sprite sheet in about a minute. 1 credit per animation, credit packs from $2.99, paid once.
Create a sprite sheet