iOS memory crash with Google 3D Tiles

Hi,

I’m currently trying out Google 3D Tiles and am finding that the amount of tiles being loaded are causing memory crashes (tested on iPhone 11). I have the camera’s Far Clip distance set to 3500.

Is there a way to control the range of 3D tiles that gets loaded so the texture and mesh memory consumption can be managed?

Thanks!
-W

Hi @wyattwww, welcome to the community!

Sorry you’re having trouble. I’m quite surprised to hear your running out of memory and crashing, though, particularly with Cesium World Terrain. Have you perhaps lowered the “Maximum Screen Space Error” setting? Or increased the Maximum Cached Bytes?

In general it’s not possible to limit the range. We get asked for that a lot, but it actually wouldn’t help nearly as much as people assume it will. The level-of-detail mechanism already drastically reduces detail in the distance, so eliminating it completely - for any reasonable view distance - would result in only a marginal improvement. Increasing the “Maximum Screen Space Error” value, on the other hand, will greatly reduce the number of tiles loaded and the amount of memory consumed.

Thanks @Kevin_Ring. I tested more and found that the World Terrain is ok with memory, but the Google 3D tiles is consuming a lot though. It’s not a rendering or performance issue, I just have a number of other game objects loaded in the scene that competes for memory with textures and meshes.

Seems like increasing the “Maximum Screen Space Error” causes the high-level details to not be downloaded but does not reduce the amount of tiles being fully instantiated (as I see in the child hierarchy), so that is not a desirable effect.

It would be great if there’s a way to not load the 3D tiles into memory if they are culled out of range, or be able to set a radius or number of neighboring tiles from origin or camera position.

It would be great if there’s a way to not load the 3D tiles into memory if they are culled out of range

This happens by default. However, tiles previously loaded are only unloaded after the Maximum Cached Bytes is exceeded. So setting this to a smaller value (even zero is ok!) will reduce memory usage.

There’s an issue with Google Photorealistic 3D Tiles specifically where memory usage increases gradually as you fly around and never goes back down without completely refreshing the tileset. This is the issue, and we expect to address it soon:

A workaround is to periodically call RecreateTileset on the Cesium3DTileset. That will cause all the currently-visible tiles to reload, but memory usage will be reduced.

Setting Maximum Cached Bytes to 0 along with a Maximum Screen Space Error of 50+ seems to alleviate my memory issue for now.

Thanks for making me aware of the tileset memory leak issue, I will subscribe.

1 Like