How to get Cesium Tile Zoom/X/Y identifiers

My end goal would be to be able to calculate back from a raycast of the mouse to the texel in the original 2D tile texture.

Using Cesium in Unity. Using basic Bing 3D Tileset and the basic supplied Bing textures
I would like to know the TileMatrix, TileCol and TileRow which was used to as texture on the selected object.

My aim is to figure out exactly which texel of which Tile has been hit with a RayCastHit.

The objects parent name holds numbers that look like these coordinates but they are not exact as there are multiple with the same numbers. There are also L: X: Y: which seem to be a “upsampled” version. I could match the X but again I could not match the Y. Which is not using the google tile numbering.

I did not know but while testing I noticed that the 3D meshes (Bing but also MapTiler) do not match the exact 2D Tile-textures.
In my test the original Tiles are 512x512 and inside Unity the texture is 512x605. It a combination of multiple 2D tile images (on the Y axis) on the X axis it seems to be exactly the same.

The obtained recast UV is the UV inside the cesium created texture.

Two questions here:

  1. Is there a formula to calculate the original texture tile Zoom, X, Y from the L: X: Y: ?
  2. Is there a formula to calculate from the cesium used textures the UV’s back to the original texture tile ?

Hi @Claude_Verstraeten,

This information is not currently available. The L/X/Y you see refers to the terrain tile numbering, not the raster overlay numbering. Because Cesium World Terrain and Bing Maps use different projections, this numbering is not the same. Furthermore, as you observed, a given terrain tile can and will have multiple Bing tiles mapped to it, combined into a single texture.