Bring In Your Art
Import a sprite sheet, a folder of frames or an Aseprite file as a project asset, and move art to and from Aseprite.
Art you already have can join a Mode 8 project: a sprite sheet, a folder of PNG frames, or an Aseprite file. mode8 import cuts it into frames, finds or extracts its palette, works out its animations and their timing, and records it all as a project asset. From then on the Studio, the CLI and agents can edit, animate, check and export it like art Mode 8 made itself. mode8 aseprite moves frames to and from Aseprite without a project.

Import a sprite sheet#
A sheet is one PNG with the frames on a grid. To have one to import, export the starter hero's frames as a plain 4x4 grid of 64x72 cells, the way another tool might hand them to you:
$ mode8 init my-game --template platformer
✓ Created the platformer starter in my-game/
26 assets · palette nes_master_gothic · lint 26/26 passed
hero, slime, ground, wall, window, pillar, ledge_left, ledge, ledge_right, stairs, +6 more + 10 UI pieces
UI kit → my-game/godot/art/ui/ · font → my-game/godot/art/font/
Godot project → my-game/godot/ (runs main.tscn)
Next:
cd my-game
godot -e --path godot
mode8 studio .
mode8 export hero
$ cd my-game
$ mode8 export assets/hero/frames --out-dir incoming --name knight --formats atlas --padding 0
✓ Exported knight (15 frames) → incoming/
atlas · 2 files
animations attack, hurt, idle, jump, walk
palette nes_master_gothic from mode8.toml
Next:
mode8 verify --assets-dir incomingNow import incoming/knight_atlas.png. --cell-size is the size of one frame; Mode 8 counts the columns and rows itself:
$ mode8 import incoming/knight_atlas.png --name knight --cell-size 64x72
✓ Imported knight: 15 frames (64x72) → assets/knight/
palette knight (new) · animations frame
Next:
mode8 studio .
mode8 export assets/knight/frames --out-dir exports/knight --name knight --animations assets/knight/master.m8.jsonThat works, but the frames are only numbered (frame_00 to frame_14), so they form one animation, and the palette was extracted from the pixels into a new palettes/knight.gpl. Tell the import what the frames are and which palette they use, and you get a proper asset:
$ mode8 import incoming/knight_atlas.png --name knight2 --cell-size 64x72 --frame-names windup,attack,recover,hurt,idle,idle_1,idle_2,idle_3,jump,walk_0,walk_1,walk_2,walk_3,walk_4,walk_5 --palette nes_master_gothic --fps 10
✓ Imported knight2: 15 frames (64x72) → assets/knight2/
palette nes_master_gothic · animations attack, hurt, idle, jump, walk
Next:
mode8 studio .
mode8 export assets/knight2/frames --out-dir exports/knight2 --name knight2 --animations assets/knight2/master.m8.jsonThe frame names give the animations: walk_0 to walk_5 become one walk animation, idle is picked as the master, and attack, hurt and jump are marked to play once. --fps sets the frame rate. Everything is recorded in assets/knight2/master.m8.json, where the Studio and mode8 export --animations read it.
How the grid is cut:
| Flag | Means |
|---|---|
--cell-size WxH | the size of one frame |
--cols N, --rows N | the grid, when the sheet has empty space at the right or bottom |
--margin PX | a border around the whole sheet |
--spacing PX | the gap between cells |
--keep-empty | keep cells that are fully transparent (they are dropped by default) |
--frame-names a,b,... | one name per imported frame, in reading order |
--master-frame NAME | the frame to use as the master (default: idle, else the first) |
--art-type TYPE | the art type to record in the asset's sidecar |
Import a folder of frames#
A folder of PNGs imports as one frame per file. Here the folder comes from mode8 anim, which also writes a timing file (walker.anim.json) beside the frames:
$ mode8 anim assets/hero/master.png --rig humanoid --out-dir incoming/walker --prefix walker
✓ Animated 15 frames → incoming/walker/
idle 4, walk 6, jump 1, attack 3, hurt 1 rig humanoid
Next:
mode8 export incoming/walker --out-dir incoming/exports/hero --name hero
mode8 verify --assets-dir incoming/walker --check-anim --include-root
$ mode8 import incoming/walker --name walker --palette nes_master_gothic
✓ Imported walker: 15 frames (64x72) → assets/walker/
palette nes_master_gothic · animations idle, walk, jump, attack, hurt
Next:
mode8 studio .
mode8 export assets/walker/frames --out-dir exports/walker --name walker --animations assets/walker/master.m8.jsonThe import drops the part of the file names they all share (walker_), so the frames are idle, walk_0 and so on, and it reads the animations and their frame rates from the timing file: the attack keeps its 10 fps and plays once. Without a timing file, the frames are grouped by name (walk_0.png to walk_3.png become walk), at --fps (default 8). Frames whose names say nothing, such as 00.png to 05.png, become one animation called default.
The palette#
Without --palette, Mode 8 extracts the art's own colors into palettes/<name>.gpl and the asset uses that. Art with more than 256 colors is refused: reduce it first with mode8 pixelize --colors N (see Sprites).
With --palette, the asset is assigned a palette the project already has, or a bundled one. The pixels are imported exactly as they are, so name the palette the art was made with. If some pixels are not in it, the asset still imports, and mode8 lint or the Studio's Checks tab shows them as off-palette; a palette swap moves them onto it.
When an import fails#
Asset names are unique, so importing the same name twice is refused instead of overwriting your asset:
$ mode8 import incoming/knight_atlas.png --name knight --cell-size 64x72
error: asset already exists: knight
pick another --name, or edit the existing assetPick another --name, or edit the existing asset. A --frame-names list must have exactly one name per frame:
$ mode8 import incoming/knight_atlas.png --name knight3 --cell-size 64x72 --frame-names idle,walk_0
error: got 2 frame name(s) for 15 frame(s)
example: mode8 import sheet.png --name hero --cell-size 64x72Aseprite#
Mode 8 reads and writes .aseprite and .ase files directly, with no Aseprite install: frames, tags (as animations), frame durations, layers, and 32-bit or indexed color.
Export frames to Aseprite#
$ mode8 aseprite export assets/hero/frames --out incoming/hero.aseprite
✓ Wrote incoming/hero.aseprite (15 frames, 1 layer, 32-bit)
tags attack, hurt, idle, jump, walkEach animation becomes an Aseprite tag. --fps sets the frame duration (default 8 fps), and --color-depth 8 --palette NAME writes an indexed file with that palette embedded, which keeps Aseprite on the palette while you paint:
$ mode8 aseprite export assets/hero/frames --out incoming/hero-indexed.aseprite --color-depth 8 --palette nes_master_gothic --fps 10
✓ Wrote incoming/hero-indexed.aseprite (15 frames, 1 layer, 8-bit)
tags attack, hurt, idle, jump, walkTo export a project asset itself (its master, not its frames), use --project-root and --asset. Add --layered to write its layer stack as real Aseprite layers. The starter hero is one flat image, so give it a second layer first:
mode8 layers add --asset hero --name Shading$ mode8 aseprite export --project-root . --asset hero --layered --out incoming/hero-layers.aseprite
✓ Wrote incoming/hero-layers.aseprite (1 frame, 2 layers, 32-bit)Read an Aseprite file back#
mode8 aseprite import extracts the frames to PNGs, named after their tags:
$ mode8 aseprite import incoming/hero.aseprite --out-dir frames/hero
✓ Extracted 15 frames (64x72) → frames/hero/
animations attack, hurt, idle, jump, walk
Next:
mode8 export frames/hero --out-dir exports/hero --name heroOr import the file straight into the project as an asset. --layers keep keeps the master frame's layers as the asset's layer stack; the default, flatten, merges them:
$ mode8 import incoming/hero-layers.aseprite --name hero_layers --layers keep --palette nes_master_gothic
✓ Imported hero_layers: 1 frame (64x72) → assets/hero_layers/
palette nes_master_gothic
Next:
mode8 studio .
mode8 export assets/hero_layers/frames --out-dir exports/hero_layers --name hero_layers --animations assets/hero_layers/master.m8.json
$ mode8 layers list --asset hero_layers
hero_layers: 2 layers (bottom → top)
Base Base
Shading Shading
can undo in Studio or via MCPThe Aseprite file's own frame durations win over --fps.
Note
Frames come back from Aseprite named after their tag and position: the hero's windup and attack frames, both in the attack tag, return as attack_0 and attack_1. The animations and their timing are the same; only the file names change.
Next#
- The Studio: paint on the imported asset.
- Animation: give a single imported sprite walk and attack frames.
- Exporting: send the asset to your engine.