How to do spatial query on 3DTiles?

1.Metadata——A method get Cesium Metadata from 3DTiles on the atricle, We will look at how to retrieve the metadata of a primitive from such a line trace, if any metadata exists, but I want to get the Metadata of 3Dtiles by other means, and then realize the spatial query.


CesiumEncodedMetadata Component does not lead to Get Primitive Metadata, I know it is through Line trace by channel, But I want to use this component to directly obtain the metadata, and then perform a spatial query after the survival online table.

Hello @Crs9charles,

The CesiumEncodedMetadata component doesn’t have the metadata itself, rather it holds the instructions for which metadata to encode for GPU access later. If you need to access the metadata without a line trace, you’ll have to loop through each CesiumGltfComponent in the tileset, and use GetModelMetadata. Once you have the model metadata and the primitive metadata, you will still need either the face ID of the triangle metadata you want to query or the UV coordinates of the pixel metadata you are trying to query. Alternatively, you could just read out all the associated metadata, if that’s useful for some reason.

Let us know more specifically what you are trying to do, we might be able to give you better suggestions!

-Nithin