GPU A/B on the worst-blown frame (r9_N crypt): at strength 0.85 the
ControlNet forced the bright near-ceiling depth into a blown-white band
(27.7% of pixels >245); at 0.70 the blowout vanishes (0.0%) and the
ceiling renders as natural dark vaulted stone, with geometry still
honored. Verified a closed wall (r0_N threshold) stays solid at 0.70 —
no phantom doors return — so one global strength suffices. Matches the
documented Z-Image 0.6-0.7 sweet spot now that rev-3 maps are
full-contrast (high strength was only needed to force weak old maps).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
First GPU pass on the rev-3 depth pipeline surfaced two issues; both fixed
and re-rendered clean:
1. Blown near-field highlights (regression from 018909b). Mapping the
nearest pixel to pure white (nearPlane=nearRaw) made the depth
ControlNet render overexposed near floors/ceilings at strength 0.85.
fpv.js: nearPlane=0 (anchor white at the camera; nearest real surface
≈gray 214, headroom intact) + minSpan 5→8. Re-bake confirms the blown
ceiling is gone while recesses still reach black and geometry holds.
2. Phantom doors on closed walls — a PROMPT problem, not the depth map
(present in old maps too). Opening NOUNS in the positive prompt summon
a passage onto solid stone: threshold's "gatehouse, portcullis,
entrance" painted a gate on a blank wall, and at cfg 1.0 the negative
can't cancel it. bake_atlas.py: THEME_BODY_CLOSED (full theme flavor,
zero opening nouns) for closed facings + opening-nouns negated on
closed facings only. r0_N (threshold) now renders clean ashlar wall.
("Bricked-up archway" backfires — "archway" alone re-summons the arch.)
Also: sweep_strength.py re-exec-under-venv guard (the venv python is a
symlink to the base interpreter, so the realpath check wrongly skipped
the hop and the montage died after every render); now env-sentinel
guarded. Findings in .dev/2026-06-15-diffusion-pipeline-reliability.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Parley's review: dither full of green spots, baked rooms don't match the
nav graph (doors painted on closed walls, real openings off-center).
Both root-caused:
- pixelate.py: the nearest-color LUT was spaced in LINEAR RGB, cramming
the whole shadow range into ~4 cells — dark picks were effectively
arbitrary (green/teal confetti in warm near-blacks). LUT is now
sRGB-spaced, diffusion error is gamut-clamped (no more blue blobs at
torch highlights), and a new --overshoot penalty forbids choosing a
color more saturated than the source. Green-dominant dark pixels on
the test frame: 5.2% -> 0.02%, while palette usage went UP (107 -> 135
colors). Recipe rev 2: append --overshoot 6.
- fpv.js: new directedVantage(env, region, dir) — per-(room,facing)
camera instead of one room-wide vantage. Open ahead: stand in a cell
whose straight-ahead ray escapes through the actual gap (the passage
you walk is centered, 2-7 cells deep). Closed ahead: stand ~2 cells
from the wall, deliberately OFF the room's axis — a symmetric stage
begs the model to paint a centered focal door; an off-axis dead-end
corner doesn't. Walls also render under their own fixed seed and an
emphatic sealed-masonry prompt clause (cfg 1.0 negatives are inert).
Validated on seed 7 room 1: the closed-N phantom door is gone; the open-S
passage is dead-center. Full campaign re-bake follows as its own commit.
Also: rest-overlay no longer sticks without a keyup, in-combat drink
message, feathered sprite mask, no monster packs on floor 1.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Render actual generated dungeons through the AI pipeline — both top-down and
first-person (Eye-of-the-Beholder style) — instead of synthetic test depth.
All renderer-side: derived from the envelope's tiles+regions+theme, the core
stores none of it.
- depth.js: top-down height-field depth exporter (walls raised, pools recessed,
pillars as bumps, subtle per-theme relief), calibrated to the proven room_depth
levels so one tall room can't crush every floor dark.
- fpv.js: first-person depth via a Wolfenstein-style grid raycaster (16:9),
reports straight-ahead distance for opening detection.
- explore.js: room->room nav graph derived from REAL tile openings (scan
boundary gaps, bin by cardinal, flood the corridor to the destination room) —
nav + open share one source of truth with the rendered passages.
- bake_atlas.py: bakes per-room x4-facing pixel-art frames; per-theme + per-facing
(wall vs passage) prompts, fixed diffusion seed for cross-frame style coherence,
per-run unique prefixes so re-bakes don't silently skip.
- explore.html + explore-viewer.js: WASD first-person dungeon explorer
(room-to-room movement, turning, minimap), integer-pixel fullscreen.
- serve.py: stdlib dev server — static web root + /out tree + POST /save, no-store.
- main.js/render.js/style.css: export hooks, the depth button, distanceToWall export.
- tools/README.md: Stage 0/1/2/3 docs; .dev/2026-06-01-fpv-prompts.md: prompt
research (cfg-1 negatives are inert; trigger words summon hands; empty-ruin
reframe; fixed seed = consistency).
Proven end-to-end on seed 7 (17 rooms). Outputs organized under git-ignored
tools/out/. Control strength: 0.80-0.85 top-down, 0.85 first-person.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>