3D tiles point cloud feature picking

This is going to be a loaded post, so here goes.

I'm investigating Cesium's capabilities for rendering large LIDAR datasets. I'm using PDAL to do some preprocessing and Entwine to generate the 3D tile hierarchy. I've made some modifications to Entwine to output the batch table data and my review of the output appears correct*1. However when I review the sandcastle examples for feature picking from tilesets or use my own tilesets, only the b3dm return the correct types listed in the documentation. For point clouds, I get an anonymous object with a different set of properties.

What I'm aiming to do is create declarative styling like the sandcastle 3D point cloud styling example, and store additional per-point data to lookup on the server.

My question is: am I looking at bleeding edge changes in Cesium that are incomplete (yes I know it's a branch and inherently unstable/incomplete), is the documentation incomplete, or am I doing something incorrect?

Here's what my investigation has found.

Sandcastle 3D Point cloud styling example, selecting a point returns:

Object {

Sandbox 3D Tiles example, with the Tileset example selected, selecting a building returns:

Cesium3DTileFeature {

The documentation (from 3d-tiles branch: Build/Documentation/Cesium3DTileFeature.html) has sample code that uses ScreenSpaceEventHandler.setInputAction -> scene.pick(movement.endPosition)*2, which gives the same result as using a Cesium3DTilesInspectorViewModel.feature. Both of these return the results I see above; the documented behaviour when viewing a b3dm tileset (from 3d-tiles branch: Build/Documentation/Cesium3DTilesInspectorViewModel.html?classFilter=inspector, feature property indicates a Cesium3DTileFeature type), and undocumented behaviour when using a point cloud tileset.

The readme on per point properties (https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/TileFormats/PointCloud#per-point-properties) states "If the BATCH_ID semantic is not defined, then the batch table stores per-point metadata, and the length of the Batch Table arrays will equal POINTS_LENGTH."

Viewing the readme for batch table (https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/TileFormats/BatchTable/README.md) indicates it does everything I need it to, include support for point clouds (pnts). However only the b3dm tileset feature contains a reference to the batch table, and the point cloud tileset feature does not. There is also sample code in the same readme for extracting the batch data out. I haven't been able to get this far even with the example point cloud styling dataset which has a batch table containing "temperature" since the objects are not what I'm expecting. Apart from that, the declarative styling works for the point cloud with temperature data.

*1 [I don't seem to be able to validate my own tilesets out of my modified Entwine as the 3d-tiles-tools repo (https://github.com/AnalyticalGraphicsInc/3d-tiles-tools) appears to have an empty validator/bin/3d-tiles-validator.js. Assuming the issue register is up-to-date, https://github.com/AnalyticalGraphicsInc/3d-tiles-tools/issues/5 would indicate validation is far from complete.]

*2 [which appears incorrect as the movement object only has the position property in my build of 3d-tiles HEAD]

Right now the Cesium engine has two different backends for point clouds. For batched point clouds - like PointCloudBatched in the 3D Tiles Sandcastle dropdown - the normal batch table is used and you will see identical behavior as the b3dm tilesets.

For all other point clouds, aka those that store per-point properties, a shader backend is used and all point properties are stored in GPU memory only. We figured it was impractical to create a Cesium3DTileFeature for every single point, so you will not see the same type of object when doing a pick. Instead the pick object is just the point cloud as a whole. Therefore it is not currently possible to set or get a point’s color, show, or any of its properties. Doing so would require a CPU-GPU transfer that we just haven’t gotten around to yet. This also means styling is basically limited to the properties packed with the pnts tile, it sounds like your use case goes beyond this.

  1. Yes, the validator is still a ways to go.

  2. When using the MOUSE_MOVE event the endPosition property is used, for other events like LEFT_CLICK it is position

Side note: The color property in the pick object shouldn’t actually be there, that is a bug which seems to be a side effect of using the 3D Tiles inspector. We’ll have a fix for that.

Picking was fixed in #5081.


Yeah, just that small note at the end. Hopefully we’ll have a chance to look into the bigger changes require here.

Hi, may I ask if the newest release of Cesium has implemented the CPU-GPU transfer?
I wonder if now there is a way to pick a single point from a packed pnts file and to show its xyz or color information?

We are working on the use cases to measure the distance between 2 selected points.

Thanks a lot :slight_smile:

As of now, getting a point’s color via a pick is still not possible. However you can get a point’s world-space position with scene.pickPosition.

pickPosition wont give you the exact location on the point :(. Has anyone achieved this?

See my question in this thread: https://groups.google.com/d/msg/cesium-dev/O988-WDy82I/gkcma8krDAAJ