F34.us Content Aggregator Prototype

Testing Visual Intent at the Fixture Boundary

A fixture-aware testing system measures visual intent without freezing procedural lighting into brittle golden screenshots.

A procedural light can look convincing in the Unity editor and still fail at the installation boundary. It may glow between every sampled line, touch only an unmapped corner, disappear after a prefab change, or respond so briefly that no fixture ever receives the moment. For DungeonOPC, the meaningful question is not simply “did Unity render something?” It is “did the intended behavior reach the same fixture paths that the output system will transmit?”

I built the pattern coverage system around that distinction. The editor opens an isolated temporary copy of the main scene, disables every registered pattern, and records a black-room baseline. It then activates one pattern, applies common controls, feeds synthetic show state and timed audio events, and advances the effect on a fixed clock. Each rendered frame is sampled through the fixture definitions used by OPC output. The test therefore observes the boundary that matters to the installation while avoiding live network traffic, API servers, persistence, and Play Mode side effects.

Isolation is part of the measurement rather than mere test hygiene. The coverage camera renders on a dedicated layer with a black clear color and neutral, unbaked room surfaces. Lights and geometry from other open scenes cannot leak into the result. The original scene remains untouched, and temporary assets are cleaned up after completion or cancellation. A bright baseline becomes a warning instead of being silently mistaken for pattern output.

Determinism makes comparisons useful. Procedural patterns expose an explicit simulation step that performs the same visual advance as their runtime update without depending on wall-clock time. The suite derives stable seeds independently for each pattern, scenario, and sample, so filtering the run or changing execution order does not change the observed behavior. Synthetic scenarios provide quiet, band-focused, and mixed-beat inputs with known timing. A failure can be reproduced as a particular pattern, scenario, and seed rather than chased as an editor-only impression.

The regression contract is deliberately not a golden screenshot. Exact pixels would make normal artistic refinement look like breakage and would encourage freezing an effect at one accidental frame. Instead, coverage accumulates fixture-aware measures such as the number and fraction of pixels ever lit, peak and active-frame exposure, time to first light, response after a trigger, and the number of output paths reached. Optional average-frame and heatmap images remain available for human review, but the blocking assertions describe visual intent.

Different effects receive different kinds of contract. A field pattern such as a broad wipe must traverse a meaningful portion of the fixture field. A localized spotlight can remain sparse as long as it intersects a real sampled path. A transient impact is judged on its event response rather than continuous brightness. Generated ambient behavior can run across several fixed seeds and pass by quorum, allowing legitimate spatial variation without accepting a pattern that is usually dark. Legacy work can begin with a smaller visibility guarantee until it has a stronger behavioral contract.

That distinction changes how rebaselining works. The author first runs an observation mode, inspects repeatable metrics and images, and then chooses conservative lower bounds that would catch darkness, a lost path, or a major footprint reduction. Upper limits are advisory unless too much light is itself a defined defect. A contract change is reviewed as a change in visual behavior, not waved through because a number moved. The final validation mode runs all registered patterns so a scene or fixture edit cannot quietly damage an unrelated effect.

Reports are written incrementally and atomically, with configuration hashes, Unity and seed information, fixture and path summaries, assertion diagnostics, and retained partial results if a run is interrupted. That evidence helps separate a reproducible rendering regression from a physical calibration problem.

Coverage does not claim that a real room is calibrated or that deployed hardware has been exercised. Those still require graphics-enabled Unity acceptance and physical observation. What it does provide is a durable creative safety net: pattern authors can keep changing motion, color, and texture while knowing that “beautiful in the editor, invisible on the fixtures” has become a testable failure.

F34.us Background Image