As we promised you in February, we continue to improve performance of scene layers in ArcGIS Online Scene Viewer. I am here to update you on this promise and give you more details about three major improvements:
- Reduced Memory Usage: Drastically reduced memory usage in oblique views
- Global Memory Management: Improved stability and better performance for scenes with many layers
- Continuous Loading: Updates during navigation and animation
Reduced Memory Usage
3D object and integrated mesh scene layers are structured in a hierarchical tree to load and display only visible data at the resolution necessary for the current view. This so-called level of detail (LOD) rendering allows the client to select, download and render a manageable amount of data.
In the last release, we have substantially improved this behavior by using oriented bounding boxes instead of bounding spheres for visibility tests. As a result the JS API stores and renders less data on the client, all without affecting the visualization of the layer.
How does this work? The I3S services provide bounding sphere information to the clients to represent the space occupied by a node. On the client, we compute an oriented bounding box from the node geometry. For memory constrained environments, especially on mobile devices, these tight fitting bounding boxes can substantially improve visibility tests of the LOD nodes. Both bounding objects are conservative shapes which fully enclose the geometry of the node, meaning we still render all the visible data. Due to their simple nature, it is very fast to use them to test whether or not a node is visible.
Global Memory Management
The above memory reductions help with the memory usage of a single layer. Additionally, a newly integrated global memory management improves the behavior of scenes with many complex layers. A memory controller continuously estimates memory usage from all scene layers (3D object, integrated mesh and point cloud) as well as from the base map and other tiled layers, and globally adapts the level of detail (LOD) such that all layers stay within the configured memory limit. This works in combination with the Performance Settings in the Scene Viewer, using fully automatic fine-grained LOD changes.
In the picture above, we see a web scene with many different layers and a capture of an internal tool to debug memory usage in the scene. The memory controller has reduced the quality slightly to fit all layers within the given budget of 500 MB. The visual impact of this change is very small, but increases stability with such complex scenes. Every time the scene content or camera position changes, the controller will reevaluate the memory usage and raise or lower the global level of detail accordingly, taking into account cached and unloaded data.
This new global memory limit improves stability and user experiences with complex web scenes, by reducing out-of-memory situations which often result in a WebGL crash, and by improving the rendering performance by limiting the amount of data rendered per frame.
Besides all the work on memory reduction explained above, we also wanted to work on speeding up data loading so we decided to move that logic to web workers. That changed combined with a fine-tuned LOD node loading and streaming algorithm, allows us to load scene layer data during navigation and animation, while still maintaining a fluid frame rate during interaction.
This continuous loading still respects a tight time budget in order to not have an impact the rendering performance. This means that on large changes the loading will not fully keep up with navigation, but still accelerate the update by loading some data before the final position is reached.
In the video above, we see a before-after comparison of continuous loading. In the new version, the scene updates during navigation and has finished loading faster once the navigation stops. The continuous loading relies on the IndexedDB cache and web workers to perform smoothly.
We’re looking forward to novel, more complex web scenes enabled by these improvements. Meanwhile, we will be busy building on these foundations to bring you more improvements – be it improved point layers, reduced network traffic by using oriented bounding boxes in the services, or many other exciting features. Stay tuned!