Home › Use cases › Photo-to-sprite pipeline · Updated Nov 11, 2026
Under the Hood · AI Generation + Deterministic Python

How one photo becomes a deterministic game sprite.

Why raw image-model sprite sheets break inside game engines — and the exact six-stage Python post-processing pipeline PixelForge runs on every $5 portrait so all 32 frames share true alpha, symmetric profiles, and a locked foot baseline.

Make a sprite — $5Download free starter ZIP
No account · 96px + 48px + RPG Maker $character.png · 3 free retries + money-back QA guarantee
Input portrait photo→ 6 stagesFinished baseline-locked 4-direction walk sprite

Ask a raw image model for a sprite sheet and you get a picture of a sprite sheet: 1254×1254 dimensions that aren't divisible by 4, painted grey-and-white checkerboards instead of RGBA alpha, two side rows both facing right, and feet that jump 6 pixels between frames. PixelForge treats the model output as raw ore and runs six deterministic Python stages before sealing sprite-package.zip.

The 6 Deterministic Post-Processing Stages

Stage 1 · Grid mod-4 snapResizes odd provider squares (e.g. 1254→1252) via NEAREST before 4×4 slicing
Stage 2 · Edge BFS alphaStrips #FF00FF & neutral mat from cell edges only — preserves interior whites/grays
Stage 3 · Component filter8-connected component graph drops stray corner dust & stray pixels
Stage 4 · Left-row mirrorMirrors Row 2 (RIGHT) into Row 1 (LEFT) per cell so side profiles never face the same way
Stage 5 · Baseline lockUniform scale across all 16 cells; feet anchored at y=90 (96px) & y=45 (48px)
Stage 6 · Engine sidecarsSlices 32 frames, 8 strips, RPG Maker 144×192 $character.png, Phaser JSON Hash & v2 manifest

Inspect a Real Output Pack Yourself ($0)

You don't have to guess whether the geometry holds up in your engine. Download /samples/starter-pack.zip or inspect /samples/manifest.json directly — generated by the exact same packaging code that fulfills every $5 order.

processed/sprite-sheet-96 & 48.png384×384 (96px) & 192×192 (48px) RGBA 4×4 sheets
processed/frames_96/ & frames_48/32 loose PNG frames (16 per size), foldered by direction
processed/strips/ ×88 horizontal 1×4 direction strips
processed/rpgmaker/$character.png144×192 3×4 RPG Maker MV/MZ drop-in sheet
processed/phaser/atlas_96 & 48.jsonPhaser 3 / TexturePacker JSON Hash atlases
gifs/walk_*.gif ×4 + contact_sheet.jpg4 looping GIFs (135ms/frame) + visual QA sheet
manifest.json + AGENT.mdschema-v2 baselines, hitboxes, QA metrics & agent guide

Frequently asked questions

Why does PixelForge mirror the left-facing row from the right-facing row?

Image models frequently draw both side-profile rows facing right even under strict prompt constraints. Deterministically mirroring each cell of Row 2 (right) into Row 1 (left) guarantees 100% directional accuracy and symmetric stride silhouettes without requiring flipX hacks in your engine code.

How does PixelForge prevent holes in white shirts or silver glasses during background removal?

Instead of a naive global color replacement across the whole cell, PixelForge runs a breadth-first flood fill starting strictly from the four outer edges of each cell — stripping outside background mat while leaving interior highlights enclosed by the character's dark outline untouched.

Where do the character's feet land inside each 96×96 and 48×48 cell?

Every cell uses a uniform scale across the whole 16-frame set and anchors the bottom of the character's feet max(3, cell_size // 16) pixels above the bottom border: y = 90 in 96×96 cells and y = 45 in 48×48 cells.

What happens if the model produces an empty or corrupted frame?

validate_raw_sheet counts foreground pixels per cell before packaging and fails closed if any of the 16 frames is empty or malformed — triggering retries or a full money-back refund rather than shipping a broken sheet.

Put anyone into your game.

$5 · one photo · 4-direction walk pack (96px, 48px, RPG Maker & Phaser atlas) · 3 free retries · no subscription

Make a sprite — $5