cesium-unreal icon indicating copy to clipboard operation
cesium-unreal copied to clipboard

Add a way to check when tiles are finished loading

Open argallegos opened this issue 3 years ago • 3 comments

This has been requested on the forum - 1, 2

It would be great to be able to access the loading status of tiles, or otherwise be able to trigger events when tiles are done loading. This is important for loading screens, or disguising tile pop-in.

@nithinp7 suggested this might be possible by exposing these values with getter functions: https://github.com/CesiumGS/cesium-unreal/blob/ccf13b9e0b4f699fcf94ad666edd6a57d097112c/Source/CesiumRuntime/Public/Cesium3DTileset.h#L776-L778

argallegos avatar Mar 03 '22 22:03 argallegos

Sorry for the drive-by comment, just wanted to point out the corresponding API in CesiumJS:

Personally I've found the naming of these events a little non-obvious in the past, but they've certainly come in handy.

ptrgags avatar May 16 '22 20:05 ptrgags

This is a unreal forum so its not obvious to me how a comment about CesiumJS can apply to unreal development. Is there a corresponding event in unreal or an implied process that could be expanded to use JS API in unreal?

cevanno avatar Jun 07 '22 17:06 cevanno

@cevanno No this still has not been implemented in Cesium for Unreal, fyi I think Peter was just suggesting a possible way to implement such an API inspired by CesiumJS.

Also @argallegos, tacking onto your description: Kevin brought up the other day that the _lastTilesLoaded...Priority values all being zero still doesn't guarantee the tiles are done loading, since it doesn't count tiles and subtrees currently in flight (ContentLoading state). In cesium native's Cesium3DTilesSelection::Tileset, there are _loadsInProgress and _subtreeLoadsInProgress that should be zero as well before we can confirm all the currently needed tiles are loaded.

Also an additional note, tiles in the _lastTilesLoadedLowPriority category are not needed for the current view, but rather might be the ancestors or siblings of currently visible tiles. These are loaded when preloadSiblings and preloadAncestors are enabled respectively. So depending on the needs of this "ready" notification, we may or may not want to check the low priority loading tiles.

nithinp7 avatar Jun 07 '22 17:06 nithinp7

This is an old issue that appears solved. https://community.cesium.com/t/how-to-know-when-its-fully-loaded/17555/7

GetLoadProgress is available through Unreal blueprints. ::computeLoadProgress is available though cesium-native.

cesium-unreal performance testes have been relying on this functionality for some time now.

csciguy8 avatar Mar 11 '24 21:03 csciguy8