Repository navigation
cvcGL: the camera's clipping-range fit no longer runs every mesh's pipeline - #1479
Merged
Merged
Conversation
…peline The camera re-fits its clipping range on each frame in which anything moved, and the fit asks every actor for its bounds. A GeometryNode's mapper answered by updating its input's pipeline first, though its input is the node's own polydata, changed in place, with no pipeline above it. With two dozen moving vehicles on a city that was most of the Ariadne runtime's frame. The mapper is now Static (vtkMapper::Static): its bounds and its draws read the polydata as it is. GraphicsNode also stops setting a vtkTransform on every pose that nothing read; each set rebuilt its concatenation, allocating and freeing VTK objects.
Owner
Author
|
I've taken this PR over. It came from a session that stood down when the runtime frame went to #1477; that session closed its own duplicate, #1478. This is part of the cheaper runtime frame Joe approved to merge when green. It's separate from #1477 and touches none of its files. It goes into 4.0.6 with #1477. What I checked:
|
transfix
enabled auto-merge (squash)
November 23, 2026 06:47
transfix
added a commit
that referenced
this pull request
Nov 23, 2026
…p9/volume-grid-segment VolumeGridNode keeps both the segmentation and the VolumeRenderNode: both includes, both forward declarations, both ticks; the surfaces group's comment (header and ARIADNE.md) names the volume, the contours' and the segments.
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.
The camera (
CameraController) re-fits its clipping range on each frame in which anything moved (applyNeeded: the scene'scontentVersion). The fit (vtkRenderer::ResetCameraClippingRange) asks every actor for its bounds. A GeometryNode's mapper answered by updating its input's pipeline first, though its input is the node's own polydata: set once withSetInputData, changed in place, and with no pipeline above it. With two dozen moving vehicles on a city, that fit was most of the Ariadne runtime's frame (AriRuntime::frame, whereCameraController::updateruns).What changed
GeometryNode's mapper isStatic(vtkMapper::Static). Its bounds and its draws read the polydata as it is:vtkPolyDataMapper::GetBoundsandRenderPieceskip only the pipeline update, andComputeBounds(streaming nodes'beforeComputeBoundsincluded) runs as before. Every GeometryNode, streaming ones too, wires its mapper to its own polydata in the constructor, and nothing reconnects it.GraphicsNode::updateTransformno longer setsm_vtkTransform, avtkTransformthat nothing read. Each set rebuilt its concatenation (vtkTransformConcatenation), allocating and freeing VTK objects on every pose.Measured
The bench is an Ariadne document with 24 posed vehicles on the small Austin data city, plus ribbons, links, markers and labels.
rt.frame()was timed natively at 1/60 s frames, at 1280x720, with a scratch timer that is not in this PR. Measured on #1478's branch, which already makes the drain cheap, with only this change toggled, so the camera is what's left:rt.frame, wall time, two runsUnder callgrind, the clipping-range fit was 5.4 M of the frame's 7.8 M instructions before this change (
GeometryActor::GetBounds→vtkAlgorithm::UpdatePiece, per actor per frame); with it, 0.69 M of 2.98 M. It is 5.4 M of 15.9 M on master too.Tests
cvcgl_camera_idlealready pins the fit's correctness: the range re-fits to a mesh replaced in place, a node moved, added, shown and hidden, and a streaming node's growing box. It passes, as does the rest of cvcGL's ctest.cvc::planar(the contour tiler) and the goldens' GPU pixel counts. They are the same with and without this change.