guts/docs/progress/d-progress.md
jing efea7d98f3 [lane D] Round 1: first texture pack + audio proof, exact-tiling pipeline
Textures (6 walls + normals + wet matcap, $0, ~64s on the m3ultra MPS):
- FLUX ignores "seamless tiling" (seam_error 3.7-17.9); a 4-way cosine
  partition-of-unity blend of the four half-rolls fixes it exactly -> 0.87-1.32
- levels-normalised the pack to one exposure (means were 0.18-0.32); these are
  detail maps multiplied into a biome tint, so per-prompt exposure read as a
  broken tint rather than as dark tissue
- prompt-kit experiment rejected + recorded: PROCITY's "uniform coverage" clause
  in the STEM cured centred subjects but flattened the pack; framing words now
  live only in the two subject prompts that needed them

Audio (1 bed + 4 sfx, 4.2s render, 0.61/10MB, ogg+m4a dual-ship):
- bed-esophagus 24.000s, loop seam 0.32 (wrap step 3x smaller than inner step)
- cascaded lowpass poles: one-pole at 900Hz left 16kHz only ~25dB down = hiss
- rewrote the spectrogram sheet (per-clip peak, log freq) — the first one was a
  saturated rectangle, and evidence you can't read is not evidence

assets.js: miss ledger + misses() — Lane A found that a drifted slug falls back
procedurally forever with no error. Each distinct miss now announces itself.

Also: shot_sink.py (canvas -> docs/shots/laneD, correctly named) and a dev
texture viewer that imports the stub world read-only for the eyeball law.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 14:17:17 +10:00

59 lines
4.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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.09.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.717.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.871.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.180.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.