I’m trying to achieve a 360° city view while keeping the UpdateView cost low when moving. Here’s what’s happening:
Current Behavior: With frustum culling off, Cesium still traverses and updates all tiles—even though Unreal Engine’s camera frustum culling hides off-screen tiles. As a result, UpdateView becomes expensive.
Desired Behavior: When frustum culling is off, Cesium should only update tiles within the camera frustum. Loaded tiles should stay loaded with their last SSE, and unloaded tiles should remain unchanged.
Below is a snippet from my implementation:
if (!cullResult.shouldVisit) {
const TileSelectionState lastFrameSelectionState =
tile.getLastSelectionState();
markTileAndChildrenNonRendered(frameState.lastFrameNumber, tile, result);
tile.setLastSelectionState(TileSelectionState(
frameState.currentFrameNumber,
TileSelectionState::Result::Culled));
// Add to render list to prevent unloading
// result.tilesToRenderThisFrame.push_back(&tile);
++result.tilesCulled;
TraversalDetails traversalDetails{};
if (this->_options.forbidHoles && tile.getRefine() == TileRefine::Replace) {
// In order to prevent holes, we need to load this tile and also not
// render any siblings until it is ready. We don't actually need to
// render it, though.
addTileToLoadQueue(tile, TileLoadPriorityGroup::Normal, tilePriority);
traversalDetails = Tileset::createTraversalDetailsForSingleTile(
frameState,
tile,
lastFrameSelectionState);
} else if (this->_options.preloadSiblings) {
// Preload this culled sibling as requested.
addTileToLoadQueue(tile, TileLoadPriorityGroup::Preload, tilePriority);
}
return traversalDetails;
}
If I remove the line:
markTileAndChildrenNonRendered(frameState.lastFrameNumber, tile, result);
tiles render correctly, and I also skip unloading culled tiles in the UnloadCachedTiles function. However, sometimes tiles still get unloaded unexpectedly.
Has anyone encountered this behavior? Any recommendations or alternative approaches to ensure that, with frustum culling off, Cesium only updates the state for tiles in the camera frustum while leaving others untouched? Much appreciated @Kevin_Ring