Skip to content

ritmo-tools pixel bake: the look is the model's too - #225

Merged
SandroMaglione merged 5 commits into
mainfrom
tools/bake-look-yours
Nov 11, 2026
Merged

SandroMaglione merged 5 commits into
mainfrom
tools/bake-look-yours

Conversation

@SandroMaglione

Copy link
Copy Markdown
Member

Two agents given a written brief tried pixel bake, judged its shading worse than their own, and each wrote a projection script to choose the look themselves. The maintainer liked both results. So bake keeps the geometry and leaves those choices to the model.

New fields

  • steps on a part: a ramp step per facing (top, left, right), used instead of the light.
  • line on a part: a line where the part meets a part behind it, drawn on that part. It can be true (the outline's color), "step" (one step darker), or a color.
  • rows on a face: a picture drawn flat, laid on the face, and turning with the model. Doors, windows, dials.
  • "map": true: writes <name>.map.json, with each pixel's part, face, facing, depth, and place on its face, so a script can restyle the art instead of rebuilding a renderer.
  • camera.across / camera.down: the camera in a game's own terms. The sun stays in the picture's axes, so these draw exactly what the matching turned camera draws (tested pixel for pixel).

Fix: the outline broke at a sharp tip, such as a roof's eave. The lone-pixel cleanup was removing outline pixels that touch the rest of the outline only at a corner. Those are now kept, and joined through the empty corner.

The skill's bake bullet says the look is the agent's too, and PIXEL-ART.md records why. The changesets are a minor for tools and a patch for core's skill.

Tested with an agent. The same Landkeep brief went to a fresh Opus 5.5 High agent with this build and the updated skill:

  • It baked all five pieces with steps, line, rows, and across/down, and wrote no renderer of its own. Run 1, before this change, wrote a 195-line one.
  • It took 23 minutes, and pixel lint is clean on all five.
  • Its remaining wishes, not in this PR:
    • a tight frame option;
    • staging a piece on a tile;
    • palette letters in rows without declaring them as materials;
    • a gable roof whose end walls take the wall material;
    • a warning when a face is seen edge-on.

Verify:

  • pnpm run check: typecheck, lint, type tests and examples pass. Some tests timed out under a machine load of 100+. Rerun at normal load, packages/tools and every file that had failed pass: 452 of 452.
  • packages/tools/test/bake.test.ts has 10 new tests: parsing, steps per facing, lines, face rows, . in rows, the map, axes against the turned camera, the outline at a tip, and the map file in the CLI.

🤖 Generated with Claude Code

SandroMaglione and others added 5 commits November 11, 2026 15:30
Two agents given a written brief tried bake, found its shading worse than
their own, and each wrote a projection script to choose tones per face,
lines between parts, and details drawn flat on faces. The maintainer liked
both results. So bake keeps the geometry and leaves those choices open:

- `steps` per facing (top, left, right) in place of the light
- `line` on a part: where it meets a part behind it, on that part
- `rows` on a face: a flat picture laid on it, turning with the model
- `"map": true` writes `<name>.map.json`, each pixel's part, face,
  facing, depth, and place on its face, for a script to restyle
- the camera as `across` and `down`, in a game's own terms; the sun keeps
  the picture's axes, so it draws as the matching turned camera does

The outline no longer breaks at a sharp tip: the lone-pixel cleanup
removed outline pixels that met the rest only at a corner. They are now
kept and joined through the empty corner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README's across/down example was Landkeep's camera, which the test
agent then copied: generic 2:1 and three-quarter views instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the rerun: baked pieces won where the feature is flat and angular,
and lost where it is curved or small.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SandroMaglione
SandroMaglione merged commit d3f2759 into main Nov 11, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant