How to filter 3D tiles by group defined in 3DTILES_metadata Extension or 3dtiles 1.1?

Hi, when I read the 3D tiles specification, I knew about the “group” in metadata. It is mentioned that 3D tiles can be fitered by group, but I didn’t find the relevant code and API to realize this function. So does anyone have an example or tell me how to do it.
Thanks.:slightly_smiling_face:

The MetadataGranularities sample defines some “dummy” metadata that could be sufficient for a first example here: It defines two “groups”, one for the houses and one for the trees. The group metadata has a priority property (that doesn’t really have any meaning, but again, could be OK for the demo). Based on the value of this priority, you can put the contents into different sets, and select which elements should be rendered:

Cesium Group Rendering

When you serve this tileset from a local server (as described in the instructions), then you can use the following sandcastle to toggle the visibility of the groups:

(Updated 2023-10-21 for new CesiumJS async API:)

The implementation there is not the most elegant or generic one, but should be sufficient to show the basic approach.