跳到正文
CuteGuy☣️· 来源· @cutetoxicguy · X·· 2 小时前AI 评分72
正文 · 原文

A developer built a free AI agent skill that turns four pixel-art images into a rotatable 3D-looking object. No Blender or 3D modeling required. 🎮

It's called sprite-stacking, created by @dwhitedesign (Daniel White).

Instead of generating a conventional 3D mesh, the tool reconstructs an object's volume from four orthographic pixel-art views and converts it into stacked 2D slices.

The result looks like a tiny 3D object you can rotate while preserving the visual style of retro pixel-art games.

🧠 How does it work?

The process has four stages:

▪️ Views: Create top, side, front, and back images of an object.

▪️ Carving: Build a voxel-like volume, keeping only regions consistent with all four silhouettes.

▪️ Slicing: Cut that volume into horizontal layers, typically 15–48 slices.

▪️ Rendering: Rotate the slices together and offset them vertically to create the illusion of depth.

The agent can even draw the source views using Python if you don't have an image generator.

🎨 More than a rotating sprite

The project includes a standalone HTML viewer with several interactive modes:

▪️ Turntable: Rotate the reconstructed object.

▪️ Living Diorama: Arrange multiple objects into a scene.

▪️ Exploded View: Inspect the individual slices.

▪️ Play Mode: Drive vehicles around a procedurally generated environment.

▪️ Weather and lighting: Add rain, snow, changing sunlight, shadows, and reflections.

▪️ Sprite export: Generate 16-direction PNG sprite sheets.

It can also produce normal-map slices and emissive masks for more advanced lighting effects.

🤖 Works with coding agents

Supported assistants include Claude Code, Codex, Cursor, Gemini CLI, OpenCode, and Pi.

Installation:

npx skills add danielwh2/sprite-stacking

Then ask something like:

Create a rotatable pixel-art delivery truck and give me a sprite sheet for my game.

The tool uses Python, NumPy, and Pillow for geometry processing, with a lightweight browser renderer for previews.

⚠️ Important distinction

Sprite stacking isn't a new invention, and the result isn't a conventional 3D mesh.

The tool automates an established game-development technique. Internal geometry and details hidden from the reference silhouettes cannot be recovered reliably.

Why this matters

For indie developers, manually drawing every viewing angle can take considerable time.

Sprite stacking offers a different approach: create a few consistent reference images, reconstruct the volume, and generate additional angles automatically.

Free and MIT-licensed.

🔗 https://github.com/danielwh2/sprite-stacking

#GameDev #PixelArt #ClaudeCode #OpenSource

来源:CuteGuy☣️ · x.com