Darkwood 3D Engine — Milestone 1 & Visual Approval

Branch 3d-engine (pushed to origin; main untouched; nothing deployed). Click any image to zoom full-screen, pick your decisions below, and copy the summary line back to chat.

169 / 169 library materials pixel-identical check: 0 errors unit tests: 1245 / 1245 browser: 36 / 36 GL suite: 1483 renders, 0 failing

1. Solid 3D Wood Proof-of-Concept Milestone 1 · A3

Live per-fragment 3D evaluation (woodGrain3D → gradientRamp + levels + normalMap3D, POM & displacement off). Concentric growth rings on end faces, sweeping stripes on sides, continuous across rounded edges, and sharp at any zoom.

Solid wood rounded cube
Rounded Cube — end-grain rings on top, continuous stripes wrapping into sides.
Solid wood cube corner close-up
Cube Corner Close-Up — tight zoom over edge: C¹ smooth bump, fine pores, zero pixelation.
Solid wood cylinder
Cylinder — concentric rings on top cap, vertical trunk grain along curved side.
Solid wood sphere
Sphere — solid wood carved from a single 3D log volume with zero seams.

2. Refresh 11 Stale Golden Reference Images? Question 1

What this means: tests/gl/goldens/ stores a 128×128 reference PNG for each of the 169 library materials so pnpm test:golden and pnpm run pre-deploy catch visual regressions. These 11 saved PNGs were already out of date on main before we branched (earlier commits changed the materials/shaders without re-saving their goldens). Refreshing them simply overwrites these 11 reference files with what main already renders today so the golden gate passes 169/169.

Perforated Metal saved golden
Saved golden (stale)
Perforated Metal current render
Current render (main)
Perforated Metal (perforated-metal)
SSIM 0.8907 · ΔE 2.62 (p99 31.17)
Metallic Car Paint saved golden
Saved golden (stale)
Metallic Car Paint current render
Current render (main)
Metallic Car Paint (metallic-car-paint)
SSIM 0.5383 · ΔE 23.94 (p99 48.58)
Rain Puddle on Asphalt saved golden
Saved golden (stale)
Rain Puddle on Asphalt current render
Current render (main)
Rain Puddle on Asphalt (rain-puddle)
SSIM 0.6821 · ΔE 10.57 (p99 52.80)
Tropical Shallows saved golden
Saved golden (stale)
Tropical Shallows current render
Current render (main)
Tropical Shallows (tropical-shallows)
SSIM 0.9686 · ΔE 1.16 (p99 8.20)
Amber Resin saved golden
Saved golden (stale)
Amber Resin current render
Current render (main)
Amber Resin (amber-resin)
SSIM 0.6437 · ΔE 21.29 (p99 48.45)
Solar Surface saved golden
Saved golden (stale)
Solar Surface current render
Current render (main)
Solar Surface (solar-surface)
SSIM 0.0978 · ΔE 18.92 (p99 47.75)
Compound Eye saved golden
Saved golden (stale)
Compound Eye current render
Current render (main)
Compound Eye (compound-eye)
SSIM 0.0573 · ΔE 11.98 (p99 40.78)
Vinyl Record saved golden
Saved golden (stale)
Vinyl Record current render
Current render (main)
Vinyl Record (vinyl-record)
SSIM 0.7466 · ΔE 5.32 (p99 39.51)
Sourdough Crumb saved golden
Saved golden (stale)
Sourdough Crumb current render
Current render (main)
Sourdough Crumb (sourdough-crumb)
SSIM 0.0651 · ΔE 18.92 (p99 47.09)
Chocolate Bar saved golden
Saved golden (stale)
Chocolate Bar current render
Current render (main)
Chocolate Bar (chocolate-bar)
SSIM 0.6013 · ΔE 8.94 (p99 32.76)
Coffee Crema saved golden
Saved golden (stale)
Coffee Crema current render
Current render (main)
Coffee Crema (coffee-crema)
SSIM 0.1788 · ΔE 8.48 (p99 22.23)

3. Δ Look-Changing Proposals Needs Approval

Everything else on the plan (B2, B5, B6, B10, A4–A9) keeps the 169 library materials pixel-identical. The four items below intentionally change how existing materials look (marked Δ in 3d-engine-plan.md). Approve or defer each one individually.

B3 (Δ) — Exact IEC sRGB transfer curve instead of pow(c, 2.2)

EXR linearisation is already done. This Δ item updates the 2D Lit view and 3D viewer colour decode from approximate pow(c, 2.2) to exact IEC 61966-2-1 sRGB. Shadows become slightly deeper and more accurate (subtle — 10× amplified difference shown on the right).

Aged Brick Wall pow 2.2
Current (pow 2.2)
Aged Brick Wall exact sRGB
Proposed (IEC sRGB)
Aged Brick Wall 10x diff
10× diff (max 3.35%)
Aged Brick Wall
Aged Brick Wall pow 2.2
Current (pow 2.2)
Aged Brick Wall exact sRGB
Proposed (IEC sRGB)
Aged Brick Wall 10x diff
10× diff (max 3.35%)
Aged Brick Wall

B4 (Δ) — Fix broken 2D filter math (Gaussian σ, Kuwahara, bilateral, directional blur, resolution drift)

Right now, several 2D filters change appearance sharply between 256 px previews and 1024–2048 px exports (shown below on hard-edged Cells), and Gaussian/Kuwahara/bilateral kernels have math bugs. B2 fixes resolution-scaling (keeps 256 px mostly identical); B4 fixes the kernel math itself, which shifts the look of materials using those filters.

Normal Map (strength 8) at 256px
At 256 px (preview)
Normal Map (strength 8) at 1024px
At 1024 px (export — drifts!)
Normal Map (strength 8) on hard-edged Cells
Warp (strength 0.08) at 256px
At 256 px (preview)
Warp (strength 0.08) at 1024px
At 1024 px (export — drifts!)
Warp (strength 0.08) on hard-edged Cells

B8 (Δ) — Remove baked AO from Base Color in ~20 library materials

About 20 library materials multiply Ambient Occlusion directly into baseColor and also export an ao map, causing cavities to double-darken in the viewer and in glTF/Blender/Three.js. Below compares the current double-AO look (left) vs without the second AO pass (right, illustrating the albedo lift once baked AO is replaced with clean dirt/albedo).

Aged Brick Wall double AO
Current (AO in Base Color + AO map)
Aged Brick Wall single AO
Approx. proposed (no double darkening)
Aged Brick Wall
Mossy Cobblestones double AO
Current (AO in Base Color + AO map)
Mossy Cobblestones single AO
Approx. proposed (no double darkening)
Mossy Cobblestones

B9 (Δ) — Align Node Lit View with 3D Viewer BRDF & AgX Tone Mapping

Today the 2D Material Output node's "Lit" thumbnail uses ACES + a simplified studio light, while the 3D viewer uses GGX IBL + AgX. Aligning them makes the 2D node preview match the 3D viewer (left = current 2D node Lit view; right = current 3D viewer flat plane).

Aged Brick Wall Node Lit view
Current Node Lit (ACES)
Aged Brick Wall 3D Viewer
3D Viewer (AgX + IBL)
Aged Brick Wall
Metallic Car Paint Node Lit view
Current Node Lit (ACES)
Metallic Car Paint 3D Viewer
3D Viewer (AgX + IBL)
Metallic Car Paint
Oak Floorboards Node Lit view
Current Node Lit (ACES)
Oak Floorboards 3D Viewer
3D Viewer (AgX + IBL)
Oak Floorboards