# Materials — material identity, measured

**Lesson embodied.** A material class is not a colour. It is a measured
feature vector — mean RGB, hot share (specular pixels ≥ 200), max
interior gradient, specular-cluster count/size — and identity is a
*distance* between vectors. The second half of the lesson is the audit:
remove the colour channel (BT.709 luma) and re-measure. Identity that
survives was structure; identity that collapses was hue — or, in one
filed case, a 7-pixel threshold artefact wearing a distance of 0.509
over a grayscale reality of 0.032. Engineered identity survives channel
loss; applied identity doesn't.

## Provenance

- Seven classes, declared parameters, sphere feature vectors, colour
  separation table: `~/workspace/dimentra-review/renderer-gallery/material-lab/`
  — `measurements.json`, `RECEIPT.md`, `build-material-lab.cjs`.
- Grayscale features, gray separation table, retention comparison,
  pre-fixed survival tolerance: `material-lab/phase2/` —
  `measurements-phase2.json`, `RECEIPT-PHASE2.md`, `build-grayscale.cjs`.
- Spectrum declared library (9 materials: albedo, hue, saturation,
  params): `~/workspace/dimentra-review/renderer-gallery/spectrum/measurements.json`
  (+ `RECEIPT.md`, `build-spectrum.cjs`). Carried as data (`SPECTRUM`);
  the separation instruments run on the seven lab classes, as filed.

## How to run

```text
node example.cjs   # separation + grayscale battery over the seven classes
node check.cjs     # PASS <n> FAIL <m>; also exports runCheck()
```

`program.cjs` exports `MATERIALS`, `SPECTRUM`, `luma709`,
`separationColor`, `separationGray`, `grayscaleBattery`, `verdictFor`,
`TOLERANCE`, and `meta`. Node builtins only; nothing is rendered — the
feature vectors are the filed measurements (fixture below).

## Worked example

`example.cjs` runs the full battery over `example/material-features.json`
and prints both tables: the 21 colour pairs (0.509 … 1.965, median
1.46) and the retention table sorted worst-first (ceramic ↔ frosted
COLLAPSED at 0.063; brushed ↔ anodized *improves* to 1.766 in gray),
ending with the JSON summary line.

## Fixture

`example/material-features.json` — minimized extraction (2026-11-07)
of the two measurements files: per-class colour + gray feature vectors
verbatim, the filed pair-distance tables, the filed retention/verdict
comparison, and the spectrum declarations. No pixel data.

## Filed numbers the check reproduces

All recomputed from the fixture's feature vectors through
`program.cjs` — nothing asserted from constants alone:

- Colour: 21 pairs, all distinct; **median pair distance 1.46**;
  closest CERAMIC ↔ FROSTED GLASS — APPROXIMATION **0.509**; farthest
  ANODIZED ALUMINUM ↔ FROSTED **1.965**; every one of the 21 pair
  distances equals the filed table exactly.
- Grayscale: **median 1.297**; closest **0.032** (the same pair);
  farthest **1.769**; all 21 gray distances exact.
- Retention battery: **median retention 0.895**; verdicts **14 SURVIVES
  / 5 DEGRADED / 2 COLLAPSED**; every pair's retention and verdict
  equals the filed comparison; the collapsed pair is exactly
  {ceramic ↔ frosted, lacquer ↔ anodized aluminum}.

Check tally at filing: see the report / `node check.cjs`.

## Consumers

Emblem deepening (per-material identity before a gem is painted),
board material declarations, GameM8c art direction — anywhere a
"different material" claim needs a number instead of an adjective, and
the grayscale pre-grade for identity claims (marks, colourways, packs).

## Honest limits

- Distances are set-relative: each table normalizes by its own set's
  feature ranges (Phase 1/2 method, verbatim). Cross-table comparison
  is honest only through retention + the absolute floor — which is
  exactly what the battery reports.
- Frosted glass and crystal are opaque stand-ins, labelled
  APPROXIMATION in the data as in the source. Nothing here transmits,
  refracts, or disperses; the ceramic ↔ frosted collapse is priced to
  that missing capability in the source receipt, not hidden.
- The Phase 1 hot test (max channel ≥ 200) is channel-biased — Phase 2
  measured the bias (anodized hot share 2.52% colour → 0.30% luma).
  The definition is carried unchanged (one instrument per measurement);
  a future revision defines hot on luminance in both phases.
- The spectrum set's still-life/row measurements are not re-derived
  here; only its declared library is carried.
