Water Mask and .terrain files

I have a need to run everything locally.
Atm I am running a geoserver and a terrain provider server.
I am using this terrain provider server: GitHub - geo-data/cesium-terrain-server: A basic server for serving up filesystem based tilesets representing Cesium.js terrain models
I have generated all the tiles using GitHub - tum-gis/cesium-terrain-builder-docker: Dockerfile for the geo-data/cesium-terrain-builder app with quantized mesh support.
The problem I have is that I need to generate a water mask or at least be able to emulate a water surface. As I will be displaying ships traveling from different harbours - and I don’t want them floating in mid air. I would also like to keep my bathymetry data and not just zero it out.

How would I be able to solve this? Once again, everything has to be able to run locally and I cannot upload my bathymetry data files to a third party server.

It leaves me thinking:

  1. Just generate a huge globe around the earth which would be the water.
  2. Using python and struct edit the .terrain files generated by cesium-terrain-builder-docker, which is a tricky and decently huge undertaking.

Are there any other ways I could solve this? Either in the JS used to display, or in C++ for the terrain builder?
Any who, been fiddeling around with this software much less than most of you guys so would appreciate if you could share some knowledge on how you solved water masks or emulate a water mask.

Hi @Maximilian, welcome to the community!

The water mask is usually generated at the same time as the tiles. If the tile server provides water masks, then you can use them in the terrain provider by setting the requestWaterMask flag in the CesiumTerrainProvider constructor.

If you are using cesium-terrain-builder to generate the tiles, you will need to reach out to the maintainers about their support for water masks—this tool is not a Cesium product, so I can’t comment on it.

Alternatively, Cesium’s own Terrain Tiler (a paid product) can compute the water mask for you. All of our tilers can be run on-premises if you need to keep your data local.