how to generate 3D terrain for offline service?
Depends on your needs, really. How detailed? How many scale levels? At what resolution? How big? Global? Local? How accurate? How precise? Gravity calibrated? How recent? How often do you need it updated? What will you do with it? What’s it for? Visuals? Hobbyists? Professinals?
a method for visualizing geotiffs as terrain in Cesium https://bertt.wordpress.com/2018/11/26/visualizing-terrains-with-cesium-ii/