Skip to content

examples: live SDF deformation + zero-copy texture demos - #24

Merged
transfix merged 1 commit into
masterfrom
feat/live-deform-texture-examples
Jul 26, 2026
Merged

transfix merged 1 commit into
masterfrom
feat/live-deform-texture-examples

Conversation

@transfix

Copy link
Copy Markdown
Owner

Two embedded-Python (Jobs-tab) example scripts demonstrating the native mesh/image + zero-copy interop work (libcvc Phases 1/2/4/5). They belong here rather than in a downstream lab because they exercise general pycvc/vrhost capabilities.

volrover_live_sdf_deform.py

Stanford bunny → pycvc.sdf → volume, then each frame mutates the voxel field in place through the zero-copy numpy view (volume.grid()) and re-uploads — the SDF surface ripples and erodes live and fast. Runs on the currently shipped pycvc bindings.

volrover_live_texture.py

A UV'd quad textured with a pycvc.image; each frame edits the texture pixels in place via the zero-copy numpy view (image.numpy()) + node.texture_modified() — the mapped texture updates live with no per-frame copies. Acceptance demo for the Phase-5 pycvc.image/set_texture bindings (libcvc #156); imports cleanly and raises a clear message on builds without them.

Both install to <prefix>/share/volrover3/examples/ via the existing install(DIRECTORY scripts/examples/ ...) rule — no CMake change. Pure additions.

Two embedded-Python Jobs-tab examples exercising the native mesh/image +
zero-copy interop work (libcvc Phases 1/2/4/5):

- volrover_live_sdf_deform.py: Stanford bunny -> pycvc.sdf -> volume, then
  mutate the voxel field in place each frame via the zero-copy numpy view
  (volume.grid()) and re-upload, so the SDF surface ripples/erodes live.
  Runs on the currently shipped pycvc bindings.
- volrover_live_texture.py: a UV'd quad textured with a pycvc.image, whose
  pixels are edited in place each frame via the zero-copy numpy view
  (image.numpy()) + node.texture_modified(), so the mapped texture updates
  live with no per-frame copies. Acceptance demo for the Phase-5
  pycvc.image/set_texture bindings; guards for them and raises a clear
  message on builds without them.

Install to <prefix>/share/volrover3/examples/ via the existing
install(DIRECTORY scripts/examples/ ...) rule; run from the Jobs tab.
transfix added a commit to CVC-Lab/GRL-SNAM that referenced this pull request Jul 26, 2026
These two Jobs-tab demos (volrover_live_sdf_deform.py, volrover_live_texture.py)
exercise general volrover3 embedded-Python capabilities (pycvc.sdf, pycvc.image,
zero-copy interop), not GRL-SNAM lab functionality, so they belong with the other
volrover example scripts under volrover3/scripts/examples/ (transfix/volrover#24)
rather than here. Added in #14; relocating.
@transfix
transfix merged commit a6d1229 into master Jul 26, 2026
6 checks passed
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