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

Tiles loading and unloading based on amount of requests

Open electrum-bowie opened this issue 1 year ago • 7 comments

It seems like when a tile is requested multiple times by multiple clients it can start disappearing and reappearing for everyone at that location

https://github.com/user-attachments/assets/10e5a0f6-5d63-4832-9076-9eb03e04eedc

If it's not fixable, can I at least know why this is happening ?

electrum-bowie avatar Oct 17 '24 09:10 electrum-bowie

That's not a problem I've seen, and I don't know what would cause it. Can you help us reproduce it ourselves? The first thing, of course, is to see if there are any messages in the log that might offer a hint.

kring avatar Oct 28 '24 09:10 kring

Can you help us reproduce it ourselves?

I can't provide anything useful in terms of source files, and I don't have the time to do debugging unfortunately.

However, based on my experiences with the issue, I'm 80% confident it's some kind of Tiles API overload that confuses Cesium and hides a tile, similar to the issue where tiles slowly disappear after returning to a unity player that has been in standby for a longer time ( 1+ hours or so ), so that's why I'm pretty confident it's a random / meaningless error that could be skipped if handled correctly.

It never happens on regular usage, as you may already know, it only occurs when 2 or more clients rapidly requests tiles at a same place, so if my theory is correct, you may easily be able to reproduce this with a simple multiplayer scene with a minimum of 2 clients ( the more clients the more likely the issue will occur ) or other, simpler ways to imitate the same behavior.

electrum-bowie avatar Oct 28 '24 21:10 electrum-bowie

I'm 80% confident it's some kind of Tiles API overload that confuses Cesium and hides a tile, similar to the issue where tiles slowly disappear after returning to a unity player that has been in standby for a longer time ( 1+ hours or so ), so that's why I'm pretty confident it's a random / meaningless error that could be skipped if handled correctly.

I'm not sure if this is what you're referring to, but it is true that the Google Photorealistic 3D Tiles token times out after a certain amount of time, and we don't currently have a way to refresh it. That issue is documented here: https://github.com/CesiumGS/cesium-native/issues/749

It's also true that tile load failures will manifest as missing tiles. I don't know why tiles would be failing to load for you, though. If you are using Google Photorealistic 3D Tiles (I don't think you've said, but it looks like you might be), certainly Google's server should be reliable even with multiple clients hitting it simultaneously.

There should be a message in the log when tiles fail to load.

you may easily be able to reproduce this with a simple multiplayer scene with a minimum of 2 clients ( the more clients the more likely the issue will occur ) or other, simpler ways to imitate the same behavior.

That may be, but if we took the time to build elaborate scenarios to try to reproduce every bug report we got from users, we wouldn't have any time left to actually improve Cesium for Unity. If you'd like our help to fix this, I'm afraid you'll have to help us reproduce it. If it's not currently important enough to you to be worth the time investment, that's fine, too.

kring avatar Nov 01 '24 09:11 kring

Thank you, yeah please leave this case open so I may leave potential useful info in the future.

electrum-bowie avatar Nov 01 '24 18:11 electrum-bowie

@kring It happened in the editor too:

Found the log: [2025-11-14 21:21:17.048] [error] [TilesetJsonLoader.cpp:893] Received status code 503 for tile content https://tile.googleapis.com/v1/3dtiles/datasets/CgIYAQ/files/AJVsH2xQuNBpHgUP96IiX-gXe4aH84r73MTpWQR94EzKLbvwIY1WIq7cbjGJFs_NBW19We7b3CvCP9BkpMEd32ywJISGH4tfNn6LjEvcE2AezWJrdh_xA0PKKjuZiZboaEorL5KEvsrL.glb?session=CKri7uLm37Hx2QEQ2fLeyAY&key=AIzaSyDYrg6sSYSjQp4MVhsVtnW5XMCSkHFbIEc

Can be related: #615

electrum-bowie avatar Nov 14 '25 19:11 electrum-bowie

Check the video above for a visual representation of the tile missing issue and ignore the old, bad graphics 😅

electrum-bowie avatar Nov 14 '25 19:11 electrum-bowie

Just in case this is a timeout, if there are any timeout values somewhere within Cesium for Unity or Native’s code please let me know.

electrum-bowie avatar Nov 15 '25 14:11 electrum-bowie