3d-wood-lighting-scorecard
3D Wood Lighting Scorecard
Wood only looks like wood under one directional key raking across a dark room, so the grain, the shadow seam and the light shafts are lit by the same window, tone-mapped once at the end, and each is measured on the finished frame instead of judged by mood.
Verified stack: Three.js r169 (unpkg), WebGL2, GLSL patched into MeshPhysicalMaterial.onBeforeCompile, a half-float MSAA target and a hand-written ACES pass. The demo is demo.html; the numbers are references/.
Boundaries. This is the lighting-and-material layer for one lit interior. For sun shafts that must be cut by real trees and rooflines use 3d-sky-rays (screen-space occlusion); here the shafts are authored planes. For scanned or painted PBR maps, texel budgets and delivery use 3d-high-resolution-textures; here the wood is procedural from one shared 1024 noise field. For a bright rim on dark metal use 3d-specular-rim-glow; for glass use the studio-box ladder, not this. For the scoring habit alone use workflow-score-to-target; this skill supplies the wood rubric and the machine that measures it.
Extracted from Kibori (木彫), a scroll-driven WebGL woodworking page: its woodMat, buildEnvironment, key rig, shaft planes, dust and final pass are ported, with the window moved to where the shafts need it.
Build order
- Renderer:
NoToneMapping,LinearSRGBColorSpace,HalfFloatTypetarget withsamples: 4,autoClear = false. Draw everything, additive shafts and dust included, into that target. Tone-map once in a last full-screen pass. - One window. Put the emissive paper, the key light's direction, the shaft planes, and the window card in the PMREM environment on the same line. Nothing else.
- Key
DirectionalLight0xfff2df, intensity 2.0, 4096 shadow map (2048 under 820 px),normalBias0.0045 (0.0085 at 2048),bias-0.00025,shadowMap.autoUpdate = falsefor a static room. Let a real wall with a real opening cast: the pool of light on the bench is then the window's shape. - Fill 0xaec7df 0.60-0.76 from the camera side, rim 0xffdeb4 0.72 from behind, hemisphere 0xb5c5d7 / 0x35281c 0.19. These only keep the shaded flank alive; they are not the look.
- Wood:
MeshPhysicalMaterialior 1.43,specularIntensity 0.72, roughnessclamp(base * W.rough, 0.35, 1), procedural albedo/roughness/bump from one periodic noise field baked once (1024x1024 RGBA8, 64 cells, three octaves, mipmapped, repeat). - Shafts, then dust, then the last pass, then run
references/scorecard.mjs.