Accessing mesh information

Is there any way to read the underlying mesh data for the displayed 3d tilesets in a scene. As in to read out the mesh vertices and perhaps even the mesh normals.


CesiumJS doesn’t currently expose this in the public API. Can you tell me a bit about your use case? You might be able to do what you need with the 3D Tiles styling language.

I’m trying to do line of sight/occlusion tests as a basis for various daylight and sky-view tests. Basically I have a bunch of code already that can do the analysis I want on triangulated meshes and I was hoping I could somehow read a cesium scene into these function and run the analyses.


The problem with that approach is that if the geometry is very large or very detailed (which it presumably is, otherwise you probably need to have it as 3D Tiles in the first place), then it may be computationally infeasible to do this in realtime. We do have an analytics SDK built on top of CesiumJS to add line of sight and visibility calculations like that, which shifts that work to the GPU:

The ion SDK is currently available as an on-premise product (you can request an evaluation for it at the bottom of that page), and we’re working on putting it on the Cesium ion platform so it’s more accessible.

With that said, if you do still want to try to get at the model, what you’d need to do is get the tile content (either by picking or by traversing the tree), and then you’d have to access this private variable:

The model class stores the geometry as buffers, so that might take some work to read into a representation you need: