← All guides

How to Export a Godot 4 SpriteFrames (.tres) from SpritePilot

5 min read · Last updated: November 20, 2026

Godot 4 is the one engine SpritePilot can hand a finished resource: the "SpriteFrames" export is a .tres file holding every frame and one animation per tag, ready for an AnimatedSprite2D. This guide covers the export settings, where the two files go, the Godot JSON alternative for your own scripts, and our free Godot add-on that builds the SpriteFrames inside the editor. Playing, switching and flipping the animations from GDScript is covered in the Godot animation article linked at the end.

Open Godot SpriteFrames export: free, in your browser, no signup.

Path A: a SpriteFrames .tres (recommended)

  1. Put the frames in play order. Get your frames into SpritePilot (with Grid Slice, "Send to Export & Download" in the GIF or video converter, or "Send to Session" in the Pixel Art Editor) and open Export & Download. The .tres keeps the export order, so check it under "Rename & Reorder Sprites" and fix it with the arrow buttons. Names don’t matter for this format: the .tres doesn’t store them.
  2. Add one tag per animation. Open "Animation Tags", click "Add Tag", and give each animation a name and a frame range, for example idle 0 to 3, hop 4 to 9 and attack 10 to 14. Ranges count from 0, while the Rename & Reorder list numbers frames from 1. Each tag becomes a named animation; with no tags you get one animation called "default" with every frame.
  3. Choose SpriteFrames and download. Choose PNG, keep "Export metadata file" ticked, pick "SpriteFrames" (Godot 4 .tres resource) and click "Download Sprite Sheet". You get sprite-sheet.png and sprite-frames.tres. Any layout works, and so do "Trim transparency", "Padding" and "Extrude": every frame is an AtlasTexture pointing at its own rectangle, and trimmed frames get a margin that restores their original size.
  4. Copy both files into the project root. The .tres looks for its texture at res://sprite-sheet.png, so put both files in your project’s root folder and keep the sheet’s file name. Prefer a subfolder? Open the .tres in a text editor and change the path on the ext_resource line near the top.
  5. Load it into an AnimatedSprite2D. Add an AnimatedSprite2D node and drag sprite-frames.tres from the FileSystem dock onto its "Sprite Frames" property in the Inspector. Your animations appear in the SpriteFrames panel at the bottom of the editor.
  6. Set speed and looping. Every animation arrives at 12 FPS and looping. Each frame’s duration is 1.0, except frames that came from GIF → Sprite Sheet: they keep their own delays as relative durations (a 500 ms frame gets 6, and 6 ÷ 12 = 0.5 s). Change the FPS in the SpriteFrames panel, and switch looping off for anything that should play once, such as an attack. A tag’s reverse or ping-pong direction isn’t carried into the file.

Path B: Godot JSON for your own scripts

The "Godot JSON" format (sprite-sheet.godot.json) lists each frame’s name from Rename & Reorder, its region in the sheet, its trim offset and original size, and the pivot from the "Pivot Point" picker; Animation Tags become an "animations" list. Godot doesn’t read it on its own, so it suits static sprites and your own import code. This builds one AtlasTexture per frame, keyed by name:

func _ready() -> void:
    var sheet: Texture2D = load("res://sprite-sheet.png")
    var data: Dictionary = JSON.parse_string(FileAccess.get_file_as_string("res://sprite-sheet.godot.json"))
    var textures := {}
    for f in data["frames"]:
        var r: Dictionary = f["region"]
        var tex := AtlasTexture.new()
        tex.atlas = sheet
        tex.region = Rect2(r["x"], r["y"], r["w"], r["h"])
        if f["trimmed"]:
            # put back the border that Trim transparency cut off
            var o: Dictionary = f["offset"]
            var s: Dictionary = f["sourceSize"]
            tex.margin = Rect2(o["x"], o["y"], s["w"] - r["w"], s["h"] - r["h"])
        textures[f["name"]] = tex
    $Sprite2D.texture = textures["walk_0001"]  # a Sprite2D child node

Path C: let the free Godot add-on build it

Our free SpritePilot Importer add-on reads the JSON inside Godot and writes the SpriteFrames for you. It fixes the two limits of Path A: the sheet can sit in any folder, and reverse and ping-pong tags keep their direction. With Aseprite JSON it also reads each frame’s time, as the .tres from Path A does. Download it from the Godot Sprite Sheet Importer page (link below), or from GitHub.

  1. Install the add-on once. Unzip the download, copy addons/spritepilot_importer into your project’s addons folder, and turn on SpritePilot Importer under Project Settings, Plugins. It needs Godot 4.4 or newer.
  2. Export Aseprite JSON or Godot JSON. In Export & Download, add your Animation Tags as in Path A, then pick "Aseprite JSON" (keeps each frame’s time) or "Godot JSON" and download. You get the sheet and its JSON.
  3. Right click the JSON in Godot. Put both files in the same folder of your project, right click the JSON in the FileSystem dock and choose "Create SpriteFrames (SpritePilot)". A .tres with the JSON’s name appears next to it; load it into an AnimatedSprite2D as in Path A. After re-exporting, do it again: the loop and speed you set on each animation are kept.

Tips

Go deeper

Related guides