Hi all,
Please, I was wondering if each 3D tile (Google Photorealistic) can be identified with an unique ID (or any other unique identifier), within a given LOD, in Unreal. (Please, move this thread if this is not the appropiate section).
For example, if I have a limited region, observed from a distant and fixed camera, I will see 2 tiles at a given LOD (let’s say LOD3 given the pixel size, as a example). Those tiles might have the ID 537 and 538. If I enlarge the masked area, it would show 4 tiles, and I would want to still have the IDs 537 and 538 associated within the same previous tiles they were.
For now, in the tests I have done, the IDs are “reseted” and not associated with the same tiles.
Thank you and best regards!
There is no built-in concept of a unique ID for each tile in 3D Tiles itself.
The closest thing would probably be the content.uri of a tile. Of course, this has caveats: A tile could have multiple contents objects, with different IDs. The same content uri could appear in multiple tiles. This will usually not be the case for the Google Photorealistic 3D Tiles. But these, in turn, have another small caveat, namely, that their uri is unspecified and could change at any point in time.
Depending on the exact goal that you have, there might be solutions or approaches for resolving that.
In CesiumJS, you could (in theory, and even though it might be ‘hacky’) simply assign some tile.myIdentifier = counter++; to each loaded tile. You mentioned Cesium For Unreal, and I’m not sure whether something similar is possible there. It might be worth opening a dedicated thread in the Cesium For Unreal section, with a clear description of the goal and use-case. (Maybe including more technical information - for example, about how “persistent” these IDs should be - e.g. whether you’d expect the same ID when loading the tileset after closing and reopening the application…). Maybe someone knows how to accomplish the goal (with or without actual IDs).
An aside: On the producing side, there is the option to assign metadata to the tiles. And the metadata may include a unique ID, which has a predefined semantic via 3d-tiles/specification/Metadata/Semantics/README.adoc at main · CesiumGS/3d-tiles · GitHub . But Google Photorealistic 3D Tiles does not contain such metadata.
There is an ID for every tile. However, there are some caveats. For one, you will need to modify Cesium for Unreal to get access to it. The value is obtained from the Cesium3DTilesSelection::Tile instance, like seen here. A pointer to the Tile is stored on the UCesiumGltfComponent (in pTile), the component that is placed on every tile in the scene, but this component is private so you’ll need to modify Cesium for Unreal to get access to it and its fields. For two, you can’t be sure about what the tile ID actually is. This bit on the ref doc sums it up pretty well. Because there is no “id” field in 3D Tiles - as Marco mentioned - there are various possible tile IDs that are chosen from depending on how the tileset is set up, with the URL of the tile’s content chosen as the backup answer. That is to say, it’s not guaranteed that the tile ID will make any sense.
I’d assume that when there are two implicit tilesets within one tileset, then the same QuadtreeTileID would appear twice in one tileset, limiting the applicability of this as a true identifier.
But 1. multiple implicit tilesets in one tileset are probably rare (and the task to create examples for this is on my TODO list, because I assume that this could reveal all sorts of corner case issues in Cesium forUnreal/JS), and 2. the exact role, usage pattern, and scope for these IDs may have to be clarified.
FWIW, in the 3D Tiles Validator, it is important to say which tile exactly contains an error. So this maintains a path to identify the tile, as in
/root/children/1/children/2/children/0/at[5][3,2,4]
with the last part being the implicit coordinates. This is probably the only way to generate really unique IDs - at least, within a single (!) tileset - but wouldn’t make much sense for a general runtime engine.
I believe this is correct. This will not be a foolproof strategy for getting a completely unique ID of a tile across all possible tilesets. However, it might work for Google Photorealistic 3D Tiles in this case.
Hey,
You can’t rely on a fixed ID for each 3D tile in Google Photorealistic data in Unreal. The IDs change whenever the view or level of detail changes, so they aren’t consistent. A better approach is to use the tile’s location, like its coordinates, or create your own ID based on that. This way, you can still track the same area even if the system changes the tile IDs.
I hope this will help. 