itowns
itowns copied to clipboard
[Example] Google Photorealistic 3D Tiles
Add an example displaying Google Photorealistic 3D Tiles:
https://cloud.google.com/blog/products/maps-platform/create-immersive-3d-map-experiences-photorealistic-3d-tiles?hl=en https://developers.google.com/maps/documentation/tile/create-renderer?hl=en
I've tried to display these tiles in iTowns, I had to do some workaround but the result is nice and probably worth the integration:
We need to;
- Implement a new
C3DTilesSource
(like what was done withC3DTilesIonSource
). It's necessary to request the Google tiles by giving the API key and sessionId for each call. - Implement a
GLTFParser
and aC3DTGLTFExtension
to handle3DTILES_content_gltf
- Don't forget to
enableDracoLoader
I did a quick test of the implementation but my work is not good enough for a PR, the tiles are not correclty loaded, some faulty behaviors. But I believe that it could be implementable without too much effort.
Faulty loading of tiles:
Cool thanks! Regarding "faulty loading of tiles", it looks like some tiles may be under the ground, we can try to offset each tile a little bit to verify if it's not the cause of the wrong display
You were right, by hiding the globe layer, we can see that the tiles are loaded . Still unstable though.
https://github.com/iTowns/itowns/assets/126568810/07281757-757e-474e-950f-7ee141a8562d
that may come from the bounding boxes that are considered axis aligned while they should not. I'm currently working on that
@jailln perhaps fixing this issue you'll find the reason why Cesium renders sphere boxes more stable than itowns does. Previously it was mentioned in these issues: 1, 2, 3
Useful insights about google tiles querying: https://github.com/CesiumGS/3d-tiles/issues/746