reikhelm/reikhelm-web
Parley Hatch 018909b2cd fix(render): full-range per-frame depth normalization for FPV ControlNet
Diagnosis: every baked FPV depth map used only the upper-mid grays
(typ. 160–214, 0/68 frames reaching true black, only 35/68 reaching
near-white). A fixed 0..maxView=12 scale meant the nearest floor (~1
cell) never hit white and a wall 3 cells ahead never went past mid-gray,
so a small room collapsed into a low-contrast band. A depth ControlNet
trained on full-range MiDaS/depth-anything maps gets almost no structural
signal from that — the root cause of "controlnet barely followed / hit
and miss" renders.

Fix: two-pass raycast. Pass 1 records each column's wall distance and the
frame's true near/far. Pass 2 maps depth through a per-frame window so
near surfaces read white and the deepest visible recess reads black every
frame. The far plane tracks the deepest real surface but is clamped to a
minSpan floor so a shallow dead-end nook is NOT stretched into a fake
tunnel — its faced wall stays an honest mid-gray slab (no black recess
for the model to paint a phantom door into). gamma default 2.0→1.5 since
normalization now owns the range. nearPlane/minSpan exposed as opts.

Verified offline (headless bake, seed 7, 68 frames): median dynamic range
193→255; frames reaching true-white near surfaces 35/68→68/68; worst-frame
range 54→106. Visual before/after confirms open frames now frame a black
passage and closed frames a clean mid-gray wall.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 20:24:29 -06:00
..
depth.js feat(render): real-geometry depth export + first-person explorable atlas 2026-06-02 00:02:14 -06:00
explore-viewer.js feat(render): real-geometry depth export + first-person explorable atlas 2026-06-02 00:02:14 -06:00
explore.html feat(render): real-geometry depth export + first-person explorable atlas 2026-06-02 00:02:14 -06:00
explore.js feat(render): real-geometry depth export + first-person explorable atlas 2026-06-02 00:02:14 -06:00
fpv.js fix(render): full-range per-frame depth normalization for FPV ControlNet 2026-06-15 20:24:29 -06:00
index.html feat(wasm+web): live browser dungeon playground (WASM core + atmospheric renderer) 2026-05-31 00:07:24 -06:00
main.js fix(pipeline): kill dither speckle + atlas geometry lies (post-playtest) 2026-06-12 00:06:46 -06:00
render.js feat(render): real-geometry depth export + first-person explorable atlas 2026-06-02 00:02:14 -06:00
style.css feat(render): real-geometry depth export + first-person explorable atlas 2026-06-02 00:02:14 -06:00