Add a repeatable screenshot capture and compare smoke
Both capture helpers now accept --out=res://docs/screenshots, and tools/check_screenshots.sh renders the staged set (using xvfb-run when headless) before running screen_designs.py compare. Record the judge result: 7 match, 4 review, 0 diff. Headless 226/226 and the smoke both pass in a clean worktree.
This commit is contained in:
1 parent
b39fee6176
commit
d96f53c285
6 files changed
+159
-171
No files matched your search
@@ -49,13 +49,26 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
|
||||
|
||||
## Handoff (read this first)
|
||||
|
||||
- **Visual-alignment pass planned (2026-11-01):** `TODO.md` gains a "Visual
|
||||
alignment with rendered mockups" section. Goal: restructure generated-image
|
||||
storage, move the reference mockups out of `docs/screens/designs/` into a
|
||||
runtime-accessible root (e.g. `assets/images/`), load the proposed UI/scene
|
||||
art at runtime (start menu, selection screens, HUD, panels), and make the game
|
||||
match the mockups — verified by `screen_designs.py compare` + `judge`. Not
|
||||
started; no code moved yet.
|
||||
- **Status + active passes (2026-11-01, moved from `TODO.md`):** v0.6.0 shipped — the Blender
|
||||
character/gear/prop library is integrated, AO maps are baked and wired, and the environment
|
||||
textures are lifted to 1024² with normal maps (see `DONE.md`). Headless **222/222**, Python
|
||||
**81**; the scheduled presentation pass is complete. Two passes remain in `TODO.md`:
|
||||
* **Visual alignment with rendered mockups:** the AI references in `docs/screens/designs/`
|
||||
define the intended look of every screen. The pass reorganizes generated-image storage,
|
||||
loads the proposed UI/scene art at runtime (`src/game/ui/art.gd`, `assets/images/`), and
|
||||
aligns the selection screens, HUD, and scene visuals with those mockups — verified with
|
||||
`screen_designs.py compare` + `judge`.
|
||||
* **Realism pass** (plan: `PLAN.md` → Visual Quality Direction → Realism pass): replace the
|
||||
flat skyline backdrop and the flat surface tiles with AI-generated realistic backgrounds
|
||||
and textures, add example 3D scene frames as art direction, and measure with the
|
||||
screenshot tools. Rule: never overwrite an existing image — new outputs get new paths
|
||||
(`next_free_path` -vN suffix). Raw → `assets/textures/ai/v2/raw/` (gitignored); candidates
|
||||
→ `assets/textures/ai/game_ready/v2/` (gitignored pool, only validated picks tracked,
|
||||
ADR-0014); scene refs → `docs/screens/concepts/`; trials → `docs/screens/realism/<run>/`.
|
||||
Realism report 2026-11-01-v2 mean judge scores: backdrop 2.6 → 3.6 (v2 day + night
|
||||
skyline) → **4.0** (v2 day + dusk skyline for the Evening phase); texture detail 1.2 →
|
||||
1.6–1.75; overall 1.6 → 2.0. Scores swing ±1–2 between runs (trend only); the
|
||||
`characters` score moved 3.0 → 1.0 with identical NPCs, showing the noise.
|
||||
|
||||
- **Phase 2 — AI texturing (this agent, DONE 2026-11-01).** Phase 1 assets were
|
||||
already in the tree (untracked) and are preserved. Generated six seamless AI
|
||||
@@ -138,22 +151,36 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
|
||||
flat plane, so avoidance (not a baked mesh) routes guests around props. Placements live in
|
||||
`PROP_PLACEMENTS` with `placement_problems()` validation; variants come from `variant_for(index)`.
|
||||
`smoke_props.gd` must be windowed because the guard reads captured-mouse input.
|
||||
- **Realism pass tooling (2026-11-01):** `tools/scene_concepts.py` (`list`/`generate`/`process`/
|
||||
`audit`/`realism`) never overwrites an image (`next_free_path` adds `-vN`; `process` skips
|
||||
existing targets). Raw AI output: `assets/textures/ai/v2/raw/` (gitignored). Candidate pool:
|
||||
`assets/textures/ai/game_ready/v2/` (gitignored except the validated picks un-ignored in
|
||||
`.gitignore`: skyline day-v4/dusk-v3/night-v4 plus brick/pavers/asphalt/asphalt_wet + normals).
|
||||
Concepts: `docs/screens/concepts/` (committed, `.gdignore`, targets in its README). Runs:
|
||||
`docs/screens/realism/<run>/` (PNG captures gitignored; `report*.{json,md}` + `sheet.jpg`
|
||||
committed). `src/test/capture_realism.gd` swaps textures at runtime by the material's
|
||||
*original* albedo path (`--swap/--night-swap/--tint/--normal=OLD=NEW`) and writes to
|
||||
`--out=res://...`. Changing game code is not needed for an A/B test. Gotchas:
|
||||
gpt-5-image-mini honours `background=transparent` for the 3:2 skyline requests, but it writes
|
||||
garbled "HOLLYWOOD" lettering unless the prompt forbids signs. Skyline strips are 2:1 to match
|
||||
one UV repeat of the ring. `elapsed_s = 620` gives the *Evening* phase (pink sky), not night.
|
||||
The gemini-flash-lite realism scores are noisy (±1–2), and the judge sometimes returns a 400
|
||||
"API key not valid" from the provider, which the one retry covers. None of the v2 assets are
|
||||
wired into the game yet.
|
||||
- **Realism pass (2026-11-01, completed + adopted):** `tools/scene_concepts.py`
|
||||
(`list`/`generate`/`process`/`promote`/`audit`/`realism`) never overwrites an image
|
||||
(`next_free_path` adds `-vN`; `process` skips existing unless `--new`; `promote` keeps an
|
||||
existing pick). Raw AI output: `assets/textures/ai/v2/raw/` (gitignored). Candidate pool:
|
||||
`assets/textures/ai/game_ready/v2/` (gitignored) and the **tracked runtime assets** are
|
||||
`.../v2/picks/{skyline_day,skyline_dusk,skyline_night,brick_facade,sidewalk_pavers,asphalt,
|
||||
asphalt_wet,awning_canvas}.png` (+ `_normal`). Concepts `docs/screens/concepts/` (committed,
|
||||
`.gdignore`, targets in its README). Runs `docs/screens/realism/<run>/` (PNG captures
|
||||
gitignored; `report.{json,md}` + `sheet.jpg` committed).
|
||||
`src/test/capture_realism.gd` runs five stages (day 0 s / evening 620 s / late 760 s /
|
||||
joke_shop 700 s / studio 700 s; `--stages=` subset) and swaps textures by the material's
|
||||
*original* albedo path. **Gotcha:** in the SceneTree script, do not overwrite `_phase` after
|
||||
`_begin_stage()` sets `done`, or the run loops forever between stage/shoot (`_queue` empty).
|
||||
**Gotcha:** `elapsed_s = 620` is *Evening* (dusk), 700+ is Late. Godot 4.3
|
||||
`StandardMaterial3D` has no `fog_enabled`; the skyline is a `ShaderMaterial` with
|
||||
`render_mode unshaded, cull_disabled, fog_disabled` + `ALPHA_SCISSOR_THRESHOLD` so the
|
||||
panorama's own haze shows. Backdrop plane is 90 m tall with 2 UV repeats (~200×90 m per
|
||||
repeat, near the 2:1 panorama aspect). Legacy `assets/textures/skyline.png` is no longer
|
||||
loaded but stays on disk for the `test_world` asset check.
|
||||
**Phase look:** day sun 0.62 / exposure 0.6 / ambient 0.22; evening sun 0.12 / exposure
|
||||
0.72 / dark violet sky; late exposure 0.95 / ambient 0.10 with the wet asphalt street and a
|
||||
bright skyline tint (1.5) so the night windows read. Stripes: `stripe_period()` (detrended
|
||||
autocorrelation) + `align_stripes()` (resample to whole periods) replace the edge crossfade
|
||||
for `awning_canvas`; `audit_striped_tile()` compares the wrap step with the harshest interior
|
||||
step.
|
||||
**Judge:** `google/gemini-2.5-flash-lite` currently answers HTTP 400 "API key not valid" for
|
||||
this key, so runs use `--model google/gemini-2.5-flash`; scores are noisy (±1–2), so
|
||||
`realism --repeats 3` averages and `summarize()` reports a like-for-like mean over the shots
|
||||
every set captured. Final: overall 0.8→1.0, backdrop 0.6→1.6, metric gap 0.444→0.348.
|
||||
`screen_designs.py judge` gained one retry for the same transient 400.
|
||||
- **Blender asset library (v0.6.0, integrated 2026-11-01):**
|
||||
`tools/blender_assets.py` (`build`/`render` in Blender; `audit`/`sheet`/`list` stdlib) writes
|
||||
`assets/models/blender/{npc,npc_gear,props}/*.glb`, `manifest.json` (integration source of
|
||||
@@ -212,6 +239,7 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
|
||||
- Radio, wand, and body-camera timeline panels use their reference art as backdrops; forms sit on transparent, padded panels over the covered mockup controls.
|
||||
- HUD target names use a boxed chip under the crosshair; escalation has a five-segment bar below the text label.
|
||||
- Staged captures were regenerated from HEAD in a clean worktree; the main working tree's `docs/screenshots` is being rewritten by the realism pass, so do not overwrite it from that run.
|
||||
- `tools/check_screenshots.sh` is the repeatable capture+compare smoke; both capture scripts accept `--out=res://docs/screenshots`. Judge verdicts on the staged set were 7 match / 4 review / 0 diff.
|
||||
|
||||
## Current State
|
||||
|
||||
|
||||
Reference in new issue
Block a user