# Lane D — progress log

## 2026-07-16 — Round 1: pipeline online, first texture pack, audio proof

Shipped all four round-1 items. **$0.00 spent** — everything generated locally on the m3ultra
box; no fal.ai candidates arose, so `FAL_LIST.md` still doesn't exist.

**1. Scripts ported from PROCITY** (`--dry-run` first, idempotent, resumable):
`gen_textures.py` (flux_local backend, provenance JSON), `derive_maps.py` (tiling + Sobel
normals + WebP), `build_manifest.py`, `validate_manifest.py` (qa gate 5, stdlib-only so it runs
on any box — hand-parses the WebP header rather than needing PIL), `gen_audio.py`.
Plus `shot_sink.py`, a small addition of my own: `DBG.shot()`'s `<a download>` lands as
unnamed half-written temp blobs in this browser pane, and naming evidence by guessing at file
sizes isn't evidence — so the page POSTs frames and they land correctly named.

**2. First texture pack** — 6 walls (2 each: esophagus / stomach / small intestine) + normals
+ 1 wet-tissue matcap. 9.0–9.6 s per 1024² image, ~64 s for the pack. 1.7 MB shipped.
- Every raw FLUX image had a hard wrap seam (seam_error 3.7–17.9) despite the prompt asking for
  "seamless tiling texture". A 4-way cosine partition-of-unity blend of the four half-rolls
  fixes it *exactly* (weights sum to 1, are N-periodic, and each copy's seam sits where its own
  weight is 0) → **0.87–1.32**, i.e. the seam is now indistinguishable from interior detail.
- Levels-normalised the pack to a common exposure: FLUX gave each prompt its own brightness
  (means 0.18–0.32), which under a multiplied biome tint reads as a broken tint, not dark tissue.
- Prompt-kit experiment **rejected**: adding PROCITY's "uniform coverage / edge to edge" clause
  to the ART_BIBLE stem cured the centred-subject failures but flattened the whole pack and
  collapsed three biomes into the same honeycomb. Reverted; framing words now live only in the
  two subject prompts that needed them. Recorded in `gen_textures.py` so it isn't re-tried.

**3. `js/core/assets.js`** — manifest loader per the TECH contract: null-on-miss, never throws,
`?localassets=0` empty boot, `depot:` resolution, dual-format audio probing. Added a **miss
ledger** after Lane A identified the silent-forever-fallback failure mode: each distinct miss
logs once and `assets.misses()` lists them.

**4. Audio proof** — `bed-esophagus` (24.000 s, loop seam **0.32** = inaudible) + 4 sfx
(pellet, hit-squelch, boost, pickup). Whole pack renders in **4.2 s**. 0.61/10 MB budget,
ogg+m4a dual-shipped, verified with ffprobe.
- First spectrogram sheet was a saturated cream rectangle (fixed `(db+60)/70` normalisation) —
  evidence you can't read is not evidence. Rewrote against each clip's own peak over 80 dB with
  a log frequency axis and Hz gridlines.
- Caught by looking at it: the bed had strong energy to 16 kHz — my `lp1` is one-pole (6 dB/oct),
  so a 900 Hz lowpass left 16 kHz only ~25 dB down. That's hiss, not a wet gut. Added cascaded
  poles; the bed is now properly muffled below ~1 kHz.

**Eyeballed in engine** (`web/dev/laneD_texview.html`, a dev harness that imports the stub world
read-only): all 6 walls under their own ART_BIBLE biome tints + the `?localassets=0` fallback →
`docs/shots/laneD/round1_*.png`.
- **The find of the round:** normal maps were rendering the tube near-black. I'd added the
  tangent-space sample to the view-space normal, which tilts every normal at the camera and
  kills the fresnel rim — and the rim is the biome's only real light. Rebuilt the TBN per-pixel
  from screen derivatives; the rim now traces every fold edge and the walls finally look like
  the ART_BIBLE's "SEM tissue + artificial rim light". Handed the working code to Lane A in
  NOTES, since they'd scheduled TBN work for round 2.

QA green. Committed only Lane D paths.

**Next round:** slug rename to biome ids (with A deleting their map — F to sequence), hero
meshes (ENDO-1 + C's three enemies), colon/mouth walls, full audio pack, port `normalize.py` +
`glb_stat.py` so the house GLB law is actually enforced.
