Skip to content

research(050): auto-detected procedural relief presets from one photo - #136

Merged
dompm merged 1 commit into
research/delightingfrom
research/delighting-050-auto-relief
Jul 16, 2026
Merged

research(050): auto-detected procedural relief presets from one photo#136
dompm merged 1 commit into
research/delightingfrom
research/delighting-050-auto-relief

Conversation

@dompm

@dompm dompm commented Jul 16, 2026

Copy link
Copy Markdown
Owner

What

Makes the glass preview's surface-relief effect (kept as a presentation-layer effect per 047's decision) driven by a preset picked automatically from one user photo, per the CTO's hard requirement (no trying 8 settings).

Delivers:

  1. Preset bank (render050/relief_presets.py) — 6 categories × ≤3 knobs (smooth, hammered, granite, seedy, ripple, rolling_wave), procedural, deterministic, tileable (band-limited Fourier noise + wrapped seed-stamps). Taxonomy grounded 1:1 in the generator's own generate_relief_height families + real corpus classes. Board: results/050/board_preset_bank.jpg.
  2. Auto-detector (render050/detect_relief.py) — VLM multiple-choice category (claude CLI, haiku, direction-first prompt — the validated classifier pattern) + classical and VLM knob bins (compared) + a T-derived pseudo-normal blend component.
  3. Synthetic quantitative validation (gen050_*, score050.py) — front-lit volumetric-slab "user photos" of recipes with known authored relief; scored with holdout discipline (seed 6001 tune / 7001-7002 holdout).
  4. Real qualitative board (board_real.py) — corpus/wild sheets + the CTO's difficult photo. results/050/board_real_detection.jpg.
  5. End-to-end perceptual A/B (model050.html, drive050_ab.py) — the 047 scene in real three.js MeshPhysicalMaterial: GT normal | procedural preset | off. results/050/board_ab_normal.jpg.

Honest finding (negative-ish, characterized)

From one photo, the coarse relief character is only weakly detectable and the fine sub-label + numeric knobs are not:

  • Holdout category: fine ≈ 0.50–0.58, coarse ≈ 0.50–0.67 across two runs (chance 0.17/0.25); VLM is stochastic (~±2/12). Only smooth and ripple are reliable across both runs.
  • Not a model-capability ceiling: sonnet is worse (0.33/0.42) → genuine single-photo ambiguity. The generator itself authors hammered/granite/seedy as one shared isotropic base, so they are near-identical surfaces.
  • Knobs weak: classical amp 0.42 / scale 0.17; VLM amp 0.50 / scale 0.42.
  • A/B is the good news: the bank's preset for the right coarse group ties with GT perceptually (both textured, both ≠ flat "off"), so collapsing the fine trio costs nothing visible.

Recommendation

Ship auto-detection for the axis one photo supports (flat? directional/streaky?), default the rest to a single textured preset (hammered, medium knobs) + T-blend on streaky. Satisfies "no 8 settings" while being honest about the fine limit. Full details in reports/050-auto-relief-presets.md.

Raw renders/assets gitignored (deterministically regenerable); boards + JSON committed. Do not merge — for lab-lead review.

🤖 Generated with Claude Code

Preset bank (6 categories x <=3 knobs, tileable, grounded in the generator's
own relief families) + one-photo auto-detector (VLM multiple-choice category +
classical/VLM knob bins + T-pseudo-normal), synthetic holdout validation, real
corpus board, and an end-to-end three.js A/B (GT vs procedural preset vs off).

Honest finding: from one photo the coarse relief character is only weakly
detectable (holdout fine ~0.50-0.58, coarse ~0.50-0.67, stochastic; only
smooth+ripple reliable across runs) and the fine sub-label + numeric knobs are
not; a bigger model (sonnet) is worse, so it is single-photo ambiguity, not
capacity. The A/B shows the bank's preset for the right coarse group ties with
GT perceptually. Recommend shipping the coarse path (flat/directional/textured
default) + T-blend on streaky, not a fragile 6-way + knob pick.

Raw renders/assets gitignored (deterministically regenerable); boards + JSON
committed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying vitrai with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4c0dd3e
Status: ✅  Deploy successful!
Preview URL: https://35e1641a.vitrai.pages.dev
Branch Preview URL: https://research-delighting-050-auto.vitrai.pages.dev

View logs

@dompm
dompm merged commit 8c8877a into research/delighting Jul 16, 2026
2 checks passed
@dompm
dompm deleted the research/delighting-050-auto-relief branch July 16, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant