itowns icon indicating copy to clipboard operation
itowns copied to clipboard

[Example] Google Photorealistic 3D Tiles

Open jailln opened this issue 1 year ago • 6 comments

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

jailln avatar May 22 '23 12:05 jailln

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: Screenshot from 2023-05-31 09-53-03 We need to;

  • Implement a new C3DTilesSource (like what was done with C3DTilesIonSource). It's necessary to request the Google tiles by giving the API key and sessionId for each call.
  • Implement a GLTFParser and a C3DTGLTFExtension to handle 3DTILES_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: Screenshot from 2023-05-31 10-16-13 Screenshot from 2023-05-31 10-15-54

AnthonyGlt avatar May 31 '23 08:05 AnthonyGlt

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

jailln avatar May 31 '23 08:05 jailln

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

AnthonyGlt avatar May 31 '23 10:05 AnthonyGlt

that may come from the bounding boxes that are considered axis aligned while they should not. I'm currently working on that

jailln avatar May 31 '23 11:05 jailln

@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

alexLuky avatar May 31 '23 14:05 alexLuky

Useful insights about google tiles querying: https://github.com/CesiumGS/3d-tiles/issues/746

jailln avatar Jun 13 '23 07:06 jailln