Sprites in, rigged models out.

An experiment that turns eight drawn directions into a 3D character a game engine imports: a body and its items as separate meshes on one skeleton, with stock animations. Research, not a command yet.

3D characters guide
Three 3D models: a stocky knight from small sprites, a bare adult figure, and a tall armoured knight seen from the front and the back

Research you can turn in your hand.

Everything on this page came out of the scripts in the repository's research folder. None of it is a PixelKiln command yet. The models are real files a game engine imports, the numbers are measured, and the research notes record every step, including the ones that failed.

A character in parts, on one skeleton.

The body and each thing it wears are separate meshes in one .glb, so a game can dress the same body differently. Take items off, pick a motion, switch the skeleton on. The file is the one the download link gives you: it opens in Godot with its bones, its animations and the list of which skin each item hides. The second body wears the very same items, reshaped for him.

.glbDownload this model, with its skeleton and walk.

Model
Show

Drag to turn it. The body and each thing it wears are separate meshes on one skeleton, in one file. The generator drew the bare figure at 256 pixels in eight directions, then the same figure wearing each item. An image model redrew every one of those large, and both the shapes and the paint come from the redraws. Each item is cut out of the mesh of the figure wearing it, moved to just above the skin, and follows the body's bones. The skin under an item is hidden while the item is worn. Every part was then thinned to a fifth of its triangles, with its paint and relief baked back on. The motions other than the first walk come from a free animation library made for a different skeleton, carried over bone by bone. The sword is a separate mesh too, made from eight sprites of a sword and placed in the right hand, whose thumb and fingers have bones and close round the grip. The shield, made the same way, is strapped across the left forearm. Pick the shield block or the shield bash to see it used. Switch the pixel look on to see it as pixel art.

Two ways in, and what each costs.

The same pipeline runs from small sprites or from large ones. Small is not wrong: it is cheaper, lighter, and reads as pixel art. It has known limits, and they are listed here so you can choose. Both models above are in the viewer.

The same knight twice from four directions. Above, made from 64 pixel sprites: stocky, with soft blocky colours. Below, made from 256 pixel sprites: an adult build with plates, trim and a visor painted in.
Above, from 64 pixel sprites. Below, from 256 pixel sprites. Same items, same skeleton, same motions.
Pixel pathPainted path
Sprites64 pixels, a body and one layer per item256 pixels, a body and the body wearing each item
GenerationsAbout 53: 2 for the body, 10 a layer, under 1 for jointsAbout 110: 9 for the body, up to 25 a worn version, under 1 for joints
Before meshingThe sprites, enlarged smoothlyEach sprite redrawn at 1024 pixels by an image model on your own GPU
GPU timeAbout 45 minutes for a body and four itemsAbout two hours
BuildAbout four heads tall. A 64 pixel face needs a quarter of the heightAbout seven heads tall
SurfaceThe sprite's colours, soft up close, meant for the pixel lookPlates, trim, faces and cloth painted in; reads without the pixel look
The file here9,300 triangles, 1.0 MB16,500 triangles, 2.3 MB
Known limitsStocky proportions; thin items can come out ragged; detail tops out at what 64 pixels holdRedrawn directions do not agree on every detail; colours can drift from the sprite; twice the cost

How a sprite becomes a model.

Eight steps, each a script that reads files and writes files. The first costs generations. The rest run on a machine with a 12 GB graphics card and cost time.

  1. 1DrawThe generator draws a bare figure in eight directions, then the same figure wearing each item.
  2. 2MeshA multi-view model builds a shape from the front, left, back and right pictures, once for the body and once for the body wearing each item.
  3. 3PaintA second model paints each mesh, one direction at a time with that direction's picture as its reference, plus views from above and below.
  4. 4CutEach item is cut out of the mesh of the figure wearing it, so it fits the body it was made on.
  5. 5ThinEvery part drops to a fifth of its triangles, with its paint and relief baked back on.
  6. 6RigTwenty-one bones under standard humanoid names go in from the same 18 joints PixelKiln estimates for sprites, found in each direction and combined. Items follow the bones under them, and skin under an item is hidden. Where the mesh has a thumb apart from the fingers, each hand gets a thumb and one chain for the fingers, so it can close round a grip.
  7. 7AnimateMotions from a free humanoid library are carried over bone by bone.
  8. 8SwingThe cape hangs from chains of bones, and a simulation swings them through every motion and stores the result.

Sixteen directions from eight.

Where this started. The generator draws eight directions; the eight between come from carving a rough 3D shape out of the drawn views, rendering it from the angles between, and having an image model redraw each render.

1 of 16 Facing south: drawn by the generator.

Character
Show

Drag the figure, or use the arrows. Every second direction was drawn by the generator. The ones between are new: the eight drawn views are carved into a 3D model, the model is rendered from the missing angle, and an image model redraws that rough render as a clean sprite. Raw model shows the render before the redraw.

More of PixelKiln.

Teach your agent PixelKiln.

The skill tells compatible agents when to plan, when to ask for a budget, when to restore existing work, when to stop for human review, and how to verify output.

Agent setupLibrary quickstart