Skip to content

ariadne: port the volume bunny demos (volren + volslice) to DSL via a mesh-SDF volume source - #546

Merged
transfix merged 1 commit into
masterfrom
feat/ariadne-volslice-bunny
Oct 2, 2026
Merged

transfix merged 1 commit into
masterfrom
feat/ariadne-volslice-bunny

Conversation

@transfix

@transfix transfix commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Ariadne (.ari) ports of the cvcGL volume-raycast (volren_bunny) and volume-slice (volslice_bunny) demos — the "finish the Ariadne demo versions, start with the bunnies" work — plus the enabling capability and reusable control components.

The blocker & the fix. These demos had no .ari because the realizer could only load a volume file, while the demos synthesize the volume as the signed distance field of the bunny mesh at runtime. New mesh-SDF volume source in the scene schema:

- node: bunny_volume
  type: volren        # or volslice
  source: { sdf: { mesh: stanford.bunny, dim: 64 } }
  fit: { height: 100, up: y }

The realizer loads the mesh (applying the node's fit: to stand/scale it, for framing parity with a geometry node) and runs cvc::sdf over an N³ grid — so any demo can turn a mesh into a volume with no asset file, pure-DSL on the stock ariadne_hello host. Guarded on CVC_ENABLE_SDF (warns + skips without it). The file-source path is unchanged.

Ports. volren_bunny.ari (distance-field isosurface) and volslice_bunny.ari (a transfer function around the zero level set), both verified rendering headless via EGL (the bunny raycast / sliced on the ground plane).

Reusable components (the "shared functionality" ask). Both demos import the existing stage_lighting + camera_controls components (shared with bunny_shadow), plus two new catalog components — volren_controls and volslice_controls — binding the renderer's two-way cvc::volren/cvc::volslice::state_settings keys (steps/ambient/supersample/shadows; quality/near-plane/max-planes), so the panels are declarative with no host C++. Added both to the component INDEX.

Tests. AriadneScene.VolumeSdfMeshSource (loader parses source: { sdf }); the existing cvcgl_ariadne_realize volren/volslice path is unchanged and green.

Follow-ups: parametrize the volume-control components by node id (the catalog already models args: { node: … }) instead of the bunny_volume convention; extend SceneVolRen with the richer volumetric-shadow/AO/hemisphere knobs for full volren panel parity.

…+ reusable controls

The cvcGL volume-raycast (volren_bunny) and volume-slice (volslice_bunny) demos had
no Ariadne .ari version because the realizer could only load a volume FILE, while the
demos synthesize the volume as the signed distance field of the bunny MESH at runtime.

Enabler — a MESH-SDF volume source in the scene schema: `source: { sdf: { mesh: <uri>,
dim: N } }` on a volren/volslice node. The realizer loads the mesh (optionally applying
the node's `fit:` to stand/scale it, for framing parity with a geometry node) and runs
cvc::sdf over an N³ grid — so any demo can turn a mesh into a volume with no asset file,
pure-DSL on the stock ariadne_hello host. Guarded on CVC_ENABLE_SDF (warns + skips
without it). The file-source path is unchanged (realize regression test still passes).

Ports — volren_bunny.ari (distance-field isosurface) and volslice_bunny.ari (a transfer
function around the zero level set), both verified rendering headless via EGL.

Reusable components — they import the existing stage_lighting + camera_controls
components (shared with bunny_shadow), plus two new catalog components, volren_controls
and volslice_controls, that bind the renderer's two-way cvc::volren/volslice::state_settings
keys (steps/ambient/supersample/shadows, quality/near-plane/max-planes) so the panels are
declarative — no host C++. Added both to the component INDEX.

Tests: AriadneScene.VolumeSdfMeshSource (loader parses source: { sdf }); the existing
cvcgl_ariadne_realize volren/volslice path is unchanged and green.
@transfix
transfix enabled auto-merge October 2, 2026 21:43
@transfix
transfix merged commit a62cbd6 into master Oct 2, 2026
13 checks passed
transfix added a commit that referenced this pull request Oct 2, 2026
Conflicts:
- cvcpkg/recipes/{cvcgl,cvcgl-cuda,cvcgl-examples}/recipe.yaml: #537 took
  cvcgl 18, cvcgl-cuda 3 and cvcgl-examples 17 for the wasm app contract, above
  the revisions this branch had set aside (17, 2, 16). Master's bump comments
  are kept; this branch's revisions move to the next number above master's and
  above the highest published on any platform (cvcgl 16, cvcgl-examples 15,
  cvcgl-cuda none): cvcgl 19, cvcgl-cuda 4, cvcgl-examples 18. libcvc stays at
  17 (master 15, published 16).
- src/cvcGL/CMakeLists.txt: both installs kept -- master's wasm state shim and
  this branch's THIRD_PARTY_NOTICES.md. The test region merged clean: master's
  JS-test registration and its REMOVE_ITEM additions, one GL-test lock block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant