terrain height scale


I have some custom terrain data that displays in Cesium via

var terrainProvider = new Cesium.CesiumTerrainProvider({
  url : ‘http://…/tilesets/terrain/’

I would like to adjust the terrain height scale in the Cesium code. What code can add to my main html to exaggerate the elevations by a multiplicative constant? Or, what would I need to modify in CesiumTerrainProvider.js?

Thanks for your help!


Hello Renee,

Sorry, this functionality isn’t currently supported in Cesium.



Thank you for responding,

I was able to change the terrain height scale by modifying

CesiumTerrainProvider.js line 189
            if (data.format === 'heightmap-1.0') {
                that._heightmapStructure = {
                        heightScale : 15,//1.0 / 5.0,
                        heightOffset : -1000.0,
                        elementsPerHeight : 1,
                        stride : 1,
                        elementMultiplier : 256.0,
                        isBigEndian : false

How do I modify the czml so that geometries and billboards relate to the new height scale?


Susan, we are actually getting ready to add this feature officially to Cesium and it should even be ready by the next release (December 1st).

Unfortunately, CZML doesn’t currently have any way to specify data as being “on terrain”, but that’s also something we are planning on adding in the coming months. We’ll try to remember to come back and update this post when something is ready for you to play with. Until then, you’re only real option for billboards is to either specify the exaggerated heights inside of the CZML file or change them dynamically on the client as needed. There are no good options for geometry as far as CZML is concerned, but like I said, we are working on it.

Matthew, Thank you for this upcoming new feature. I look forward to it. I implemented the exaggerated heights inside the CZML points and billboards, just as you suggested and it does work. Great work on Cesium,

Susan Renee