Guide11 min read6 sections

Editable voxel ground

docs/VOXELS.mdSource updated 2026-10-26
Markdown
On this page 6 sections

The atelier now supports source-retaining volumetric ground, shared saved revisions and a walkable Stone hollow template.

#Try it

Use New world → Stone hollow → Preview → Save for a walkable limestone passage. Choose Carve in scene to place a gold Dig or green Fill brush directly on the stone. Click, or focus the scene and press Enter, to apply it. Alt-drag orbits the view; scrolling zooms. Foreground objects block picking through them. Undo brush restores the previous unsaved shape. Cancel build keeps the accepted preview; retrying starts a fresh worker. Save, then Apply, to share the result.

Within Carve in scene, open Stone finish to choose warm limestone, rose sandstone or blue basalt. Adjust pattern scale, moss on ledges and roughness, then choose Preview finish. The settings fold away so you can inspect the result. Undo change restores the previous unsaved shape or finish; Save and Apply share it. Choose Original limestone to restore the original material. Existing worlds keep their appearance until you choose a finish.

In Voxel ground → Distance loading, enable Keep distant stone visible and load nearby detail, then Preview and Save. Each traveler keeps a reduced distant model while loading detailed geometry and collision near their own position. The default loads within 8 metres and retains detail until 12 metres; retention must exceed the loading distance by at least 4 metres. Disabling this option returns to loading the entire volume. Existing source keeps its prior behavior until enabled.

Open Voxel ground for precise section editing. Choose Dig or Fill, set the brush radius and its X/Y/Z position, then apply a brush. The overhead section shows X/Z at the selected Y height; the front section shows X/Y at the selected Z depth. Click the section or use arrow keys to position the brush; Enter applies it. Coordinates are metres from the patch origin. Preview displays the entire resulting volume in the atelier.

Undo brush restores unsaved work. Save retains the editable volume, and saved Undo/Redo survives reload. Apply shares the saved revision with connected development travelers; Publish creates a new immutable invitation. A published runtime world contains ordinary meshes and collision; the editable document retains the volume. Existing invitations retain their original world and engine. A development room keeps its world/release identity: start a fresh editor development server for a different template, or use Publish for a separate invitation.

The standalone authoring CLI also creates the editable template:

Terminal
npm run author -- template hollow "Our hollow" .data/hollow.editable.json

#Contract and limits

  • voxel-density.1 uses a signed integer density field: positive is stone and negative is air, at 256 units per cell. Each chunk owns 8×8×8 cells. Shared border samples have one global coordinate, so edits cannot assign competing border values.
  • A source contains up to 16 chunks, at spacing 0.25, 0.5, 1 or 2 metres. The editor starts with eight chunks. Optional limestone-outcrop.1 defines the hollow's rounded starting form; its exact output is versioned together with the source. The outer sample boundary stays air, keeping the volume closed. Extend the chunk domain through source authoring before sculpting outside it.
  • Dig and Fill combine a sphere with the signed volume. A brush spans 1–4 cells; one operation changes at most 1,024 samples. Operations carry identity and source hash/revision preconditions. Named undo rejects intervening edits to its samples. The source retains 24 operations and at most 4 MiB; the editor retains 24 unsaved brush states. Durable document undo keeps its existing storage limits.
  • voxel-tetrahedra.1 uses a consistent tetrahedral decomposition and canonical edge interpolation. Chunk boundaries share exact Float32 positions and normals. Winding follows the signed tetrahedron, independently of interpolated shading normals. Rendering and native collision consume the same triangles.
  • A chunk signature includes its one-sample normal halo. Only changed signatures are remeshed; unchanged imported artifacts are reused. The compiler retains at most the current chunks, and authoring retains two bounded revision caches for inverse validation. Cancelled/superseded compilation cannot replace the cache.
  • A voxel patch owns its generated objects and models. Use Voxel ground to edit, move or remove it. Source validation rejects detached geometry/collision edits. A place can have one voxel patch, with up to four patches and sixteen voxel chunks across the document. Heightfield and voxel patches are independent and may coexist; authors must avoid overlapping collision surfaces.
  • Shared Apply stages a complete compatible candidate while retaining old runtime collision, then uses the existing participant revision barrier. It does not expose half-built meshes. Filling into a traveler can reject collision admission. Digging can intentionally remove footing: check arrivals and exits before applying it.

The current tools include section and in-scene brushes, whole-volume stone finishes and bounded distance loading. Localized material painting and gameplay-authorized dig actions remain future work. Concurrent edits to the same patch are serialized through document revision checks; this does not claim disjoint per-sample multiplayer merging. Wider device/performance qualification and the final art pass remain open.

#Acceptance

Verified on 2026-10-25:

  • 924 headless tests passed, 68 skipped, no failures. Seven voxel scenarios cover source validation, named undo/conflicts, 50 edits with bounded history/cache state, exact seam positions/normals, closed directed edges, selective chunk rebuilding, cancellation, source ownership, saved inverses, native walking and persistence. Additional focused checks pass for room restart after saved restoration and the final terrace footing adjustment.
  • Both voxel browser journeys pass on physical Intel Arc B390 / xe-3lpg and software WebGPU. They cover Dig/Fill, local brush undo, preview, narrow controls, save/reload, saved undo/redo, protected objects, removal/restoration, two-traveler Apply/Undo/Redo, immutable publication and walking into the passage. Travelers use both main-thread and Worker graphics. Hardware journeys took 16.8 and 42.9 seconds; software journeys took 30.2 and 100.1 seconds. These are functional checks, not a five-second save or sustained frame-rate qualification. The hardware pass preceded the final terrace-only extension; native walking and both software journeys cover that final geometry. Both neighboring heightfield browser journeys pass on hardware.
  • Production build and detached packaged authoring CLI pass. Template creation, check, export, import, check and compile preserve eight solid chunk meshes. The editable template is about 2.38 MB and retains its source/shape version. Runtime export intentionally omits authoring source. Engine bundle: d6bc5d37bb2234e71d8e88f0e303a01d1bd6d4d67d10c7f47a19b8a4baae1fae.
  • Reviewed shared hollow. The entrance has rounded stone, a continuous approach and lantern lighting. Current character models remain unapproved; this is not the final environment/character/arrival art pass.

Visual review caught reversed entrance triangles despite the first functional pass. Winding now follows the tetrahedron's inside/outside direction, with an opposite-edge regression. Rounding the rock exposed a missing approach floor; the versioned form now includes shallow footing, and the terrace overlaps it continuously. Native walking and browser exploration verify the resulting route.

One combined browser campaign attempted to apply a new hollow world over a meadow development room and correctly failed the existing same-world/release requirement. The isolated voxel command uses its own server and asserts the initial live revision before joining. No runtime admission rule or existing acceptance deadline was relaxed:

Terminal
npm run test:browser:voxels

The earlier software restoration timing issue remains open. Wider devices, sustained memory/frame-time measurements, streaming/LOD and the remaining milestone 15 gates are not closed by these checks. No numbered roadmap milestone is complete.

#In-scene carving and background meshing · 2026-10-26

The editor runs changed chunk mesh jobs in a dedicated worker, with one active job, a bounded queue, a 30-second job timeout and explicit termination on cancellation. Source/chunk/signature/profile identities and imported artifacts are checked before accepting a result. A generation fence rejects late replies. Failed or cancelled mesh jobs preserve the prior draft and preview. Compiler forks retain selective reuse; the CLI and server keep the same local compiler and artifact identities. This moves meshing off the editor thread; source admission, ray picking, model validation and graphics installation still have main-thread work.

Native validation passes 949 headless tests, with 68 skips. New checks cover translated stone, tunnel interiors, foreground occlusion, brush centers, exact compiler artifact parity, selective rebuilding and preservation of accepted cache state after mesher failure. The production build includes engine b22f009bc0e56ac3706d07811f52baae560aff31cce92a7fe1c0a6f27ce3e6bc. Detached packaged CLI template/check/export/import/check/compile passes and exports the identical runtime world.

The physical-GPU browser checks pass in-scene Dig/Fill, local Undo, saved Undo/Redo, reload, deliberate worker failure, cancellation and release of a late reply. While a mesh reply is deliberately held, completed render frames continue advancing. The shared journey passes carving, Save/Apply/Undo/Redo with two travelers on main and Worker graphics, reconnect, publication and passage walking. A failed test exposed a real late room-status response overwriting a newer Undo save message; status publication now checks the current document revision, and the journey passes. An earlier keyboard test was corrected to focus the canvas after Save.

All three voxel journeys also pass on software WebGPU (2.2 minutes total). The final failure-hint change passes the focused physical-GPU editor journey. Reviewed scene brush and compact narrow-window controls preserve the presentation review. The overall editor still uses a wide three-column layout; this is not a complete mobile authoring qualification.

These are functional checks, not a sustained latency or memory qualification. The 16-chunk source limit remains. Richer voxel materials, streamed voxel detail, long-session/device qualification and final environment/character/arrival art remain open. Scratch logs are under .data/voxel-carving/.

#Continuous voxel finishes · 2026-10-26

Optional patch surface source uses profile voxel-surface.1, with stone set to limestone, sandstone or basalt, scale from 0.5–4, moss from 0–1 and roughness from 0.35–1. One bounded 32-node material recipe uses shared patch-space positions and normals, so mineral bands and ledge moss continue across chunks. Changing a finish leaves the density source, mesh bytes, entity identities and collision geometry unchanged. The recipe has no time-dependent inputs.

The patch owns its generated surface recipe. Admission verifies that it matches the versioned source; unrelated objects cannot borrow it. Replacement/removal retain other catalog entries. Saved inverses restore catalog contents and presence exactly, including an originally empty catalog. Catalog conflict keys protect those inverses from intervening edits. Recipe fingerprints are pinned for all three version-one finishes; a future appearance change requires a new profile or explicit migration.

Acceptance:

  • 952 headless tests pass, 68 skipped. Three final focused surface checks also pass with pinned recipe identities. Existing voxel restart coverage now includes a saved finish and its exact restoration through authoring and shared-room restart.
  • All four voxel journeys pass on physical Intel Arc B390 / xe-3lpg. The finish journey and two-traveler journey also pass on software WebGPU. Coverage includes three presets, customized scale/moss/roughness, local Undo, Save/reload, saved Undo/Redo, original-material restoration, shared carved-and-finished geometry, reconnect, publication and walking with both main and Worker graphics.
  • Production build and detached CLI pass. CLI template/apply/check/export/import/ check/compile preserves mesh bytes and includes the surface recipe in runtime export. Engine: 0d3c721e72b3387da38aaefac8f56633538bc4e0b38f988675c0c8d3f26b543a.
  • Reviewed sandstone finish and custom finish controls. The first visual pass had broad, high-contrast bands; the final recipe uses finer, quieter mineral detail.

Finishes cover the entire volume; localized voxel painting remains an extension. This does not qualify sustained shader/frame-time budgets or complete the required final art pass. The 16-chunk cap, streamed voxel detail/residency, broader device and long-session qualification remain open. Logs and detached artifacts are in .data/voxel-surfaces/. No numbered roadmap milestone is closed.

#Streamed voxel detail · 2026-10-26

Optional patch streaming uses voxel-stream.1 with loadRadius and retainRadius. Runtime format 26 stores six-coordinate chunk bounds and a voxel-overview.1 model. Demand measures all three axes, including vertical travel. Heightfield and voxel residency can coexist in one place; their radius settings remain independent. A traveler’s checkpoint records the exact combined selection.

A retained overview has one part per nonempty chunk. Detailed geometry replaces that part atomically. Certified distance detail preserves oriented perimeter edges, connected-component count and Euler characteristic; overview admission also checks positions, normals and UVs at resident boundaries and the voxel topology signature. Simplification keeps the original vertex stream and permits at most 0.12 metres of reported overview error. This is bounded detail reduction, not an arbitrary-domain or multilevel voxel streaming system.

Surface recipes use the same patch coordinates for near and distant meshes. Collision always uses full geometry. Movement keeps the accepted collision while replacement content and graphics prepare; coverage checks include vertical velocity. Cancelled downloads preserve the live simulation. Both chunk meshing and overview construction use the cancellable editor worker, with the same identity checks, queue bound and late-reply fence.

The 16-chunk source budget remains. Wider-domain authoring, multilevel distant residency, sustained performance/memory qualification and final character, environment and arrival art are still required by the full plan.

Acceptance for streamed detail:

  • The integration suite passes 955 headless tests, with 68 skips. The final ground-policy pass adds 18 passing heightfield/voxel checks, and the updated authoring/shared-room restart check passes. Coverage includes 3D demand, mixed heightfield/voxel places, original mesh preservation, exact saved inverses, independent travelers, collision retention during cancelled downloads, exact checkpoints, eviction/revisit, bounded prepared-place ownership and unloaded distant collision meshes.
  • Physical Intel Arc B390 / xe-3lpg and software WebGPU journeys cover independent residency, shared Dig/finish/Undo/Redo, position retention, eviction/revisit, reconnect, publication and passage walking with main and Worker graphics. The final physical heightfield publication/travel regression also passes. Editor checks cover enabling/disabling, validation, Save/reload/Undo/Redo, cancelled overview builds, late replies and retry. The overview cancellation fixture makes a new edit first so a cached result cannot bypass the worker.
  • Production build and detached packaged CLI template/apply/check/export/import/ check/compile pass. Runtime world and original detailed mesh bytes round-trip exactly. Final engine: 2c71f879644fd30877d441db06f148852a94c3af34122e3b02764618e28c0625.
  • The original hollow has 6,124 full-detail triangles / 3,996 distant triangles (34.7% fewer). The independent-traveler journey retains 2 of its 8 detailed chunks per traveler plus the distant model. These figures describe this fixture, not universal bandwidth, memory or frame-time savings.
  • Reviewed streamed cave and distance controls. Final review extended certified detail selection to the retained overview itself. Cave openings and chunk boundaries retain the same protection at every selected render level.

Initial browser failures exposed test-route overshoot, loading/retention hysteresis, a preserved disclosure state and a cached overview bypassing the intended held job. The tests now stop movement frequently, compare the actual parked position across Apply, explicitly leave/re-enter retention, preserve open controls and force a fresh overview. No runtime safety admission was relaxed. The first native integration run hit /tmp quota limits; all checks passed using workspace temporary storage. Scratch logs, retained failures and detached artifacts are under .data/voxel-streaming/. This is functional qualification; the larger-domain, long-session, device/performance and final-art gates remain open. No numbered roadmap milestone is closed.

End of Voxels