Tileset polygon count

How would I go about doing a polygon count for a specific LOD of a tileset?

I know CesiumJS has the ability to show the number of polygons it’s rendering, but I’m not looking for just the rendered polygons.


I think you’d need to traverse the tree and find all tiles at a certain level, parse those b3dms/i3dms, and count the number of vertices in each.

I think the reason there isn’t an easier built-in way to do this is because in 3D Tiles you generally never see a single LOD of the entire tileset in any one view.

Thanks for the reply Omar.

The traversing of the tree is not an issue.
Any thoughts on how to parse the b3dms and count the verticies?
Is there a built-in function in CesiumJS for that?

Yeah, you’ll have to dig into the source code a bit. This class is what can take and parse a b3dm to extract the glTF: https://github.com/CesiumGS/cesium/blob/master/Source/Scene/Batched3DModel3DTileContent.js.

Here is where it gets called as the tiles load in: