AI Sprite Sheet Generator
12-frame animations from one character reference, with the real outputs
By DreamLayer AI

A sprite sheet generator for game development needs to do more than make images. It needs to keep one character consistent, put each frame in a specific pose, remove the background with a real alpha channel, and pack the frames into a grid an engine can read.
This post shows how I made a sprite sheet from one reference with DreamLayer. It includes:
- 3 characters
- 5 sprite sheets
- Example of the unreleased private-beta sprite sheet with advanced features
- The exact prompts
- Failed frames
- Real outputs
The images are not retouched. The only processing is the background removal and grid assembly described below.
Try it: a new account starts with 3 free credits. That is enough to make frame 1 and 2 more frames, so you can check consistency before spending more. Start on the game asset page.
What you need
You need 4 things:
- One reference image of the character, in side view on a plain background. This reference becomes frame 1, and every other frame is generated from it. If anything about the reference looks wrong, fix the reference before you generate the rest. The rider below took 5 attempts before frame 1 was right.
- A pose list. This is one short animation note per frame that says where the feet, arms, body, and head should be.
- An identity-preserving prompt. Repeat this part word for word in every request so the character, clothes, style, background, and view stay the same.
- A coding agent such as Claude Code, Codex, or Cursor, connected through the DreamLayer MCP server, CLI, or API. It sends requests, saves frames, removes backgrounds, and builds the grid.
A background remover strips the plain background and returns a real alpha channel.
A 12-frame sheet usually costs about 24 credits before retries, one per frame and one per background removal. An API credit is US$0.17. The 5 sprite sheets in this post used 102 credits in total, about US$17, including rejected frames.
How to make a sprite sheet
Every sheet in this post follows the same 5 steps. This is the sprite sheet maker I use: DreamLayer does the image work and the scripts do the assembly.
- Generate frame 1 from a text prompt and fix it until it is right.
- Write the pose list, one line per frame.
- Generate each frame with the identity-preserving prompt and frame 1 attached as the reference.
- Remove the background from every kept frame.
- Assemble the sheet: one shared scale, 512 x 512 cells, feet on a baseline, and an atlas JSON.
The rest of the post is that workflow, 4 times, with the real outputs.
Example 1: Horse Rearing Up and Recovering
The reference
Frame 1 is a man in a white tank top on a chestnut horse, shown from the side and facing right. I wanted a clean painted look with soft pink and violet light.
It took 5 attempts. The first was too photographic and the third too gritty. Pick the reference carefully because every later frame inherits it.

The prompts
Every frame uses the same identity-preserving prompt, followed by one pose line. Here is the exact prompt:
Keep this exact same character and horse from the input image: a lean athletic man in his late twenties with short dark hair, light stubble, tanned skin, a thin gold chain, a gold bracelet, no tattoos, a fitted white tank top, dark slim jeans and white sneakers, riding a chestnut horse with a white blaze and worn brown tack. Same clean modern key-art painting style, same soft pastel sunset light, same plain flat white background with nothing else in it, same side view facing right, whole horse and rider fully inside the frame with space above the head, no scenery, no text, no watermark. This is one frame of a 12-frame 'horse rears up and recovers' animation.4 of the 11 pose lines are below. Frame 1 is the reference.
Frame 2 (anticipation): all four hooves stay on the ground, the horse sinks its weight back onto bent hind legs so the croup drops, the front legs stay straight and planted, the head lowers and the neck arches; the rider leans slightly forward and shortens the reins.Frame 6 (peak of the rear): the horse stands almost fully upright on its hind legs, body about 75 degrees, forelegs at their highest, head high with the mane flying; the rider holds on close to the neck, both hands on the reins.Frame 8 (coming down): the body has dropped to about 40 degrees, forelegs extended forward and down reaching for the ground, hind legs straightening; the rider begins to sit back.Frame 10 (landed): the very next moment after landing, both front hooves have just touched the ground and all four hooves are down, the horse is standing still, not running, body level with a slight downward pitch, head and neck stretched low and forward, hind legs still bent; the rider leans back to absorb the landing with arms extended on the reins.What happened
Frames 2, 3, 6, 11, and 12 worked on the first try. Frame 6, the peak of the rear, was the strongest image.
The main failure happened on the way down. 3 descending frames came back as a galloping horse. The pose was far from the standing reference, so the image model fell back to a familiar running pose.



The fix was to change the reference, not the prompt. I used approved frame 6 as the input for frames 4, 5, 7, 8, 9, and 10. Once the input already showed a rearing horse, all 6 descending frames were usable.
What held and what drifted
The man's face, hair, stubble, tank top, and chain held across all 12 frames. The horse's coat, blaze, tack, palette, and painted finish also held.
The horse's size drifted by up to about 15 percent. The assembler uses one scale for the full sheet, so that difference stays visible. You can regenerate outliers or normalize against a fixed feature such as saddle height. I left the drift in to show the real result.
5 frames also had a soft ground shadow. The background remover kept some of it because it touched the subject. The assembly script removed it with a simple color rule.


{
"image": "rider-rear-sheet.png",
"size": { "w": 2048, "h": 1536 },
"cell": 512,
"padding": 4,
"frames": {
"rear_01": { "x": 0, "y": 0, "w": 512, "h": 512 },
"rear_02": { "x": 512, "y": 0, "w": 512, "h": 512 },
"rear_03": { "x": 1024, "y": 0, "w": 512, "h": 512 },
... twelve entries, one per cell
}
}The final count was 16 generations, 13 background removals, 12 frames kept, 4 rejected, and 29 credits charged.
Example 2: Pixel-Art Sword Swing
This pixel art sprite sheet uses one swordfighter reference and follows a full swing from ready stance to recovery. The method is the same: one identity-preserving prompt, one pose line per frame, then background removal and assembly.
The reference
Frame 1 is a hooded swordfighter in leather armor over a green tunic, drawn in a 16-bit pixel art style, side view facing right on a white background, sword held low in a ready stance.
It came right on the first attempt, which is rarer than it sounds. Every frame below inherits it.

The prompts
Here is the exact identity-preserving prompt:
Keep this exact same pixel art character from the input image: the same swordfighter with the same hair, face, armour, colours and sword, same crisp 16-bit pixel art style with a limited palette and no anti-aliasing blur, same flat white background, same side view facing right, whole body and sword inside the frame, no ground, no scenery, no text, no watermark. This is one frame of a 12-frame sword swing animation.3 of the 12 pose lines:
Frame 3 (wind-up): the sword held high behind the head, both hands on the grip, torso twisted back, back foot planted.Frame 6 (mid swing): the blade sweeps diagonally down in front of the body at chest height, arms extended, body leaning into the strike, a faint motion arc.Frame 7 (impact): the blade fully extended forward at waist height at the end of the strike, arms straight, front knee bent deep, torso leaning forward.What happened
All 12 poses came from one reference. The hood, leather armor, green tunic, belt, and boots stayed consistent.
2 frames needed a retry. One turned the character's back to the camera. Another pointed the sword straight up during recovery. Both worked on the second attempt after I made the side-view instruction more explicit.
What held and what drifted
The character and outfit held well. The sword did not. Its length changed by up to about a third between frames.
The style also landed between strict 16-bit pixel art and a crisp cel-painted look with pixel texture. If you need a true pixel grid, downsample with nearest-neighbor or do the final pass by hand.
3 frames had a soft gray floor under the boots. 2 background removals left a thin white edge. The assembly script cleaned both.
For Unity, set Filter Mode to Point and Compression to None for a pixel art sprite sheet. Otherwise the engine will soften the edges.


The final count was 14 generations, 13 background removals, 12 frames kept, 2 rejected, and 27 credits charged.
Example 3: Wave and Clap
This example covers a 6-frame wave and a 6-frame clap from one reference. Both are good first tests because the body shape changes very little. That makes face, clothing, and style drift easy to spot.
The reference
Frame 1 is a young woman with a ponytail in a cream and red varsity jacket, dark jeans, and red sneakers, drawn half anime and half painted.
The reference is a three-quarter front view, while the prompts ask for a side view. The ponytail, jacket, jeans, and sneakers still carried into profile.

The prompts
Here is the exact identity-preserving prompt:
Keep this exact same character from the input image: an attractive young woman with a mixed Latina and East Asian look, long dark hair, warm brown skin, drawn half anime and half painterly with soft cel shading, wearing the same outfit as the input (same jacket, top, trousers and shoes, same colours). Same style, same flat white background, same full-body side view facing right, whole body inside the frame, no ground, no scenery, no text, no watermark.2 of the 12 pose lines:
Wave animation frame 4 of 6: her right arm raised high, hand tilted to the left of her head mid-wave, fingers spread, bright smile.Clap animation frame 3 of 6: both palms pressed together in front of her chest at the moment of the clap, fingers straight, happy expression.What happened
The wave and clap read clearly. 2 frames needed another pass: one wave frame became a stride and one clap frame bent the knees. More explicit leg and foot instructions fixed both.
What held and what drifted
The face in profile, hair, jacket, stripes, jeans, and shoes stayed consistent. Her size drifted by up to a fifth.
The hands were less reliable. One wave frame has a thumb that can read like a sixth finger at full size, although it is hard to notice at sprite size.
A wave or clap often looks better from the front or three-quarter view. Since each action has its own sheet, you can choose the view per action.




The final count for the 2 sheets was 15 generations, 13 background removals, 12 frames kept, 3 rejected, and 28 credits charged.
Example 4: Walking Cycle (On Private Beta)
The walk cycle sprite sheet uses the same reference and the same identity-preserving prompt as example 3. 2 of the 8 pose lines:
Walk cycle frame 1 of 8 (contact): right foot forward on the ground, left foot back, left arm forward and right arm back, body at normal height.Walk cycle frame 3 of 8 (passing): legs pass each other under the body, right leg straight, left knee lifted forward, arms near the sides, body slightly higher.A passing pose is the moment in a walk when one leg passes the other under the body. Without it, a walk often looks like repeated wide strides.
Right now, through the API
The walk was the hardest action. Without named contact, recoil, passing, and high-point positions, the model tended to repeat the same wide stride. One walk pose became a deep crouch and was re-run with the legs described explicitly.
A 12-frame walk with more detailed pose lines did not help. Most frames still landed on a similar stride. Generating in-between poses from one good passing frame also produced crouches and high-knee steps. Frame by frame, 8 frames with one strong passing pose was the most useful result.
A side view works best for the walk.


The final count was 10 generations, 8 background removals, 8 frames kept, 2 rejected, and 18 credits charged.
In private beta
The frame-by-frame walk still struggled with passing poses, so I ran the same reference through DreamLayer's unreleased V2 autonomous agent, which is in private beta. It assembles the frames in the background, keeps the character consistent from the first frame to the last, and returns a cycle that reads as continuous movement with believable weight and timing. You still receive a set of frames. The motion is the illusion those frames create.


How the agent assembles the sheet
Generation returns one PNG per frame; the sprite sheet and its atlas JSON come from the agent, which prepares the frames and builds the grid.
An atlas JSON is a small metadata file that tells an engine where each frame sits inside the final PNG.
After background removal, the agent:
- Crops each frame to its visible alpha bounds.
- Finds an anchor around the head and chest while ignoring thin shapes such as a raised sword. This keeps the body from sliding sideways.
- Computes one shared scale so every frame fits a 512 pixel cell with 4 pixels of padding.
- Places each frame on the cell's center line and puts the feet on one baseline.
- Writes the PNG sheet, an atlas JSON with one entry per cell, and a 1024 pixel WebP for the web.
The assembler is about 60 lines of Python. A coding agent can write it from these steps.
Importing the sheet into Unity
A uniform 512 x 512 grid makes the Unity import straightforward.
- Drop the PNG into Assets. Set Texture Type to Sprite (2D and UI) and Sprite Mode to Multiple. For pixel art, set Filter Mode to Point (no filter) and Compression to None. Set Max Size to 2048.
- Open the Sprite Editor. Choose Slice, then Type: Grid By Cell Size. Set Pixel Size to 512 x 512 and Pivot to Bottom. Slice, then Apply.
- Expand the texture in the Project window. Select the 12 sub-sprites in order and drag them into the Scene. Unity asks where to save a new Animation clip and creates an Animator Controller.
- In the Animation clip, set Samples to 10 or 12 and turn on Loop Time. The rear-and-recover reads well at 10 frames per second. A walk usually works between 8 and 12.
You do not need the atlas JSON for this uniform Unity grid because the slice already contains the frame positions. Keep it for engines that use atlas data or for trimmed cells later.
For Godot 4, create an AnimatedSprite2D and a new SpriteFrames resource. Choose Add frames from a Sprite Sheet, set Horizontal to 4 and Vertical to 3, select every cell, and set FPS to 10.
For Phaser 3:
this.load.spritesheet("rider", "rider-rear-sheet.png", { frameWidth: 512, frameHeight: 512 });
this.anims.create({
key: "rear",
frames: this.anims.generateFrameNumbers("rider", { start: 0, end: 11 }),
frameRate: 10,
repeat: -1,
});Running it from Claude Code, Codex, or Cursor
With the DreamLayer MCP server connected, a coding agent can run the full workflow. This is the exact instruction shape I used for the rider:
Use the approved rider image as the input asset. Generate frames 2 to 12 with the pose lines in poses.md, the same identity-preserving prompt in every request, one stable idempotency key per frame, and save each result as rear_NN.png. Stop and show me a contact sheet before removing any backgrounds. Then remove the background from every frame, assemble a 4 x 3 sheet at 512 pixel cells with the feet on one baseline, and write the atlas JSON.The agent generated 11 frames, built a contact sheet, and stopped for review. That review caught the 3 gallops before the remaining background removals.
After approval, it ran the background remover 12 times and wrote the assembler. The same operations are available through the command line:
npm install -g dreamlayer
export DREAMLAYER_API_KEY="..."
dreamlayer edit rear_01.png "<identity-preserving prompt> Frame 6 (peak of the rear): ..." --out rear_06.png
dreamlayer cutout rear_06.png --out rear_06_nobg.png
dreamlayer balanceCommon questions about AI sprite sheet generation
Is this just a wrapper around an image model? The generation comes from multiple image models, chosen by model strength and the specific task. DreamLayer orchestrates its own AI workflow around them, making it easy to use the state of the art behind one interface: chaining, background removal, review steps, and assembly. Today your agent drives those pieces. In private beta, the unreleased V2 autonomous agent runs more of the workflow on its own. This post describes the workflow in enough detail to follow it with your own agent.
Will everyone's sheets look the same? No. Your reference drives the character and visual style. The examples share a workflow, not a look.
Does it output packed sheets with metadata? Yes. The workflow produces a PNG grid and an atlas JSON. Cells are uniform and untrimmed. Trimming and rotation packing are separate problems.
Does it do 3D or isometric tiles? No. This is for 2D side-view sprites, not isometric props or low-poly meshes.
What about the background? Each frame goes through a background remover that returns a real alpha channel. You should still check for small ground shadows or light edges.
Get the scripts
Everything used for the frame-by-frame sheets is published as plain Python next to the examples. The scripts include the batch driver for the Agent API, the background-removal cleaner, the chest-anchor assembler, and the finisher.
The README is written for a coding agent to follow. Point your agent at the README, then tell it which character and action you want. Keys come from the environment and are never printed.
Today, and what is in private beta
Today, DreamLayer gives you generation from one reference, background removal, and an API, CLI, and MCP server your agent can drive. Pricing is per finished image.
In private beta, the workflow is becoming a higher-level operation. You provide a reference and name the action. DreamLayer's unreleased V2 autonomous agent assembles the frames in the background, keeps the character consistent from first frame to last, and handles believable movement and timing. The result is cleaned frames, the sheet, and the atlas.
The 12-frame walk in example 4 uses that private-beta route. If you want to try it before it is public, email mackenzie@dreamlayer.io. The private-beta article shows every sheet it produced.
The same agent produced these from the swordfighter and rider references in examples 1 and 2, with the action named and no pose list:


What is in the private beta: all five sheets, what held, and how to get in.
Try it: 3 free credits
The easiest way to test the sprite sheet generator is with 3 frames. A new account includes 3 free credits, so make frame 1 and 2 more frames from that reference.
Compare the face, clothes, style, scale, and pose. If those 3 frames look right, continue with the full sheet.
The same core operations, generate from a reference, remove the background, and check your balance, are available on the API, CLI and MCP page. The game asset page also covers frame counts, cell sizes, engines, and pixel art.