Need help about Point Cloud pnts

Hi all,

I’m new in Cesium so sorry for my bad question.

My application need to render a lot of point in 3D map. (~ 100 m points at a time).

I have tried some ways and found that point cloud (pnts) may be fit my expectation about performance and memory.

I have read the document at https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/TileFormats/PointCloud.

But I dont understand what featureTable, batchTable are?

Follow the link https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/TileFormats/FeatureTable/README.md

I see that the featureTable has 2 parts: json, and binary. But in the example https://github.com/mattshax/cesium_pnt_generator/blob/master/RTC.js, I don’t see it.

I also see that it create a tileset.json, but I don’t know what it purpose?

Could you please help to explain how to create a pnts in details?

Thanks.

Hi Tan,

A quick breakdown of what the feature table is and what the batch table is

  • Feature Table - stores per-point information like positions and colors as well as global information like number of points
  • Batch Table - stores per-point metadata. If your source data has additional properties like intensity they would go in here. The batch table is completely optional.
    Both are composed of a JSON section describing what is contained in the binary section, include property names and byte offsets.

The RTC.js file you linked is writing to an older version of the format that did not contain a feature table or batch table. That version doesn’t load in Cesium anymore so I wouldn’t use it as a reference.

The tileset.json describes a spatial hierarchy of tiles. It allows the runtime to efficiently cull tiles that are not visible or shouldn’t be rendered because they are too far away. A dataset of 100m points will need to be broken up into separate tiles for sure. Often an octree tiling scheme is used for point clouds.

I hope this helps, let you me know if you have any more questions.

Hi Sean,
Thanks for your support.

I know that batchTable is optional now. But I still confused about its purpose. I have some questions:

  • In case I want to use batchTable to store more data, so its size should equal to featureTable size, right? It matches one by one points with featureTable, right?
  • I want to create a multi-parts point cloud. Assume I have 3 tyle of point: (red point, green point, and blue point). When rendering point cloud, based on the conditional (such as user choice in UI), it will display only red points only or display all points. As my case, should I use batchTable?
    Could you please help give me advise.

Thanks.

Yeah, the batch table is in the same order as the feature table.

For your example a batch table would make sense, yeah. You would make a property in the batch table that says what type of point it is. For example the property might be named “Type” and the values would be either 0, 1, or 2. That data itself would be stored in the batch table binary.

Then in the app you could write a style that only shows points whose type is 0 (red). It might look like:

tileset.style = new Cesium.Cesium3DTileStyle({

show : “${Type} === 0”

});

Thank you so much.
I understand it now.

Thanks.