Repository navigation
terrain_lab: Reset view returns to the opening view (cloud_sky's near volumes leave the scene bounds) - #1154
Merged
Merged
Conversation
… volumes leave the scene bounds) H / Reset view framed SceneGraph::computeGraphicsBounds() as it stood when pressed. cloud_sky's near cloud volumes are top-level VolumeNodes that the sky tick moves each frame to the clouds nearest the camera (in terrain_lab each is 500 m wide, 300-520 m up), and they counted toward those bounds. So the box grew as the clouds drifted, and Reset view framed the whole sky: the terrain small and far below. The grid and axis grew with it. GraphicsNode::setContributesToSceneBounds(bool) keeps a node out of the scene-walk bounds only (framing, grid, axis), leaving VTK's prop bounds, which the camera's clipping range uses, so the near clouds still clip right. realize_cloud_sky sets it on each near volume as it is created. It is set synchronously, so AriRuntime::realize's opening framing sees it. The opening view changes too: the hidden near volumes sat at the origin up to the deck's top, so the opening framing aimed about 240 m above the ground. It now frames the world. cvcgl_ariadne_realize: the near volumes are out of the scene's bounds, and moving one far off (and showing it) leaves the bounds as they were. Both checks fail without the fix.
transfix
added a commit
that referenced
this pull request
Nov 12, 2026
Only state_sync_adapter.cpp conflicted, two places where both sides added next to each other. Master's #1147 added drop_subtree and apply_remote's delete_subtree branch; this branch had added comments on the adapter's raw, creating lookups. Both are kept, master's code first. The connect_node comment now also says the childChanged slot's new removal check is a findDescendant, which makes nothing but holds nothing either. Master's #1159 adds a function-local thread_local memo in sea_surface::source (src/cvc/ocean/sea_surface.cpp). It is not on the allowlist, and #1159's release-grpc scan was cancelled, so the scan may flag it here. It is master's code, left unchanged; a fix on master is proposed separately.
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.
On the live terrain lab, H (and the Reset view button) reset the camera to a view far wider than the opening one: the terrain small, far below, partly behind the panel.
Cause
CameraController::resetViewframesSceneGraph::computeGraphicsBounds()as it stands when you press H. cloud_sky's near cloud volumes counted toward those bounds:VolumeNodes (sky,sky_near1…). Each frame the sky tick moves them to the clouds nearest the camera.The far shells already opted out, through
setUseBounds(false).Fix
GraphicsNode::setContributesToSceneBounds(bool)keeps a node out of the scene-walk bounds only: the framing, the grid and the axis. It leaves VTK's prop bounds alone. The camera's clipping range comes from those (ResetCameraClippingRange), so the near clouds still clip right.realize_cloud_skysets it on each near volume as it's created. The setter applies at once, so the opening framing inAriRuntime::realizesees it.The opening view changes too
The hidden near volumes start at the origin and reach up to the deck's top (520 m), so the opening framing included them. It aimed about 240 m above the ground and stood about 5% farther back. Now it frames the world.
In native
arigl snapshotrenders of terrain_lab (1120×672, 60 frames), the world used to sit low in the frame and run off the bottom edge. Now it's centred and fills more of it. Other documents with acloud_skychange the same way.Tests
computeGraphicsBounds()as it was. A third check confirms the move itself is live. With the fix taken out, the two new checks fail.