← Back to blog
AiAbout 7 min read

Four pixel views in, one spinnable turntable out

Published Nov 29, 2026
Four pixel views in, one spinnable turntable out

There is a moment in every small game project where a 2D artist needs something to turn. A character, a crate, a car. The proper answer is a 3D model with a rig and a render pipeline. The answer that actually ships is a sprite sheet with eight or sixteen angles, drawn by hand, one frame at a time.

sprite-stacking attacks that second answer. It has 1,206 stars, is an agent skill rather than an app, and turns four pixel art views into a stack of flat layers that can be rotated in a browser.

The technique itself is not new, and the repository says so in a section called prior art. Sprite stacking has been used in indie games for years: you slice a voxel volume into thin horizontal layers, stack the layers as flat sprites, and offset them as you rotate. What is new here is the input method and the person doing the slicing.

The constraint that makes it work

Four views: top, side, front and back, orthographic, arranged in one row.

From those, the tool carves a volume with a single rule. A voxel survives only where all four views cover it.

That rule is the whole geometry. It means the top view controls the footprint, the front and back control the silhouette from two sides, and the side view controls the profile. Anything visible in only one view is dropped, which is why the output looks solid rather than hollow, and also why thin details like a flagpole or an antenna tend to vanish.

The volume is then cut into a strip of flat layers, ground first. Each layer gets rotated, squashed for pitch, and lifted by a pixel as it renders. Squash and lift are the two numbers that sell the fake perspective, and getting them wrong is what makes naive sprite stacking look like a stack of pancakes.

Install and the slicer

npx skills add danielwh2/sprite-stacking

The install uses the skills CLI from Vercel Labs and needs Node 22.20 or later. Add -g for every project, or -a claude-code to pick one agent. The supported list is broad: Claude Code, Codex, Cursor, OpenCode, Gemini CLI and Pi all read the same SKILL.md format, and there is a manual copy path into ~/.claude/skills/ or ~/.agents/skills/ if you prefer.

The slicer is a Python script with Pillow and NumPy.

python3 skills/sprite-stacking/scripts/views_to_slices.py views.png slices.png \
  --slices 36 --preview check.png --html viewer.html

The flags are where the craft is.

FlagEffect
--slices NLayer count. 15 to 20 reads chunky, 32 to 48 reads detailed
--order readingForces TOP, SIDE, FRONT, BACK instead of matching views by proportion
--roundCarves towers, balloons and pots round instead of square
--side-nose rightDeclares which way the side view faces
--colours NShared palette size across layers, 0 keeps every colour
--normals path.pngWrites a matching 3D normal map strip
--emissive path.pngAuto-detects emissive regions like headlights, windows and neon

The normal map output is the detail that separates this from a demo. With normals you can light the stack as a volume instead of flat sprites, and the viewer uses them for something specific: snow accumulation on upward-facing voxels, computed from the normal's Z component.

The viewer is a small engine

--html writes a standalone page, and the feature list there is longer than the skill's own description suggests.

Turntable mode is the obvious one. Slice scan and exploded view are for inspecting the carve. Scene mode adds procedural props with a unified Y-sort, which matters more than it looks if you want to place the sprite in a world with other objects. Play mode lets you drive with WASD across an infinite grid, with wind sway on vegetation and a shatter-and-rebuild animation.

Lighting runs a time of day from day to sunset to night, with a draggable sun and projected shadows. Weather adds rain with ground ripples and upside-down wet reflections, and snow that accumulates using the normal maps.

The performance claim is specific enough to check: a vectorised NumPy carve, a zero-allocation typed-array software rasteriser, and sprite caching keyed on angle and lighting, at roughly 0.2 to 1.5 milliseconds per frame in Chrome. That is fast enough that the viewer feels like a toy rather than a viewer.

Export is a 16-direction baked PNG sprite sheet, which is the format every 2D game engine actually consumes.

The agent part

The prompt examples are the reason this exists as a skill.

Make a rotatable pixel art car.
Sprite stack this 4-view sheet and give me a turntable.
Add a fake 3D pixel art tree to my Godot game.

If you have no image generator handy, the README offers something better: the agent draws the four views itself in a short Python script. That closes the loop. The model does not need to be good at pixel art in the way a diffusion model is; it needs to produce four consistent orthographic views on a grid, and a script can be corrected far more precisely than a generation can be re-rolled.

The four views still have to agree with each other. If the front view is 20 pixels wide and the side view implies 24, the carve will lose the difference silently, and the rotation will show a shape that matches neither drawing. This is where a human eye is still needed, and where an agent that cannot see its own output will confidently ship a lopsided car.

Slice count is an art direction decision

The layer count is the only parameter most users will touch, and it is not a quality setting.

At 15 to 20 slices, the stack reads chunky. Edges get a visible step per layer, which suits low-resolution art and hides mistakes in the carve. At 32 to 48, the step shrinks and the shape reads smoothly, which looks better and exposes exactly where the four views disagreed.

That trade-off is worth stating plainly because it inverts the usual expectation. More slices are more accurate, and accuracy is not always what you want. A 48-slice car built from four rough drawings will show every inconsistency as a wobble in the rotation, while a 16-slice version of the same input looks deliberate.

The palette flag has a similar character. --colours N forces a shared palette across all layers, which keeps the stack from shimmering as colours shift between slices. Setting it to 0 preserves every original colour, which is correct if the source art was drawn with a deliberate ramp and catastrophic if it was not.

The prior art paragraph

The last section of the README says sprite stacking is a long-standing indie technique, not invented here, and that the skill adds the four-view carving and the agent workflow.

That single paragraph does more for my confidence in the repository than the feature list. The technique has a lineage: developers have been faking rotation with stacked slices for years, and the honest version of a tool built on that lineage says so. It also tells you where to look when the tool fails. If the carve produces something odd, the problem is probably in the input views, because the maths has a decade of prior use behind it.

The novelty, such as it is, sits in the interface. Four orthographic views are something an image model can produce on request, and a Python script can be corrected in a way a generation cannot. The old technique got a new front door, and the front door is the part that lets an agent walk in.

Who this is for

If you make small games, game jams, or anything with a 2.5D look, the pipeline is genuinely useful. Four drawings and a command get you a rotating asset, and the layer count gives you a dial between chunky and detailed that matches the aesthetic instead of fighting it.

If you make photoreal assets, this is not your tool. The carve is orthographic by construction, and perspective input will produce a blocky mess.

The reason I like the repository is the tone. It states that the technique is older than the tool. It ships a test that prints ok. It exposes normal maps because someone wanted snow. That is what a craft tool looks like when it is made by someone who has actually placed a sprite in a scene at 2am, and the agent wrapper is just the newest part of a long tradition.

Turn ideas into images with ChatPicture

60 free credits every day. Generate, edit, and download — no prompt engineering degree required.

Related articles