Skip to content

Add label mesh rendering pipeline - #3

Open
davidackerman wants to merge 20 commits into
mainfrom
feature/label-mesh-rendering
Open

Add label mesh rendering pipeline#3
davidackerman wants to merge 20 commits into
mainfrom
feature/label-mesh-rendering

Conversation

@davidackerman

@davidackerman davidackerman commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@stuarteberg

Summary

  • Add label mesh rendering controls and automatic zmesh/label meshing with vertex-budget planning, blockwise generation, decimation/smoothing, cache invalidation, and material color handling.
  • Add cutaway/slice/render parity support including NG OIT assets, per-keyframe background handling, subprocess failure persistence, and configurable local data roots.
  • Add fly-through waypoint behavior plus tests for cutaways, blockwise meshing, render presets, scouting state, slice contrast, material colors, and waypoint interpolation.

Testing

  • conda run -n cinemap python -m pytest tests (54 passed, 49 warnings)

Notes

  • Local untracked spike artifacts are not included in this PR.

Label meshing (mesh_from_labels):
- Read + mesh the ROI block-by-block (parallel) and weld seams, so a sparse
  but huge bbox doesn't materialize the whole box at once. Auto-engages by
  planned read size vs. a memory threshold that respects the job's cgroup
  limit (LSF/containers), not just the node's free RAM.
- target_vertices caps what we LOAD (planner never meshes finer than the
  budget); decimate_fraction then reduces below it, per segment so instance
  colors survive. fast-simplification added as the decimation backend.
- Removed the confusing simplify_factor knob entirely (smooth + decimate only).

Per-keyframe 3D background:
- Capture Neuroglancer projectionBackgroundColor per keyframe on bake/update,
  interpolate it across transitions, and apply/animate it per frame in both
  the PNG render and the .blend export.
- Propagate it across keyframes via the "Update current frame" prompt, mirroring
  the change back into each keyframe's stored ng_state so the NG link round-trips.

UI: render controls regrouped into labeled rows (movie/render/mesh/scene) and
the timeline bar into move/keyframe/output; "quality"->"detail"; decimate
dropdown; opacity slider relabeled (all layers). README + tests updated.
Per-keyframe `waypoint` flag: the camera passes through the keyframe at speed
instead of easing to a stop (and any hold is ignored), so a run of waypoints
reads as one continuous flow. Easing is derived per-segment from endpoint type —
stop->stop ease-in-out, stop->wp ease-in, wp->stop ease-out, wp->wp linear — which
also generalizes the director's smooth-ends curve. Timelines with no waypoints are
unchanged. Toggle lives in the transition-edit popover; persisted via DurationReq.
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