MysteryForgeby Insurrection Studios

Real-art pipeline: what we learned from The Keeper of Marrow Light

October 2026. The first real-provider run of roadmap 6.11, on samples/marrow_light (5 places, 3 characters, 6 items, 2 puzzles). All images by OpenAI gpt-image-2.5-flare / -sunburst at quality: high; no Blockade key; Skybox was ruled out as too expensive for one-offs. Numbers are measured, not estimated.

The headline#

It works, it's cheap, and the pictures are good enough to ship. Eighteen finished pictures (4 rooms, a quay, a chart, 3 portraits + an expression, 6 item icons, 2 state variants) cost $1.87 in total for all 35 images generated, including every redo. The game went from coloured blocks to a painted world in about 25 minutes of wall-clock time, most of it spent looking at candidates. What it still can't do alone is place things: hotspots had to be calibrated by eye against each picture.

Cost and time (measured)#

Price per image $0.054 on average — whatever the size. A 2560×1440 room cost the same as a 1024² icon (~1,800 output tokens either way); a 1536×1024 chart was cheapest ($0.042). Cost follows tokens, not pixels.
Whole demo 22 calls, 35 images, $1.87. About $0.36 of it went on four deliberate redos (the shut stair door, the quay vista, the chart, the open chest); the second candidate of every n: 2 shot was unused, which is the price of choosing
Latency ~20–24 s for one 1024² image; ~31–35 s for two 2560×1440 rooms in one call. Roughly 20 s fixed + a little per image, so ask for 2 candidates in one call.
Whole batch 15 shots ran in ~7 minutes, sequentially
Extrapolation a 10–15 hour flagship (~1,000 pictures, each ~3 candidates) ≈ $150–200 in image fees. Art direction and review time dominate, not the bill.

Estimates before a run are a flat per_image price, which over-estimates (we budgeted $0.18; reality was $0.054). Set pricing.openai.*_per_million and every call reports its real cost from the billed tokens (done).

Quality: what the models are good at#

  • Style cohesion is excellent with a specific style paragraph in the bible. Rooms generated in separate calls with no reference images read as one painted world. We never needed reference chaining for rooms.
  • Layout follows the prompt. Listing objects left-to-right ("a door; a window; a chest in the middle; a desk; a bed on the right") put them there, in all four rooms, on the first try. This makes the prompt the right place to plan clickable layout — see Ideas.
  • State can be steered in words. "The door is firmly shut and bolted" turned a door that had drifted open into a locked one. A first draft that contradicted the story cost $0.11 to fix.
  • Characters are consistent from a one-line bible description (Mrs. Pell in the lobby painting and her portrait are recognisably the same woman), and an expression made from the portrait as a reference kept the same face and coat (angry Tom is Tom).
  • Transparent portraits and icons work (background: transparent): 64% of a 1024² icon is true alpha, soft edges.
  • Masked edits work, with care. The lit lantern (a glowing Fresnel lens with rays) and the opened sea chest (key and lens inside) are the best frames in the game. Two lessons: (1) the model re-paints the masked object — the chest came back brown instead of the original teal until the prompt said "keeps EXACTLY its original look… do not change the colour"; (2) glows and rays end in a visible box at the mask edge unless the mask includes their whole extent and the patch fades out (now a smooth-stepped feather scaled to the patch).
  • No stray lettering. "No text" held in every picture; signs and charts came out as texture, which is what we want.

What it can't do (yet)#

  • True 360° panoramas. OpenAI's models paint a convincing wide vista, not an equirectangular wrap; asked for a full circle they ignore the wrap and the left/right edges don't match. We use the result honestly as a 110° partial panorama (h_span: 110), which the engine already supports. A real wrap-around needs another route (Skybox was ruled out on price): see Ideas.
  • Hotspots. Rects have to be measured against each picture (26 hotspots, one pass from outlined screenshots — accurate first time, but manual). The pipeline gives no object positions.
  • Resolution ceiling. 2560×1440 is the largest non-experimental size; a panorama at that width gives ~23 px/degree (fine at 90° FOV on a 1080p screen, soft if zoomed).
  • Mouth shapes / lip-sync frames — not attempted; the talk_frames shot kind is still to do.

Bugs the real run found (all fixed, with tests)#

Found by Problem Fix
first real call tools/art.gd started its HTTP request before the scene tree existed — no networked call from the CLI ever worked (the mock-provider tests never touched HTTP from the CLI) await process_frame; the test suite now runs the CLI against the mock server
reviewing the quay panorama was shrunk to 1920 px wide and seam-"repaired" although it never wrapped keep the provider's resolution; h_span < 360 skips seam repair and sets the scene's span
reviewing the chart a background shot cover-crops to 16:9 — the puzzle picture lost its top and bottom new image kind: delivered exactly as made
planning variants the base picture is now a WebP but was uploaded as image/png; size: auto may pick another aspect upload real PNG bytes; run edits at an explicit multiple-of-16 working size
in-game check partial panorama zoomed out past its vertical extent: black bars engine clamps FOV to what the picture covers (MFPano.max_fov)
in-game check jigsaw board was ~270 px wide: a painted chart as a postage stamp board scales to fill a comfortable part of the screen
export measure Godot re-encodes imported pictures losslessly: a 0.6 MB room shipped as 2.6 MB delivering lossy art also sets lossy texture import defaults
disk each candidate keeps a ~6 MB raw PNG: 200 MB for 35 images tools/art.gd prune (the cache is gitignored)
accept accepting a variant left its stand-in SVG behind variants retire their placeholder
tooling make studio-marrow pointed at the demo (wrong flag form) --mf-project=PATH

Also hardened, though not hit this run: retries for 429 / 5xx / connection errors; real cost from billed tokens.

Size and speed (measured)#

Delivered pictures rooms ~0.6 MB each as WebP q0.9 (the same PNGs are ~3.4 MB); panorama 0.9 MB; portraits ~0.4 MB; icons ~0.1 MB
Exported data pack 23.9 MB → 8.9 MB with lossy texture import (of which ~4 MB is placeholder voice audio)
Load time ~30 ms per 1080p background, 45 ms for the 2560×1280 vista, 206 ms for all nine kinds of picture
Memory ~8 MB per background and ~12.5 MB for the vista as uncompressed RGBA (53 MB for the set)

The second run: The Missing Swan of Pennyfold (November 2026)#

Seven rooms, six items, eight portraits — 21 pictures, in one go, from the shot list the planner wrote for a game that had never had any art. Same models as above (gpt-image-2.5-flare, high quality).

Cost $2.19 for the first 20 shots (2 candidates each; $0.107–0.115 a shot — a room, an icon or a portrait cost the same), $0.11 for two trials of the square, $0.69 for repainting six rooms once the first set showed what the prompts had left out. About $3.00 for the lot, 52 images, against a flat-price estimate of $7.56 (the bible's per_image is a ceiling: the billed tokens are what count).
Time ~20–30 s a call, sequential: the first 20 shots took about nine minutes, most of a run spent choosing between candidates, not waiting.
Choosing Contact sheets (every candidate of a kind side by side in one picture) made 42 candidates a four-picture job; the pictures were good enough that the choice was mostly does it match the story and the layout, not is it any good.

What worked. The layout sentence the planner writes from the hotspots (v0.54) put the bank at the far left, the poster low in the middle, the tower in the centre and the café on the right on the first try, and the model read "Pennyfold Savings Bank" onto the bank's fascia on its own. One bible paragraph and a palette held seven rooms and eight faces together; the transparent portraits and icons were clean.

What it got wrong, and what changed (each is in the planner or the bible now):

  1. It painted the interface. The prompt said "the game's interface covers the top-right corner, the lower-left corner and a strip along the bottom, so keep nothing important there" — and the first room came back with a navy frame drawn into those places. The sentence now says to paint ordinary scenery to every edge, no frame, border or bar, and the bible's negative list says so too.
  2. Doors that open later had no picture. The planner described only hotspots that are always visible, so the office door, the vault door, Pike himself, the Swan's case and the crate — all visible_if variants of a thing that exists in some state of the game — were left out of the prompt and out of the painting. A player had nowhere to click. The layout sentence now includes a door that opens later and a thing that changes (one label, several hotspots), described as the door it is; something that turns up once, later (a clue) is still left out.
  3. A shot's prompt is the art director's. The first vault came back with the Swan on its plinth — the story's point is that she has been stolen. The planner only knows labels, so the prompt was edited by hand ("an EMPTY glass display case… because the silver swan has been stolen") and the room regenerated: story state that a hotspot label cannot carry is written into the shot's prompt.
  4. Vision calibration is a first pass, not an answer. The model's boxes (calibrate --apply, a few cents a room) moved most hotspots onto the right area of the right object and left others plainly off — the founders' plaque, a poster, a bell; boxes for things behind a state variant it could not see ("not found") stayed where they were. Each box was then set by eye from a screenshot with --mf-hotspots, which took far less time than it sounds.

Pipeline housekeeping the run found: game/art/shots.json is both the shot list and the record of which cached candidates each shot produced (key, candidates, accepted) — commit it, or accept says "has no candidate" (re-running a shot whose candidates are still in game/art/.cache costs nothing: it answers cached: true and re-records the key). A shot's target extension decides the delivered format (.webp for backgrounds, as the bible's delivery says; a plan that wrote .png delivered 3 MB PNGs where WebP is 0.4–0.65 MB). And a sample that is rebuilt from its story needs --keep-art (samples/gen/art_layer.mjs) or the rebuild puts the placeholders back.

Ideas worth building next#

  1. Layout-aware prompts. The planner already knows every hotspot's label; once hotspots exist (or are sketched as boxes), turn their rects into "a door at far left, a clock in the left third…" so the picture comes out matching the layout — the inverse of today's calibrate-after step.
  2. Vision-assisted calibration — built (engine v0.55.0, SPEC "Hotspot calibration"): a vision model returns each labelled object's box in the accepted picture, the hotspots that sit elsewhere are listed, and the author moves the ones they choose (Studio, CLI calibrate, MCP art_calibrate). Tested offline only; the first real call is a human task (docs/HUMAN_TASKS.md) — expect small or half-hidden objects to need a look.
  3. True panoramas without Skybox (it's too expensive for one-offs — user decision): stitch six OpenAI views chained by reference into an equirect with our own tool, try a local open model with a panorama LoRA, or pair a wide vista with an estimated depth map for parallax; plus an equirect seam/pole checker for whatever comes back.
  4. Spend ledger across sessions (provenance already records each accepted picture's cost).
  5. Variant preflight: show the mask over the base and warn when a mask clips a glow or a tall object (the open chest lid rose above the first mask).

This page as Markdown: /docs/ai-art.md · Engine 0.101.0