# Item `backgrounds`: five court backdrops ## Delivered (all inside `layers/backgrounds/**` and `catalog/backgrounds.json`) | File | ID | sha256 | |---|---|---| | `layers/backgrounds/umber-hall.png` | `background.umber-hall` | `da3ff55cb0480e91a691c40bc1360e350b679eaee08690247c46b626654cf59f` | | `layers/backgrounds/green-arras.png` | `background.green-arras` | `5545a659026d231d941c4da331973fc0fe1fd5fd35b3c5a920b205ada5b03e65` | | `layers/backgrounds/oxblood-chamber.png` | `background.oxblood-chamber` | `3a0576c2e28706578df696fda150c60f9f4b6a8b79d19df93f731ceb2822b0b8` | | `layers/backgrounds/stone-apse.png` | `background.stone-apse` | `41f70698d294b3fb71e9bbcba167693dec6165d2635b95121fb742eea4d91d9e` | | `layers/backgrounds/oak-gallery.png` | `background.oak-gallery` | `53e74a15803706db0bb812179b2d086b87a871336b7c8643f35d97e29534308f` | - `layers/backgrounds/paint.cjs` is the deterministic painter that produced them. Run `node layers/backgrounds/paint.cjs [name…]`. It uses only Node built-ins (`zlib`, `crypto`) and its own small PNG writer (see Repair below). The seed is sha256 of the room name, and there is no clock or `Math.random`. - `catalog/backgrounds.json` has `{"schema":"kekborn-assets@1","assets":[…]}` with 5 records. Each record has a unique `id` (`background.`), `slot: "background"`, a root-relative `path`, `name`, `width`/`height` 2048×2560, `format`, `paintBox` (the aperture), `sha256` and a `description`. Every PNG is a 2048×2560 straight RGBA8 PNG (colour type 6, 8-bit) and decodes with `src/raster` `decodePNG`. Every pixel of the aperture [144,1904)×[144,2368) has alpha 255. Everything outside is RGBA (0,0,0,0). The layers contain no varnish, craquelure or frame shadow. The aperture-edge darkening uses Night umber `#14100D`, which the guide lists for the "aperture edge vignette". It is a vignette, not a cast frame shadow. Banners are not painted here. ## The five settings All five rooms share these features: - a lit underpainting mixed from guide palette anchors - a key light from the upper left, plus a warm light pool centred behind the head at about (820,860) - about 25k loose cross-hatched bristle strokes in three sizes. Strokes are 22–170 px long, with per-bristle value streaks, dry-brush ends and a slightly lighter edge on the side facing the light - lower contrast in the banner zone (x 1380–1880, y 144–1000): the paint is pulled 50% toward its local mean there - **umber-hall**: a dim great hall of lime plaster over umber. The plaster is mottled and damp-stained in umber and backdrop-warm, with a faint ochre wash where the light falls. A dark timber dado with a worn cap rail sits below y 2040, behind the shoulders. Hatch angles are 38°/−52°. - **green-arras**: a worn verdure tapestry in forest and deep vert, hung in heavy vertical folds. It has faded millefleur sprigs in moss, ochre and oxblood, fine weft ribs, threadbare warp patches and a faded oxblood/ochre border band at the top. Strokes run with the folds and the weave (80°/−10°). - **oxblood-chamber**: a close privy chamber hung with oxblood wool-velvet damask. It has a faint ogee repeat and vertical panel seams every 440 px. The pile is rubbed thin and brownish in worn patches and sinks into umber. Hatch angles are 35°/−55°. - **stone-apse**: a chapel apse of cool grey-umber ashlar (umber mixed with silver-shadow). A round-headed niche behind the head (centre x 900, spring line y 1100, r 560) has radial voussoirs. Each coursed block is a slightly different stone, with dark worn joints. The concave inner wall catches the light on its right side. Hatch angles are 30°/−60°. - **oak-gallery**: a gallery wainscoted in dark oak with raised-and-fielded panels (440×620 bays) between stiles and rails. Bevels facing the upper left are lit and bevels facing the lower right are in shadow. The grain runs long and vertical, and a banded cornice in shadow runs along the top. Strokes run mostly vertical (88°/40°). ## Checks run (scratch scripts in test/scratch, not delivered) 1. **Aperture/alpha:** all five layers decoded with `src/raster` `decodePNG`. 0 pixels inside the aperture have alpha ≠ 255, and 0 pixels outside are not (0,0,0,0). 2. **Gaps against `layers/frames/common.png`:** each background composited under the common frame on an empty canvas. **0 pixels with alpha < 255** in the result for all five, so there is no gap between the backdrop and the frame. 3. **Separation against `layers/skins/moss.png`:** I sampled 12,818 skin/background pairs 14 px apart across the bust silhouette. The skin edge has a mean luminance of 93.7. The background edge mean is 44.5 (umber-hall), 36.4 (green-arras), 37.7 (oxblood-chamber), 47.0 (stone-apse) and 32.5 (oak-gallery), so the skin is about 2–3× brighter. Visual composites at 1/4 scale (bust plus common frame over each backdrop) read clearly in all five rooms. 4. **Light pool:** mean luminance behind the head (x 560–900, y 500–700) against the right middle (x 1500–1880, y 1300–1500) was 55.0/39.6, 45.0/31.9, 46.5/32.6, 64.5/36.0 and 43.9/28.8. 5. **Banner contrast:** mean adjacent-pixel luminance difference in the banner-arms box was about 43–47% of the same measure on the left side (for example 1.44 against 3.31 for umber-hall). 6. **Palette/darkness:** RGB channel range across all layers was 8–111. There is no pure black or white, and the mean luminance is 32–46 (dark backdrop). 7. **Determinism:** `paintRoom()` was re-run in a fresh process for umber-hall and oak-gallery, and the output bytes were identical to the committed PNGs. 8. **Brushwork:** 1:1 crops were viewed next to the moss skin at full resolution. The cross-hatched bristle strokes are visible at 100% and 50%. ## Remaining defects / notes - On the **shadow side** of the head and the near shoulder (x ≈ 1280–1900), 10–24% of the sampled edge pairs differ by less than 20 luminance. That is where the moss skin itself is dark (luminance ≈ 41–58). This is the guide's intended "lost-and-found" edge on the shadow side (§5). The lit left side and the snout separate cleanly. If later approval wants a crisper edge there, lower `dim` or the right-side term in `lightAt()` and re-run the painter. - The stone-apse niche and the oak-gallery panels are mostly hidden by the bust in composites. Only the arch head and the upper panels read in final portraits. - In green-arras the backdrop and the skin share a green hue family, so separation comes from value alone (36 against 94), not hue. - Because of the 2×2 export cells (Repair below), paint detail finer than 2 px is averaged away. The strokes are 6–50 px wide, so the brushwork still reads, and the compositor's full-resolution craquelure and varnish add the fine grain. - No banner, varnish, crack or frame-shadow work was done here: those belong to other items and to the compositor. ## Repair after the bundle_size check failure The first submission failed `bundle_size`: the five PNGs were 19.5 MB in total (3.4–4.3 MB each), and the limit is 8 MiB. Changes in `layers/backgrounds/paint.cjs`: - **Export in 2×2 canvas cells.** Each 2×2 block of the aperture gets the box mean of the painted canvas, repeated over the block. The painting itself (underpainting, about 25k strokes, banner contrast pull, light pool) is unchanged. - **Own deterministic PNG writer.** Each row gets the PNG filter (None/Sub/Up/Average/Paeth) with the smallest sum of |residual|, compressed with zlib level 9 and memLevel 9. It writes standard IHDR/IDAT/IEND chunks with CRC32 checksums. New sizes: umber-hall 1,382,973; green-arras 1,205,725; oxblood-chamber 1,344,005; stone-apse 1,398,160; oak-gallery 1,215,284. The total is **6,546,147 bytes** (was 19,485,500). The painter is about 17 KB and the catalog about 3.5 KB. `catalog/backgrounds.json` `sha256` values were recomputed from the new files. Re-checked on the new files (`node test/scratch/verify.cjs`, scratch only): - decode: every file is 2048×2560 - 0 pixels inside the aperture with alpha ≠ 255, and 0 pixels outside it that are not (0,0,0,0) - 0 gap pixels (background alpha + common-frame alpha < 255) for all five - `paintRoom()` re-run in the same process matches the written files byte for byte, for all five - catalog sha256 matches every file - **Separation against moss:** the mean luminance of the opaque moss skin is 90.1. Background luminance in a ring just outside the moss silhouette (within 24 px) is 48.0 (umber-hall), 39.3 (green-arras), 41.1 (oxblood-chamber), 51.4 (stone-apse) and 34.9 (oak-gallery). The skin is still about 1.8–2.6× brighter. This ring measure differs from the earlier pair-sampling measure, so its numbers are not directly comparable to check 3 above. Checks 4–6 and 8 above were measured on the earlier full-resolution export and were not re-run. Averaging over 2×2 cells changes local means very little, but adjacent-pixel contrast figures (check 5) would come out somewhat lower now.