TerrainMaterial
TerrainMaterial holds the render options for a terrain layer’s mesh. It is set via the terrain key and applies regardless of the source’s data format — raster-dem (RGB-encoded elevation) or quantized-mesh. All fetch/geometry config (zoom range, tiling scheme, elevation decoder, extensions, token) lives on the referenced source, not here.
Properties
Section titled “Properties”Type: boolean | undefined — Default: true
Description: Whether to show the terrain.
{ terrain: { show: true } }castShadow
Section titled “castShadow”Type: boolean | undefined — Default: false
Description: Whether the terrain casts shadows.
{ terrain: { castShadow: true } }receiveShadow
Section titled “receiveShadow”Type: boolean | undefined — Default: false
Description: Whether the terrain receives shadows.
{ terrain: { receiveShadow: true } }showBoundingBox
Section titled “showBoundingBox”Type: boolean | undefined — Default: false
Description: Whether to show per-tile bounding boxes. Used for debugging.
{ terrain: { showBoundingBox: true } }Type: boolean | undefined — Default: true
Description: Whether to render skirts along tile boundaries to hide gaps between neighboring tiles at different LODs. Disable this if you want to visualize underground models.
{ terrain: { skirt: true } }skirtExaggeration
Section titled “skirtExaggeration”Type: number | undefined — Default: 1.0
Description: Multiplier applied to the auto-calculated skirt height. 1.0 uses the default calculated height.
{ terrain: { skirtExaggeration: 1.5 } }Combining with other layers
Section titled “Combining with other layers”A terrain layer provides only the 3D surface. Drape imagery or shaded relief on top with a raster layer:
| Over terrain | Supported | Notes |
|---|---|---|
raster (imagery) | ✅ Yes | Raster imagery is reprojected and draped onto the mesh. Multiple can be stacked. |
raster (hillshade) | ✅ Yes | Shaded relief computed from DEM tiles, rendered over the 3D surface. |
vector (vector tiles) | ❌ Not yet | Vector tiles cannot currently be draped onto quantized-mesh terrain. |
Related Resources
Section titled “Related Resources”- Terrain Layer — how to use this material
- Raster DEM Source / Quantized Mesh Source — terrain data sources
- CesiumIonPlugin — Cesium Ion quantized-mesh assets