Repository navigation
volren and volume_slice view a volume on the state tree, shared with volume_grid; volume.filter and data-put (D1) - #1446
Merged
Merged
Conversation
…lowed_key and volume_payload
… DSL's three forms
…rs unwrap a program's data object
…d by volume.filter; docs
This was referenced Nov 22, 2026
transfix
enabled auto-merge (squash)
November 22, 2026 05:11
transfix
added a commit
that referenced
this pull request
Nov 22, 2026
VolumeGridNode.cpp: D1 replaced the grid's payload_id with cvc::volume_payload_pointee; holds_volume now asks that (or a cvc::volume held by value).
transfix
added a commit
that referenced
this pull request
Nov 22, 2026
…tours Master gained #1446 (D1: volren and volume_slice view a volume on the state tree). The conflicts were both sides adding: the extensions' includes and their comment, the port tests, the cvcGL tests, and a test each in ariadne_loader_test. All kept. cvcgl_ariadne_shared_volume (D1's) joins the 8 MB document host stack: its document includes volume_grid, whose Contours tab is one level deeper, and it overflowed Windows' 1 MB stack (0xC00000FD) here.
transfix
added a commit
that referenced
this pull request
Nov 22, 2026
D1 (#1446) put the key-following the volume_grid node did by hand into cvc::followed_key (path through links, node, lastMod, payload type and pointee). The contours helper had its own copy of the same logic; it now uses the shared one, with its payload_id (data objects, and grid_contours or contour_stack pointers) as the pointee.
transfix
added a commit
that referenced
this pull request
Nov 22, 2026
…10) (#1451) * volume_grid: the Contours tab, contours per object, trace and tile (P10) VolumeGridRover's contours (docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md §4, P10): curves drawn per object on the grid's planes, linear or spline, exported as contour stacks, and tiled by the contour tiler into a surface per object in the 3D view. Core (cvc/volume/volume_grid_contours.h, no GL): - grid_contours: objects (name, colour, linear | spline, samples) holding curves on one plane each (axis, slice, control points, open or closed), on the grid's frame; - sample_grid_curve (centripetal Catmull-Rom), grid_contour_editor (add at the active or the nearer end, close, open, move, select, delete, undo), grid_contour_gestures (picks to edits), the object rows, stacks both ways, JSON (and the session's optional contours), trace_slice (VolumeGridRover's isocontouring); - tile_grid_contours, grid_tile_stepper and the job: each orientation's closed curves tiled by tile_stepper in voxel units, mapped back with the XZ/ZY winding turned so surfaces face out. DSL: grid-contours.tile (-async, -start), .info, .stack, .from-stack, .add-curve; installed by register_cvcgl_extensions. pycvc: pycvc_volume_grid_contours.i and tile_grid_contours_job. Node and component: - VolumeGridContours, owned by VolumeGridNode: the contours tool; grid.objects, grid.contour.*, grid.tile.* (the tile job's keys under tile, beside the segmentation's); requests tile, stop_tile, close_curve, new_curve, delete_curve, clear_object, trace; data grid.curves, grid.contours (+ .xz, .zy), grid.surfaces.<object>; overlays per plane and the 3D view's curves and surfaces; props objects:, contours:, contour:, tile:; - Ariadne data: the contours decoder and encoder; - volume_grid.ari: the Contours tab (volume_grid_contours_tab); - demo volume_grid_contours.ari, golden volume_grid_contours.ari (PNG to follow from CI), arigl-web case volume_grid_contours.ari. Tests: volume_grid_contours_test (33) and volume_grid_contour_intrinsics_test (7), native and wasm-mt under node, in the sanitizer lanes; cvcgl_volume_grid_contours (58); loader and data cases; test_pycvc_volume_grid_contours.py. cvcgl_ariadne_volume_grid and the other grid tests get the 8 MB document-host stack. * gallery: volume_grid_contours_ari, the Contours tab's demo * contour_lab: follow a source written twice within one clock tick contour_lab noticed new contours at a node or state source only by the key's lastMod. boost's microsec_clock on Windows has the system timer's resolution (15.6 ms on CI's VMs), so two writes close together share a stamp and the second was never loaded. cvcgl_volume_grid_contours hit it on Windows CI: the lab stayed one stack behind the grid's contours. The lab now also keeps what held the stack it loaded (the shared pointer, or the data object it came in) and loads again when the key holds another. Keeping it means its address isn't reused. A stack held by value is still told by lastMod alone. cvcgl_contour_lab writes a followed stack 20 times with a tick between and no sleep, and checks each write loads. It failed locally before the change. * goldens: volume_grid_contours, and volume_grid's tab bar with Contours volume_grid_contours.png is new. volume_grid.png and volume_grid_quad.png change only where the panel gains the Contours tool and tab. They are the actual frames from #1451's CI run on cf67ebb, in the package-windows ari-golden artifact, rendered by Windows' llvmpipe (mesa-dist-win), which docs/ARIADNE.md measures within 1 of the Linux llvmpipe goldens. The Linux jobs compare them on the next run. * arigl-web smoke: the contours case asks for its trace from on_tick, and says where it stops The case failed in headless Chrome: the page ran, but the line it waits for never came within the 15 s the harness allows. Natively the same document prints it within 20 frames. The document wrote the node's trace request in init:, which may run before the node is up, so the case depended on that order. It now asks once the grid has the volume, as volume_grid.ari's case acts only once the dims are there. It also prints a `vgc:` line whenever the step, the dims, the tile's status, bunny's triangle count or the node's status changes. A failing run of the case reports those lines and the page's warnings. * VolumeGridContours: follow grid.contour.source with cvc::followed_key D1 (#1446) put the key-following the volume_grid node did by hand into cvc::followed_key (path through links, node, lastMod, payload type and pointee). The contours helper had its own copy of the same logic; it now uses the shared one, with its payload_id (data objects, and grid_contours or contour_stack pointers) as the pointee. * VolumeGridContours.h: align the member comments (clang-format)
transfix
added a commit
that referenced
this pull request
Nov 23, 2026
…lumes the grid shows (#1443) The volume_grid component's Probe tab now has a Source combo that picks which of the app's volumes the grid shows. - VolumeGridNode publishes grid.volumes: each output of the document's data: entries that holds a volume (data.<name>.<output>), then the key grid.source.volume names when it isn't one of them. It is empty while that key names nothing, and rebuilt only when the source key or an entry changes. - The Probe tab's Source is a combo over grid.volumes that writes grid.source.volume; the read-only text shows while the list is empty. - The volume_grid demo loads a coarser bunny (24^3) beside the 64^3 one. - volume_grid_quad.png is CI's llvmpipe render with the combo and P10's Contours tab (#1451). - Merged with D1 (#1446): holds_volume uses cvc::volume_payload_pointee. - Docs: ARIADNE.md's volume_grid keys, the component header, and the roadmap's P8 "Which volume" bullet. Tests: cvcgl_volume_grid (85), cvcgl_volume_grid_contours (58), ariadne_loader_test's VolumeGridDrivesItsNodesKeys combo checks, cvcgl_ariadne_volume_grid (17), cvcgl_shared_volume (29), volume_grid_test (21).
transfix
added a commit
that referenced
this pull request
Nov 23, 2026
…hed by a key (#1480) * volume_render: one volume, its renderer (VTK, volren, volslice) switched by a key Joe asked to change which renderer draws a scene's volume in 3D, VTK's mapper, volren or volslice, for any scene's volume. - cvcGL VolumeRenderNode: one volume (a shared_ptr<const cvc::volume>, its voxels shared, published as <node>.volume) drawn by a child VolumeNode, VolRenNode or VolSliceNode that <node>.renderer picks (vtk, the default; volren; volslice; none), replaced on the next tick when the key changes. Each child is named for its kind, so its settings keys stay under <node>.children.<kind>; a volren made again reads its settings back, and the first one is lit (volren's default draws a black silhouette). A new volume is handed to the renderer drawing; rendererVersion() moves on each make or hand. - tf_binding: an optional model_key (empty: the node's own, as before) and make_transfer_function, which registers a binding without adding a scene tick, so a renderer swapped from inside a tick can be bound again. - Ariadne type volume_render: source: { data | state | node } resolved into <node>.source.volume and followed (as volume_grid's, by node, lastMod, payload type and pointee); { node } takes its volume, else its grid.volume. One binding for <node>.transfer_function at a time, made again for each new renderer, so an edit carries over a switch; with none it keeps the range. - volume_grid: display.render (none by default) draws the grid's own volume in the 3D view through a VolumeRenderNode in the surfaces group the slice views hide; the grid's single binding moves to that renderer, bound to the grid's model, so the planes and the volume colour through one transfer function. The Transfer function tab gets a 3D volume combo and the renderer's status. - Demo examples/ariadne/documents/volume_render.ari: the bunny's SDF with a Renderer combo and the transfer function editor. The VolumeNode, VolRenNode and VolSliceNode classes and scene_realize's built-in volume, volren and volslice branches are unchanged, so the built-in types, terrain clouds and One World draw as before. Tests: cvcgl_volume_render (the three renderers switched with the volume and model carried over, none, a bad name, a new volume, { node } on a grid, the grid's display.render, two apps; offscreen, each renderer draws), and ariadne_loader_test's VolumeRenderDemoLoadsClean. Rerun and passing: cvcgl_volume_grid, cvcgl_ariadne_volume_grid, cvcgl_tf_binding, cvcgl_tf_editor, cvcgl_volren_node, cvcgl_volslice_node, cvcgl_ariadne_realize, cvcgl_ariadne_scenes, cvcgl_ariadne_views, cvcgl_world_geometry_nodes, cvcgl_physics_scene_binding, cvcgl_volume_slice, volume_grid_test, multi_app_integration_test. The goldens are unchanged (display.render is none). * volume_render: follow the volume with node_data's VolumeFollower On D1 (#1446), volume_render drops its own copy of the follower and source parsing: volume_data_source names the source (a volume_grid realized before it by its grid.volume, else a node's volume), VolumeFollower follows <node>.source.volume and publishes <node>.volume, and wait_for_datasets keeps the scene's pending work while a dataset loads. A volren handed a new volume takes it through VolRenNode::setVolume, keeping its settings. cvcgl_volume_render 24/24, cvcgl_volume_grid, cvcgl_ariadne_volume_grid, cvcgl_shared_volume, cvcgl_tf_binding and ariadne_loader_test pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step D1 of a new plan,
docs/roadmap/DATA_FROM_STATE_TREE.md. The plan applies Joe's rule from P8 (2026-11-20) to every scene node type: a node views data the app holds on the state tree, never reads a file itself, keeps no private copy, and follows the data when it changes. P8 part 3 (#1423) did this forvolume_grid. This PR does it forvolrenandvolume_slice, so the main scene's volume renderer and a grid's slice planes can show one volume and both redraw when a filter changes it.The plan, and Joe's decisions (2026-11-21)
docs/roadmap/DATA_FROM_STATE_TREE.mdlists every node type and component that still reads files, and what each reads. It then splits the work into one PR per step: D1 volume, D2 the built-involume/volslice, D3geometry, D4mesh_lab, D5fe_lab, D6contour_labplus the file decision. Joe agreed the plan and decided two things:source: { file }and{ sdf }on the built-ins stay, as sugar for adata:entry named after the node. This applies to every type at once in D6; until then{ file }works as before.What changed
Shared pieces, moved out of
VolumeGridNode, which now uses them:cvc::followed_key(inc/cvc/state/followed_key.h): a state key followed through links. A change is a new node, a newlastMod, or a new payload type or pointee. The pointee check matters because the Windows clock ticks in milliseconds.cvc::volume_payloadandvolume_payload_pointee(volume_slice.h): what a key holds as a volume. They also unwrap the DSL data object a program'sstate-data-setstores.cvc::gl::ariadne::NodeDataSource,volume_data_source,wait_for_datasetsandVolumeFollower(inc/cvc/gl/ariadne/node_data.h): what asource:names, and the volume a node shows, followed. The follower uses<node>.source.volume,<node>.source.statusand the published<node>.volume.volrenwithsource: { data | state | node }:VolRenNodekeeps a shallow handle on the same voxels.VolRenNode::setVolume(index, vol).<node>.volume.volume_source. The document's isosurfaces are data values, so the TF's seed has to be made on the volume's range. The newtf_binding_options::seed_from_volumemakes it when the first volume arrives; before that the key stays empty. Before this change the binding seeded a default model on every tick.volume_slice:reads_data, and publishes<node>.volume.volume_of:plane now follows its source plane, including one whose volume is still loading.{ node: ID }defaults to the node'svolume, orgrid.volumefor avolume_gridrealized before it.volume.filter(inc/cvc/volume/volume_filter.h,volume_filter_intrinsics.h):volume.filter,-async,-start).voxels::bilateralFiltervoxel for voxel (test below).register_cvcgl_extensionsinstalls it per app.(data-put NAME ITEM VALUE)(DataStore::set_output):state-data-set "data.NAME.volume": that write makes a key under the document's link, not in the store node.data-putwrites the output into the store node and raisesrev, so every view of the dataset follows.Demo:
examples/ariadne/documents/volume_shared.ari.data:entry) is shown by the main scene'svolrenand by avolume_grid. The main view hides the grid's planes.volume.filter-start, andon_tickdata-puts the result back. Both views redraw. Original runsdata-reload.Docs: ARIADNE.md §5.17 (scene nodes that follow,
data-put) and thevolume_slicesection; the ports roadmap's §1.6 intrinsics table.Tests
New:
cvcgl_shared_volume(headless, two apps), 29 checks. Onedata:entry is shown by a volren, avolume_gridand twovolume_slices ({ node },volume_of:,{ data }). Checks:set_output, two writes in one clock tick, and a reload are all followed by every view;{ state }follows a program's data object and can be pointed elsewhere, and a key holding no volume is reported insource.status;cvcgl_ariadne_shared_volume(the demo through AriRuntime, offscreen), 7 checks. Smooth's job runs,on_tickputs the result back, the volren and the grid follow with one pointer,revgoes up, and Original is followed too.volume_filter_test(a port test, so it also runs in the wasm-mt lane), 11 tests:voxels::bilateralFilterat radius 1 and 2, with the input untouched;params.defaults;ariadne_host_testDataPutPutsADataObjectAsADatasetsOutput, andariadne_loader_testVolumeSharedDemoLoadsClean.Run locally (Windows, MSVC Release, Intel Arc): 279 of 280 pass in a run of every cvcgl test plus the volume, Ariadne data/loader/host-verb, job-intrinsic and TF-binding tests. The one failure is
cvcgl_ari_golden, on documents this PR does not change: orthoslicer, contour_tiler, volume_grid (105 px) and volume_grid_quad (258 px) differ by the same pixel counts P8 recorded on this Intel GPU (llvmpipe vs Intel), and skeleton needs mesh_lab, which this build lacks. I did not run master's goldens myself. CI's llvmpipe is the golden check.volume_shared.arihas no golden yet; its frame was checked by eye locally (the volren above the grid window, the Filter window). Not run locally: Linux and macOS, the wasm lanes, sanitizers, the singleton scan, and pycvc.Overlap with #1443
#1443 (the grid's volume picker) also edits
src/cvcGL/VolumeGridNode.cpp. A trial merge conflicts in one spot: #1443 addsholds_volume()next to the oldvolume_of/payload_id, which this PR replaces withcvc::volume_payloadandpayload_pointee. Whichever PR merges second keepsholds_volume(or answers it withcvc::volume_payload) alongsidepayload_pointee. Master merges cleanly.