Sprite Stacking: A Free AI Skill That Turns Four Pixel Art Drawings Into a Sprite You Can Spin
A free, MIT-licensed agent skill carves a top, side, front and back view into a pixel-art object that turns smoothly in any direction. No 3D software, no drawing sixteen angles by hand. Here is how it works, and where your drawings will trip it up.
There is a pixel-art car in a lot of small indie games that should not be possible. It turns in a full circle, smoothly, with crisp pixels at every angle, and nobody drew it from every angle. Nobody built it in 3D either.
It is a stack of flat drawings. Picture a loaf of bread cut into thin slices, each slice drawn as a tiny top-down picture. Draw the bottom slice, then the next one a single pixel higher, then the next, all rotated to the same angle, and your eye reads a solid object. Rotate every slice a little more and the car turns. Game developers call it sprite stacking, and it has been a cult technique for years because it gives you 3D-looking motion while keeping the hard pixel edges that 3D renders blur away.
The catch was always the slices. Someone had to draw thirty or forty cross-sections of a car, each one consistent with the others, which is the kind of tedious job that kills a side project.
A free agent skill called sprite-stacking, released on November 20 by Daniel White, removes that job. You give it four ordinary drawings, the top, side, front and back of an object, and it works out the slices for you. It passed 240 stars on GitHub in its first day, which for a niche art tool tells you how many people wanted this.
My position after going through the repo: this is the most useful kind of AI art tool, because it does not draw for you. It does the geometry you never wanted to do, and leaves the drawing, the part that is actually yours, in your hands. It also rewards a very specific way of drawing, and if you skip that, you will get boxes.
What it actually does
You install it into an AI coding assistant. It works with Claude Code, Codex, Cursor, OpenCode, Gemini CLI and Pi. Then you ask in plain words: "Make a rotatable pixel art car," or "Sprite stack this four-view sheet and give me a turntable," or "Add a fake 3D pixel art tree to my Godot game."
From there the assistant runs a short Python script that does four things:
- Reads your sheet of four views laid out in one row.
- Works out the solid shape all four views agree on.
- Cuts that shape into a strip of flat layers, ground first.
- Draws the layers stacked, rotated and lifted one pixel each, so you can see the result spin.
The output is a plain PNG strip of slices, a preview image to check, and a standalone web page you can open in any browser. That viewer is more generous than it needs to be. It has a turntable, a time-of-day slider that takes your object from noon to neon night, rain with little wet reflections, snow that piles up on surfaces facing the sky, a mode where you can drive a car around with the arrow keys, and an export button that bakes a 16-direction sprite sheet you can drop into a game engine.
You do not need an image generator. If you have one, the skill includes a prompt for making the four-view sheet. If you have drawings, it uses yours. If you have neither, the assistant draws the four views itself in code.
The idea behind the carving
The clever part is how four flat pictures become one solid object, and it is worth understanding because it decides what you should draw.
Think of four cookie cutters. One is the outline of the car seen from above. One is the outline from the side. One from the front, one from the back. Now take a block of clay and press all four cutters through it, each from its own direction. What survives is only the clay that sits inside every outline at once.
That is the whole method. A tiny block of the object is kept only where all four views cover it. Then the script slices the surviving shape horizontally and colors each slice from your drawings.
Once you see it that way, the rules make sense:
- A square top view carves a box. If your object is round from above (a pot, a tree canopy, a wheel), the top view has to show a circle.
- Hidden hollows fill in. A truck bed, an archway, a hollow under a table: if no single view shows daylight through it, the cutters never remove that clay. The skill's own instructions tell you to fix those slices by hand afterward.
- Overhangs that show daylight survive. A raised rear spoiler on a car, visible as a gap in the side view, comes out right.
- Anything sticking out of a wall becomes a shelf. A flower box drawn on the side view carves a ledge along that entire wall, because the side outline cannot say where the box stops. The instructions suggest painting small details flat instead.
This is the most important thing to know before you start. The tool is only as smart as the outlines, so you draw for the cutters, not for the eye.
Put this into practice
Here is a first session, start to finish. Budget an hour the first time, mostly for drawing.
1. Install it. In a project folder, run npx skills add danielwh2/sprite-stacking. That needs a recent version of Node. If you would rather not, copy the skills/sprite-stacking folder into your assistant's skills folder (for Claude Code that is ~/.claude/skills/). You also need Python with two common add-ons, Pillow and NumPy: pip install pillow numpy.
2. Pick something simple. A small car, a crate, a lamp post or a mailbox. Not a person, and not an airy tree with daylight between the branches. You want a blocky object with a clear outline from every side.
3. Draw the sheet. One row, left to right: top, side, front, back. On flat white, with clear space between views. The top view looks straight down with the front of the object pointing down the page. The side view has the front pointing left. And this is the rule that matters most: all four at exactly the same scale, so the car's length in the top view matches its length in the side view pixel for pixel, its width matches the front view, its height matches across side, front and back.
Use flat color and crisp one-pixel outlines. The skill is blunt about soft, airbrushed edges: they smear once the slices rotate, and it tells you to redraw rather than try to rescue them. Its suggested shading is three or four tones per color, cool in the shadows, warm in the highlights, no gradients.
4. Choose your level of detail. The number of slices sets how fine the result is. The README suggests 15 to 20 slices for a chunky retro look and 32 to 48 for a detailed one. If you drew the sheet yourself at native size, the skill's instructions say to match the slice count to the height of your side view in pixels, outline included, so every slice lands on one of your rows.
5. Run it. Ask your assistant to sprite-stack the sheet, or run the script yourself:
python3 skills/sprite-stacking/scripts/views_to_slices.py views.png slices.png --slices 36 --preview check.png --html viewer.html
Add --round for things that are round from above, like towers and pots. Add --emissive if your object has parts that should glow at night, such as headlights or windows; the script tries to detect them automatically.
6. Look before you ship. The skill's instructions are firm on one point: never ship a stack you have not rendered and looked at. Open check.png, then the viewer page. Spin it slowly. If it wobbles around a point off to one side, your object is not centered on its sheet; the stack spins around the middle of its bounding box. If parts look like solid bricks, go back to step 3 and fix the outline that let them through.
7. Export. In the viewer, bake the 16-direction sheet and bring it into your engine. The skill is written for web canvas, Godot, Unity and Phaser, and when it works inside an existing game project it is told to read your renderer first and fit into it rather than bolt on a second one.
If you write a lot of these, keep a "turntable test" habit. Draw, carve, spin, fix. The first two objects will teach you more about drawing for the cutters than any instruction.
Where it breaks
This is a one-day-old repo from one developer, and it is honest about its edges. Here are the ones that matter for an artist.
Anything with hidden insides. Cups, bowls, open boxes, arches, the space under a car. The carving fills them in and you repair slices by hand, which is the job you were trying to avoid.
Characters and soft, organic shapes. People, animals, airy trees with gaps in the canopy. Four outlines cannot describe an arm in front of a body or a gap between branches. Sprite stacking has always suited props and vehicles, and this tool does not change that.
Drawings that disagree with each other. If the side view is two pixels longer than the top view, the cutters meet in odd places. AI-generated sheets are especially prone to this, since image models rarely keep exact proportions across four views. Check the measurements before you carve.
Height limits. A stack of flat slices looks right from above and at an angle. It cannot show the underside of anything, and it does not look like real 3D from eye level. That is the style, not a defect, but it decides which games it fits.
It is young. Day-one tools change fast and break in ways their authors have not seen yet. The MIT license means you can ship what you make with it, commercially, but you are the support desk.
And one note on credit: the author says plainly that sprite stacking is a long-standing indie technique. What is new here is the four-view carving and the assistant doing the slicing for you.
Should you try it?
If you draw pixel art for games and have ever wanted a turnable vehicle, prop or building without learning a 3D program, yes. Start with a crate. Then a car. You will know within an hour whether your way of drawing fits it.
If you mostly draw characters, the tool will frustrate you, and that is a limit of the technique, not the code.
The interesting thing is what the AI is doing in this picture. It is not inventing your art. It is doing measurement, slicing and bookkeeping, the parts of a craft that make people quit before the fun begins. Draw four honest views and see what they were hiding.
- Sources: sprite-stacking on GitHub · sprite-stacking SKILL.md · skills CLI