# Sunward Rooms and its studio

Sunward Rooms is an original composition built around an unequal pair of edges: an inhabited upper gallery and a lower sheltered walk. Water occupies the eastern part of the court, leaving the approach slightly off axis. A pale opening at the far end remains a quiet destination. Moving changes the overlap of columns, fabric and sky.

Open `/studio.html`. The studio makes a small number of consequential artistic decisions visible. Held/Open changes the width of the court's inner architecture and water; Measured/Closer changes repetition; Limestone/Ochre/Basalt changes the enclosure while preserving pale architectural relief; Garnet/Linen changes the restrained fabric accent; roof ribbons interrupt the sky. Three saved hours reveal the same place differently. These controls change actual geometry, materials or runtime lighting.

The reusable assembly schema and masonry/material factories produce all architecture. The existing Three.js VXGI/temporal runtime supplies WebGPU lighting, with an explicitly labelled direct WebGL fallback. The hillside context is shared distant scenery, excluded from nearby transport bounds. One nearby lighting volume serves a fully resident composition; regional streaming, terrain following and collision are separate work.

## Session and source ownership

`src/studio/composition.js` owns the artistic recipe, stable component IDs, choice validation and a bounded undo history. `src/studio/world.js` adapts it to the shared scene contract and owns the assembly/context resources. `src/studio/app.js` owns interface and persistence. `/source.html` indexes their actual source, imports and exports.

A version 1 `fmvisual.studio` session records the composition identity, space, rhythm, stone, cloth, roof, light and authored viewpoint. Unknown fields and unsupported values are rejected. Architecture can be regenerated from those choices. The session represents an authored view, not the arbitrary camera position reached while walking.

Undo and redo retain up to forty changes within the page session. Save on this device writes one session in this browser; Restore saved session explicitly recalls it. Export/Open transfers a validated session file across devices. This workflow does not upload to R2 or synchronize browser storage. Existing R2 collection packaging remains a separate snapshot workflow.

Continue in Builder hands off ordinary editable assembly JSON, preserving stable block IDs and materials. Builder receives architecture, while studio lighting, cameras and distant context remain studio presentation. The exportable studio session retains those high-level decisions so the composition can be revisited.

## Acceptance

Deterministic tests exercise every authored choice combination, stable identities, resource disposal, geometry/voxel guards and session/history behavior. `npm run test:studio` commissions the built page in actual WebGPU and forced direct fallback: rendered pixels, real navigation, architecture changes, light/view controls, undo/redo, save/restore, session export/import, invalid-import preservation, Builder handoff and mobile layout. Captures belong in ignored `artifacts/`.

This is the first artist-facing studio built around a complete composed place. The broader world manifest, persistent region overrides and sanctuary-to-house route remain explicit tasks; this composition establishes a visible authoring experience without claiming those systems are complete.

## Quality recovery and live resource cost

On 2026-10-21, the first Sunward implementation was judged too simplified relative to the original atrium. Its folded fabrics, articulated balcony edges, coffered ceilings and jointed floor were missing or reduced to simple slabs. The shared lighting runtime was retained; the loss of architectural richness was a modeling decision, not an established hardware necessity.

The revised assembly vocabulary includes editable jointed paving, a coffered roof, a carved balustrade, folded curtains and suspended linen. Fabric geometry is shared with the original atrium; its frozen geometry fixture still passes unchanged. Builder uses these same generators, so the restored detail survives the handoff.

Measured from the same initial Sunward recipe, with the previous composition loaded from commit `647754d` and both versions built through the shared assembly factory:

| Nearby resource | First version | First detail recovery |
| --- | ---: | ---: |
| Triangles | 28,608 | 51,548 |
| Material batches | 56 | 64 |
| CPU geometry attributes | 2,746,368 bytes | 4,948,608 bytes |
| Balanced base voxel cells | 202,752 | 202,752 |
| Voxel spacing | 0.353 world units | 0.353 world units |

These geometry counts do not predict a proportional frame-time increase. The same lighting grid can still do more work collecting or shading additional surfaces. Texture, shadow, reflection, temporal and atmosphere resources remain separate costs. No matched frame-time speedup or complete GPU-memory claim is made by this comparison.

The live HUD shows nearby triangles, the mean of thirty observed frame intervals and renderer-tracked allocations when the backend reports them. Frame intervals include scheduling, CPU and GPU effects; they are not GPU timestamp measurements. The readout updates as the current composition changes. Renderer allocations are partial accounting, and CPU geometry attributes are not GPU memory.

**How this scene works** opens an accessible panel with current costs and eight explanations. Each describes the purpose, actual mechanism, cost/limit and source implementation for architectural geometry, surface materials, voxel light, shadows, temporal filtering, reflection, atmosphere and distant context. Active/inactive labels follow the current rendering path. The direct fallback never claims voxel illumination or temporal filtering.

## Budgeting guideline

Preserve architectural richness by default. A triangle count is a geometry inventory, not a complete performance budget. The assembly factory's 500,000-triangle guard is a conservative software policy for one editable assembly; it is not a measured hardware ceiling, and other scene factories are not constrained by that specific guard. Sunward's current count is modest. More powerful devices may sustain much larger mesh scenes, but the target device and complete rendering workload must establish that profile.

Calibrate triangles, material batches, texture footprint, pixel resolution, shadows, reflection passes, voxel coverage/spacing and lighting-update frequency independently. Compare matched fixed-camera and moving routes after warmup; report frame interval distributions, stalls, residency and actual GPU timestamps only when collected. A direct-only mesh throughput test cannot certify the same triangle count under voxel lighting and reflections. Device capability is uncalibrated until those experiments are run.

If a larger profile is needed, make the guard explicit and adjustable through a qualified resource policy rather than silently discarding artistic detail. Any unavoidable trade should identify the bottleneck, show the visible alternatives and measured cost, and retain the richer reference for comparison. Do not inflate geometry merely to fill a budget, and do not treat a small count as a virtue when it removes the character of a place.

## Execution pipeline boundary

The owner clarified on 2026-10-21 that a GLSL/AGX execution pipeline with zero scene compilation is available. The studio's artistic intent, editable components, control bindings and portable session must therefore remain separable from the current browser renderer. The HUD and technique explanations describe the active Three.js path only; they do not establish the native pipeline's cost or limit.

Record source/data change to visible-frame latency separately from steady rendering, uploads and resource residency. Eliminating scene compilation can change the authoring loop without eliminating execution or memory costs. Inspect the actual native interface before choosing a bridge or claiming that the existing browser backend contract is sufficient for it. Keep authored scene meaning and visual acceptance criteria stable across the execution paths.

## The 250k architectural pass

The owner asked for a bolder visual treatment and approximately 250,000 triangles. The starting composition now contains **250,176 nearby triangles**, using 42 editable blocks. The closer-rhythm variation has its own measured count in the HUD; these are authored geometry inventories, not hardware ceilings or frame-rate promises.

The change is architectural: connected loggias replace isolated freestanding frames; recessed blind arcades establish a second depth layer; an upper transverse gallery closes the distant composition; and the west gallery rises into a continuous inhabited edge. Forward-hung garnet or linen catches sunlight. Stone shafts have modeled fluting and entasis, the mouldings have real edges, and curved ceramic urns with fine bronze rings provide foreground scale. The shared components remain editable in Builder.

The upper proportions and roof heights are coordinated so the arcades support their entablatures. The courtyard remains asymmetrical, with a dry approach west of the water and a quiet pale opening below the far gallery. The original atrium remains unchanged as a reference. Further visual iteration should judge material scale, spatial rhythm, silhouettes and moving views; the triangle budget supports those decisions.
