
November 15, 202610 min read
The knight on the PixelKiln home page is seven separate assets, and its receipt lets you take any of them off.
Since November 17 the PixelKiln home page has shown a pixel-art knight walking beside a receipt. The receipt has seven lines. The body with four walks and underwear is 21 generations, plate greaves 15, dragon plate 15, a war cape 25, a shield 10, a runed greatsword 35 and a horned helm 25. That adds up to 146 generations and 224 hashed files, and each line carries the sha256 of its south-facing file from the example project’s lockfile. Every line except the body is a switch. Turn the cape off and the cape leaves the knight, and its 25 leave the total.
For anyone new here, PixelKiln is a manifest-driven pipeline for pixel art. You describe assets in a JSON manifest, pixelkiln plan prices them, pixelkiln gen makes them through providers like PixelLab, and a lockfile records a hash for every file it writes, so a rerun only pays for what changed.
That receipt is the point of this post. In November a PixelKiln character stopped being one asset. It is one bare body plus separate items, each made, priced and hashed on its own, so a new helm costs 25 generations and leaves the rest of the character alone. Eight releases built that between November 17 and November 27, 2026: 0.105.0, 0.105.1, 0.106.0, 0.121.0, 0.121.1, 0.148.1, 0.149.0 and 0.150.0. The other 55 tags in that stretch belong to other parts of this series.
This is part 5 of seven posts on what shipped in PixelKiln between 0.60.1 and 0.150.0. Part 4, The rest of PixelLab in PixelKiln: music, lip-sync and nine-slice panels, covered the generators PixelLab still had left, and part 6, on tiles that open in a game engine, follows on December 4.

Asking a model for the same character in armour does not work. It redraws the body a pixel here and a shade there. A layer asset, new in 0.105.0, paints its prompt onto the body’s own frames instead and keeps only what it added.
Every frame of every source asset goes onto one sheet. A mask marks where the provider may paint. Inside the mask, skin is keyed cyan with its shading kept, and the whole sheet goes to PixelLab’s /inpaint-v3 as one masked inpaint. Whatever comes back repainted and not cyan is the layer, cut into one transparent PNG per source frame. Because the model sees every pose at once, the outfit matches from frame to frame. The inpaint also returns every pixel outside the mask as it was sent. In the four live runs the guide counted, zero pixels outside the mask changed, so the poses cannot drift.


layer.region picks what may be repainted: body below the neck, head for hats and hair, or around for capes and things carried. Keying only inside the mask, another 0.105.0 change, lets each head keep its face. A robe that three runs had drawn from behind on a front-facing frame came back right in all 32 frames on the first run sent that way.
Layers need clean frames under them, so 0.105.0 also added animation.clean. An animation model leaves ghost pixels around a moving figure, and the cleaner judges each loop frame against the parent’s rotations. On the first test character’s walk it took 608 stray near-white pixels across 48 frames down to 2, at no cost, since it is post-processing. A fix in the same release stopped it erasing a far leg shaded in a colour the rotations never use. Remember that rule about strange colours. It comes back.

Inpainting a sword goes badly. In the guide’s field notes an inpainted sword changed hands in 2 of 6 south-walk frames, and an inpainted shield was drawn face-on in 5 of 6 east-walk frames. So a layer with attach skips the drawing. It takes a sprite you already have and pins it to the hand you name in every frame, the same pixels each time, at no generation cost.
The hand’s position comes from pixelkiln anchors, a new command that writes per-frame skeletons with one PixelLab estimate per new or changed frame, at 0.1 generation each. Measured on 56 frames, anchoring cost 5.6.
The rest went into making a pasted item look held. attach.grasp opens one inpaint on a small disc at each visible hand, so the provider draws a fist around a handle that is already there and every other pixel of the item comes back untouched. In the test that became grasp, a 7px disc closed the hand around the grip in all 20 frames. scale shrinks an item before it is placed, because an object generator fills its canvas and a shield came back wider than the figure holding it. grip: "center" holds an item by the middle of its opaque pixels, and layer.offset nudges any layer by whole pixels.
That explains two lines of the receipt. The shield and the greatsword were each 10 generations as objects. The shield is placed and stays at 10. The sword took a 25-generation grip pass and lands at 35.

derive gained hue-shift in 0.105.0. It turns hue within an optional window and keeps each pixel’s shading, and it works on a whole set, so one drawn layer becomes several colours of itself for nothing. A crimson cape turns blue and its grey fur collar stays grey, since grey has no hue to turn.

Skin tones work the same way. The bare base recoloured with hue-shift gives other skins, and every clothing layer sits over them unchanged. Gripped items carry the first skin’s fingers, so hue-shift also takes reference, which changes only colours the reference PNGs use.
Some frames come back wrong anyway. pixelkiln redraw <layer> --frame <name> puts the bad frame on a small sheet beside its neighbours, shown wearing the layer with their masks closed, and inpaints only the one left open. Through the CLI it billed 10 generations. The robe frame came back in the same purple and gold, facing the right way, with a hem a little shorter than its neighbours’. Good enough to replace a wrong frame. Not identical to a right one.
For engines, pack‘s generic atlas now lists paperdoll layers, with the frame each layer frame goes over and the offset to draw it at.
The first character builder on the site dressed one adult-proportioned base from thirteen layers, ten drawn and three placed, 32 frames each. A fantasy set followed in the same release: fifteen drawn layers and five held items, four of them gripped, plus four preset looks and a skin control with five recolours of the base. The fifteen drawn layers billed 285 generations in all, 15 each for the clothing, a head of hair and a cowl, and 25 each for a mohawk, the helm, a wizard hat, wings, a cape and a quiver. The manifest is examples/paperdoll.
Then the hero. It had been a mocked terminal, and 0.105.0 replaced it with the knight and its receipt, the seven switchable lines described at the top of this post.

0.106.0 put a turnaround viewer on the paperdoll page. PixelLab draws a character in eight directions, and the viewer turns the knight through sixteen. The eight in between come from a rough 3D model carved from the eight drawn views, rendered at the missing angles and redrawn by PixelLab’s edit_image. Eight new directions cost 10 generations. A switch shows the raw model before the redraw.
The redrawn views are clean but a little squat next to the drawn ones, and held items are left off because the carve removes a sword held at a different angle in every view.

Not every idea held. I added portrait.seed in 0.121.0 on November 19 to pin PixelLab’s seed for a character’s portrait. The lock also started keeping the seed the job reports, because PixelLab deletes a finished job 8 hours later.
The same day, 0.121.1 refused the field. In a live run of five 16px portraits of one knight sprite, the two without a seed drew the knight. The three with one drew the same generic blond face, and the same seed twice did not even repeat the bytes. A seed made PixelLab ignore the character and gave no repeatability back. The field now fails with that reason, and the lock still records the reported seed, labelled as not reusable.
Every number in the paperdoll guide was measured at 64px. On November 26 and 27 a 256px side-view humanoid, whose base wears black underwear, went through the same steps and broke things the small characters never had.
First, clean: true erased the base’s own briefs from 4 of 8 idle frames and left holes through the body. One of the three rules behind it was the 0.105.0 rule that kept a big strange-coloured run only when outline sealed it. In 0.148.1 dark reference pixels vouch for colours too, a big strange run is kept whether sealed or not, and fetch warns when cleaning takes more than 3% of a frame’s opaque pixels. The same release lets a mirrored layer go current once it is flipped again. Before, it stayed stale.
Second, layers came back half-dressed. Only skin was keyed, so the underwear went to PixelLab as clothing, and in 5 of 8 frames it drew the outfit around it. 0.149.0 adds layer.cover, which keys every opaque pixel inside the mask whatever its colour. The mask now finds the head per frame and puts the neck the sheet’s median distance below it. pixelkiln layer preview <layer> writes the sheet, keyed sheet and mask exactly as gen would send them, prints each frame’s neck row and the price, and runs offline for free.

Third, the sheet limit of 512px a side. At 256px only 8 frames fit per layer. plan priced four layers at 25 each, and then gen refused all four before sending a request. Nothing was billed, but the plan had called them ready. In 0.150.0 plan measures the files on disk the way gen builds its sheet, marks a layer that cannot fit as invalid at no price, and says how many frames would. A loop too long for one sheet splits across two layers, and the second names the first in layer.anchor, which puts a dressed frame of the first on its sheet as a guide.
Fourth, PixelLab anchors a garment and not the body, so a swaying loop leaves a strip of base 1 to 3px wide beside the clothes. layer.trim hides it at compose time. It removes bare runs up to 4px wide, then islands up to 45px. In the issue’s test the same rule removed about 10,000 fringe pixels across 40 frames. pack --flatten draws the layers onto the frames for games that swap whole sheets, and layer preview --gif writes each dressed loop as an animated GIF.
The receipt is the whole design. Each line is a file with a hash and a price, made without knowing about the others, and that is what lets a visitor switch the cape off and a game add a helm for 25 generations instead of a new character. The 256px run showed what the design took for granted, a small figure on a roomy sheet. Most of what shipped on November 27 moves those limits into plan, where they show up before the bill does.
If you have shipped layered sprites in a game, did your engine draw each layer over the body at run time, or did you flatten every outfit into its own sheet? pack does both now, and I’d like to know which one your engine wanted.
Discussion
Comments are powered by Disqus. Sign in once, comment anywhere.
