How to Import a Sprite Sheet in Godot 4
November 4, 2026 · 6 min read
Godot 4 gives you two clean ways to use a sprite sheet: an AnimatedSprite2D driven by SpriteFrames, or a Sprite2D with horizontal and vertical frame counts. Both read the same PNG. Picking the right one depends on whether you want a reusable animation resource or a quick single-node setup.
This guide covers both paths, plus the import and filtering settings that decide whether your sprites look crisp or soft.
Import the PNG and check filtering
Drag the sheet into the FileSystem dock. Godot imports it as a texture. Select the file and open the Import tab. Set Filter to Nearest for crisp pixel and hand-drawn art, or Linear if you scale the art down and want smooth edges.
Click Reimport after changing settings. If the sheet looks blurry in the viewport, this filter setting is almost always the cause. Nearest plus integer scaling keeps hard edges.
Leave the texture as a single image. Godot slices sprites at the node level or in SpriteFrames, not by editing the file into pieces.
Option one: AnimatedSprite2D and SpriteFrames
Add an AnimatedSprite2D node. In the Inspector, create a new SpriteFrames resource. Open it and you get a small editor with animations and frames.
Click the add-frames-from-sheet button. Godot asks for the horizontal and vertical frame counts, then cuts the sheet into cells and adds them to the current animation. Set the animation name, such as walk, and set the speed in frames per second.
Turn on the loop toggle for the animation if it should repeat. Then set the playing flag or call play() in code. SpriteFrames is a resource, so you can save it and reuse the same animation on many enemies or NPCs.
Option two: Sprite2D with hframes and vframes
Add a Sprite2D node and assign the sheet as its texture. In the Inspector, set Hframes to the number of columns and Vframes to the number of rows. Godot now treats the image as a grid.
The frame property selects which cell is shown. Animate it with an AnimationPlayer or a small script that increments frame over time. This is the lightest approach when you only need one animated sprite and do not want a separate resource.
The tradeoff is that you manage the timing yourself. There is no built-in animation speed, so you drive frame changes in code or with an animation track.
Matching frame rate and loop to your manifest
If your sheet came with a manifest.json, it lists the frame rate and whether the animation loops. Use that number as the SpriteFrames speed, or as the timing in your AnimationPlayer.
For a classic hand-drawn walk, eight frames per second feels right. Twelve to fifteen is smoother. Do not invent a speed that contradicts the art; if the poses were drawn for eight, eight is correct.
Set looping to match the manifest too. A one-shot attack should not loop, while an idle should. Getting this wrong makes an otherwise good animation feel broken.
Common Godot pitfalls
The most common problem is a wrong frame count, which shifts every cell after the first. Count your columns and rows from the actual PNG, or read them from the manifest, and enter them exactly.
The second is soft sprites caused by Linear filtering on art that should be crisp. Switch to Nearest and reimport. The third is forgetting to turn off looping on one-shot animations.
A fourth is mixing Pixels Per Unit style scaling across nodes. Godot uses a project-level stretch setting; keep your sprites at a consistent scale so characters do not end up different sizes.
Wiring the animation into a scene
An imported animation does nothing until a node plays it. Add an AnimatedSprite2D to the scene, assign the SpriteFrames you built, and set the starting animation. Then call play in the ready function or set the autoplay flag so it starts on its own.
For a Sprite2D with hframes and vframes, drive the frame property yourself. A simple timer that advances the frame and wraps at the end of the row recreates a loop. Keep the wrap count equal to the number of frames, or the animation will show a blank or a repeated pose.
Connect the animation to movement. A walking character should play the walk animation while moving and switch to idle when still. Use a state variable in your script and call play only when the state changes, so you do not restart the animation every frame and stutter it.
How you organize SpriteFrames matters as the project grows. Put every animation for a character on one SpriteFrames resource and name them clearly, such as idle, walk, and attack. Reusing one resource across many enemy instances saves memory and keeps their timing identical.
Set the animation speed to match the manifest, then test at game scale with the camera at the real zoom. What looks smooth in the editor can look jittery in the running game, especially if the sprite is scaled by a fractional amount.
If you import a sheet with padding, remember that the frame count is the number of cells, not the number of drawings. A sheet with two pixels of spacing between cells still has the same cell count as the column and row numbers you entered.
Handle one-shot animations such as attacks. Turn looping off, connect a signal on animation finished, and switch back to idle. If you forget the signal, the character stays stuck on the last attack frame. Preview each clip in the SpriteFrames editor before leaving the scene; it is faster to fix a wrong frame count there than in the running game, and confirm the loop point matches the manifest before you move on.
FAQ
Frequently asked questions.
Should I use AnimatedSprite2D or Sprite2D in Godot 4?+
How do I add sheet frames to SpriteFrames?+
Why do my Godot sprites look blurry?+
Can Godot read the sprite sheet manifest?+
Try it yourself
- Sprite Sheet Maker — Upload frames and pack an alpha PNG atlas with a matching JSON manifest — free.
- Sprite Sheet Slicer — Cut a packed sheet back into individual frames by grid or cell size.
- Sprite Animator — Preview a sprite sheet as a looping animation and tune the frame rate.
- How to Import a Sprite Sheet in Unity (Step by Step)