Google Photorealistic 3D tiles root connections question(s)

Hi Community,

Can someone explain a little bit more how Cesium handles the root tile connections ?

From the Google documentation we can read

“After obtaining your API key, you can begin accessing photorealistic tiles by specifying a root tileset URL to a 3D Tiles renderer of your choice. After that, all subsequent calls for photorealistic tiles are automatically made by the renderer as the end user explores the map. The render can make at least three hours of tile requests from a single root tileset request. After reaching this limit, you must make another root tileset request.”

How can we verify how and when Cesium is handling the root tile requests?

Especially on iOS mobile, where the memory fills up very quickly when you change camera or when you “fly around”. To reset the memory we call CesiumForUnity.Cesium3DTileset.RecreateTileset();
Does this call creates a new root tiles request ?

Please inform us about this. We are trying to figure out what the cost would be per viewer.

Thanks !

Claude

Hi @Claude_V,

I believe that we cache the initial root requests, so any subsequent requests from the viewer will use the same session (within the three hour window). But I’ll tag @Kevin_Ring so he can give a more confident answer. :smile:

What Janine wrote is true for Cesium ion, but unfortunately I don’t think it is for Google Photorealistic 3D Tiles. We don’t have special handling for Google in particular, we just honor the caching headers that Google provides. And the Google root tile response has these headers in my quick test just now:

Cache-Control: private, max-age=0, must-revalidate, no-transform
Pragma: no-cache

So this response will not be cached, and each refresh will grab it again. So, I believe each refresh will count as a new “root tile request” for Google quota purposes.

I don’t think there’s much we can do about this, other than address Memory leak when using external tilesets. · Issue #739 · CesiumGS/cesium-native · GitHub so that you don’t have to refresh so often.

1 Like

Understood.

I isolated a specific google maps key that I have not used before, and
I ran a test on Unity - Windows of a travelling camera at 10Kmh for 1hour, with some camera changes (3rd person view, top view, …) and when I check google billing it looks like I was billed 6 root tile connections. When I checked Cesium Ion usage logs I also saw 6 connections.

Is there a way to understand what triggers exactly the root tile connection, so we can design the software to be optimized for this purpose ? Maybe some OnTileRootConnection() ?

Debugging using the Cesium Ion stats and Google Billing is pretty hard because they both deliver the data about 10-24hours late.

Thanks for the help! (also a big thank you for the quick fix on the height calculation !)

A new root tile request will be initiated each time Cesium3DTileset’s RecreateTileset is called. This will happen:

  1. When the Editor first displays a tileset,
  2. When properties of the Cesium3DTileset are changed, requiring it to be recreated.
  3. When entering Play-in-Editor mode.
  4. On AppDomain reload (i.e., when editing scripts in the Editor)
  5. When you call this method explicitly.

I think those should be the only cases.