Cesium height rendering issue - Pointcloud


Is there a way to specify the height parameter of the pointcloud when using the following call:

new Cesium.Cesium3DTileset({
    url: Cesium.IonResource.fromAssetId

So that we can adjust the point cloud height to show up barely above water. Otherwise most of them are flying high in air (as in the left side of attached image). We have hundreds of point clouds on the ION and I’m not sure what is the best way to bring them down to water level (as in the right side image). But, if there is JS API that lets us that do dynamically when rendered on the browser then that will be helpful. Or if there is modify JS API call (like the file upload JS API call), which can reset the height parameter only, that could also work.



Q. Iqbal

You can adjust the height of a tileset dynamically by setting its model matrix. See the 3D Tiles Adjust Height Sandcastle.

Perfect! Really seems to work very well on a few samples that I tried. Let me try more. Thanks a lot. Especially for the fast response and also on the weekend! Appreciate that.

An interesting thing is that we did not use the location parameter during the JS API call to upload our LAZ’s - geolocation was embedded into LAZ. And, it appears that Cesium picked up the height parameter shown in the console from the min Z values in the xyz values in the LAZ. I haven’t fully understood the meaning of the height parameter in the console. In our LAZ file the min Z = 170 and Cesium makes the tileset height parameter also 170 during upload. Does that mean the point cloud will be rendered at a height of 170 + 170 = 340? Could that be the reason the point cloud was flying high in the air? Or may be I’m missing out the meaning of the height parameter entirely?

At first I tried -170 in the offset parameter of the model matrix for the height to bring the point cloud down. Which seems to work as noted above. But, then I switched to -cartographic.height (notice the minus sign) as I noticed that this value was different from 170 for some of the files. Is that the right way to approach bringing the point cloud at the water level?

Thanks again.

Here it is after height adjustment in the attached image.

The ion UI shows the longitude/latitude/height of the tileset as it’s currently being displayed on the globe. It’s not additive (e.g. not 170 + 170).

As for why it’s floating, there could be two reasons:

  1. If terrain is turned off the tileset will appear to be floating 170 meters above the ellipsoid. If terrain is turned on it should line up better.
  2. The data could be missing a vertical datum. E.g. the heights might be relative to MSL but without that information the tiler would treat heights as relative to ellipsoid.