Skip to content

terrain_lab: Reset view returns to the opening view (cloud_sky's near volumes leave the scene bounds) - #1154

Merged
transfix merged 1 commit into
masterfrom
fix/reset-view-cloud-bounds
Nov 12, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/reset-view-cloud-bounds

Conversation

@transfix

Copy link
Copy Markdown
Owner

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::resetView frames SceneGraph::computeGraphicsBounds() as it stands when you press H. cloud_sky's near cloud volumes counted toward those bounds:

  • They're top-level VolumeNodes (sky, sky_near1…). Each frame the sky tick moves them to the clouds nearest the camera.
  • In terrain_lab each is 500 m wide and spans 300–520 m up.
  • So the box grew as the clouds drifted, and Reset view framed the whole sky. The grid and axis grew with it.

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_sky sets it on each near volume as it's created. The setter applies at once, so the opening framing in AriRuntime::realize sees 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 snapshot renders 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 a cloud_sky change the same way.

Tests

  • cvcgl_ariadne_realize checks that the near volumes are out of the scene's bounds, and that moving one 7 km off and showing it leaves computeGraphicsBounds() as it was. A third check confirms the move itself is live. With the fix taken out, the two new checks fail.
  • Run locally on Windows (MSVC Release): cvcgl_ariadne_realize, cvcgl_camera, cvcgl_camera_map, cvcgl_grid_bounds, and ariadne_runtime_test (262 tests). All pass.
  • Not checked: the browser build. It needs a deploy to check H on the live lab.

… 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
transfix merged commit 315f9d2 into master Nov 12, 2026
30 of 33 checks passed
@transfix
transfix deleted the fix/reset-view-cloud-bounds branch November 12, 2026 06:36
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.
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