Quantized-mesh: bounding sphere and horizon occlusion point


I am working on generating some custom terrain, and so far I have been able to create meshes and have them display in the correct locations. I am now encountering a problem ensuring the tiles render at appropriate zoom levels, specifically that tiles disappear when still at a relatively far zoom level. I have read the posts at https://cesiumjs.org/2013/04/25/Horizon-culling/ and https://cesiumjs.org/2013/05/09/Computing-the-horizon-occlusion-point/ and understand how to compute the horizon culling point.

What I am having trouble understanding is how the bounding sphere affects whether the tile is rendered. I was originally using a generic bounding sphere while working with the mesh encoding, which reasonably made all tiles vanish at the same level of zoom. I have since begun using a sphere which should bound the whole tile volume, with the center between the horizontal and vertical edges, and between the minimum and maximum height. However, this seems to be causing the tile to not render at all.

Any direct insight into the issue I am having or links to documentation on how the bounding sphere of a quantized-mesh tile affects rendering would be greatly appreciated.

Thank you


No tricks here, really. The bounding sphere is tested against the view frustum. If the sphere is entirely outside the frustum, then the tile is not rendered. Maybe step through GlobeSurfaceTileProvider.isTileVisible to see if you can spot where it’s going wrong.


I noticed that when the camera goes under the ellipsoid that tiles without mountains disappear, while tiles with mountains remain rendered. This is readily apparent going to Death Valley up against the base of the eastern mountain range. Try it at the southern tip of India and huge chunks of land disappears, everything except the tiles with mountains. They don’t suddenly disappear at 0 height. Far flat tiles start disappearing at around 0.5 meters, medium distance tiles at 0.1 meters height, close ones at 0.005 meters height. So it seems that the only reason these flat tiles are rendered at all is due to not being horizon culled. I was thinking as a solution never let the horizon test go under the ellipsoid even when the camera does.


So, in theory, if all tiles had a bounding sphere with an infinite or very large radius, they would not be culled due to the bounding sphere? I think that may mean my problem is with my horizon occlusion point.

Thanks for the information.