Importing 2D sprite sheets
Sprite sheets from an image model (Nano Banana and others) or a 2D pack come in through two AI tools: art2d_import_review cuts the background away into a review folder, and import_sprites turns the reviewed frames into sheets with clips and gives you the exact sprite { ... } line. Ask your AI to import a sheet, or call the tools yourself.
The background
Ask for isolated items on flat magenta (#FF00FF). With "key": "magenta" the importer keys the background the picture really has, read from its border. A downloaded generator picture's "magenta" often drifts (to about 250, 35, 248 in a JPEG), and the importer follows it. A sheet whose border is far from magenta keys pure magenta; "auto" always keys the border's colour.
Options for hard sheets
| Option | What it does | When to use it |
|---|---|---|
"enclosed": "key" | Also removes background the art closes round (regions of at least minimum_enclosed_area pixels, default 24). | Gaps between legs that meet at the boots, inside a handle or a loop. Without it only background touching the picture's edge is removed, so those gaps stay magenta. |
"edge_rgb": "foreground" | Repairs strong key-coloured pixels along the art's edge (within edge_rgb_radius, 1 to 16 pixels, default 4) using the art's own colours. | A pink fringe left round the outline. |
"unmix": "boundary" | Unmixes soft edges only near the removed background (within unmix_radius), leaving the art's inside untouched. | Soft or anti-aliased outlines on opaque art. |
"protect" | Rectangles the key never touches. | Art that really is magenta or pink. |
Keep glows inside the outlines
Ask for lantern light, flames and magic painted inside their outlines, with no soft glow, bloom or halo spilling onto the background. A glow painted over magenta blends to pink, and no key takes it out cleanly. Add the glow in the engine instead, with light_2d and 2D effects.
Check before you build
Count the frames against the poses you asked for, then look at the frames in a still: the same feet line, the same scale, the same light direction, no magenta left inside an item, and frames that line up when played.