Nocturne Observatory: WebGPU Pinball, Blueprint-Locked Art & Procedural Acoustics
A 120 fps WebGPU pinball machine set inside a midnight astronomical glassworks dome — driven by a single JSON layout spec locking blueprint-guided AI playfield art, derived leaded stained-glass PBR maps, 18 headless Blender 5.2 assemblies, 480 Hz multiball physics, and procedural WebAudio acoustics.
480 Hz physics · ±2 px art lock · 18 Blender GLBs · 120 fps WebGPU
Nocturne Observatory is a playable, full-cabinet WebGPU pinball machine staged inside a midnight astronomical glassworks salon. Every wall segment, bumper ring, stained-glass insert, wireform ramp curve, and drop target derives from a single canonical JSON table specification (0.56 m × 1.12 m, 1:2 aspect, ballRadius = 0.0145 m), keeping the continuous 480 Hz physics solver, blueprint-conditioned playfield art, derived PBR maps, and headless Blender hardware locked within ±2 px.
Layout-locked art, leaded stained glass & headless Blender 5.2
Most browser pinball builds either fall back to flat procedural shapes or manually eyeball textures over approximate hitboxes. Instead, the pipeline starts from the JSON table spec and fans out deterministically across four stages:
| Pipeline Stage | Tooling / Output | Architectural Contract |
|---|---|---|
| Orthographic blueprints & masks | render_blueprints.py (1024×2048) | Emits text-free conditioning linework plus 3-channel stained-glass masks (insMask.r pane window, .g per-facet cut-glass weight, .b dark lead-came bezel) |
| Art registration & PBR maps | derive_playfield_maps.py (±2 px) | Affine-registers generated playfield, apron, backglass, and 1920×1080 observatory dome backdrop; derives roughness & tangent normal maps |
| Sculptural cabinet hardware | Blender 5.2.2 LTS (18 .glb parts) | Headlessly builds pop bumpers, cast-brass bell, spinning Astrolabe toy, flippers, lockbar, apron, backbox, diverter gates, and tempered playfield glass |
| WebGPU / TSL rendering | Three.js 0.187.0 RenderPipeline | 4-layer GI + analytical neon tubes, 1.55 selective bloom threshold, parallax tempered glass, 4-ball contact shadows, and 160 drifting gilded dust motes |
Keeping bloom selective (threshold = 1.55, strength = 0.15, radius = 0.24) and calibrating PMREM strip reflections was critical: earlier passes pushed chrome ball reflections past the bloom knee and turned the pinball into a glowing orb. With calibrated reflectance (#dfe6f0, envMapIntensity = 1.32) and a dedicated non-blooming tempered GlassPane shader (grazing Fresnel rim, two parallax-shifting ceiling reflection bands, and beveled rail edge catches), the ball reads as heavy polished steel rolling beneath real cabinet glass.
480 Hz continuous physics, 560-trial fuzzing & zero-sample WebAudio
- Zero stuck balls across 560 Monte-Carlo trials: The analytic continuous solver steps at
480 Hz(FIXED_DT = 1/480 s) with pairwise elastic multi-ball collisions, elevated 3D wireform ramp trajectories, and authentic Williams/Stern automatic solenoid ball-search (pulsing pop bumpers and imparting a rescue nudge if any free ball drops below0.025 m/sfor> 2.5 s). Automated Vitest fuzz suites run280randomized + feature-stress trials per table (560total) verifying0wedged balls,0out-of-bounds escapes, and0flipper tunneling. - Zero audio samples — pure procedural WebAudio: Flippers fire a two-stage mechanical solenoid (
t = 0coil energize ++16 msEnd-of-Stroke coil-stop thwack coupled into a110 Hzwood cabinet bandpass resonator). The Observatory Bell rings with8inharmonic cast-bronze modal partials (740 Hzprime +1.0025×doublet shimmer beat), rolling wood deck rumble crossfades smoothly into twin-rail metallic singing on elevated wireforms, and a pre-baked 6-second horological dome soundscape pairs dark room air with a subtle60 BPMbrass pendulum escapement and D Lydian glass-celesta musical cues. - Responsive desktop & mobile play: Desktop widescreen frames the cabinet with horological
Cormorant Garamondtypography, a live 6-node SVG Surge Constellation dial, active mode telemetry (Skill Shot,Hurry-Up,3-Ball Surge,Tilt Bob), and persistent per-table high scores. On mobile portrait (390×844), chrome collapses to a compact top strip with multi-touch canvas flippers, an analog hold-to-launch plunger pad, and touch nudge controls.