Style terrain with hillshading

Terrain shading (hillshading) enhances natural features such as mountains and ocean floors, making maps more intuitive and visually striking. By simulating how sunlight interacts with terrain, you can create professional 3D effects for any map application purpose, from mountain sports to landscape planning.

Map with and without hillshade

Our Topo map with hillshade (left) and without (right)

Quick start

Many of our maps already contain the hillshading effect, so you can simply pick one of them and use as-is:

If the default hillshading in the map isn’t exactly what you need, you can customize it.

Customize the hillshade

The hillshading has adjustable color, angle, and other properties. Here’s how to customize it in our maps and how to add it to your custom maps:

  1. In your MapTiler account, page Maps, click on the map you want to use. It can be any map including custom.

  2. Under the map preview, click Customize. This opens the map in Map Designer.

  3. Go to menu Layers → block Terrain → layer Hillshade.

    ☝️ If the Terrain block is missing, click the plus button to add a new layer. Search for Terrain RGB and add it to your map.

  4. In the Hillshade panel, adjust the light direction, color, opacity, and shading method. Hover over any setting control to display a mini help and learn what it does.

Hillshade customization

Tips and best practices

Shadow color: Match it to your map’s palette. For example, use deep blues for shadows on dark map variants or soft ochres for a vintage feel.

Light altitude: Controls how high the “sun” is in the sky. A lower altitude creates longer, more dramatic shadows. It also enables you to simulate sunlight at certain times during the day or season. Note that this setting doesn’t work with all hillshading methods.

For advanced users, raw JSON editing provides full control over the settings beyond UI toggles. Use the {} curly brackets button to open the JSON editor.

Please note that not all methods and styling options are available for raster output. If you need rasters rather than styling-friendly vectors, always check the preview and test your map on multiple zoom levels before deploying it.

Use multicolored shading

Example of multidirectional hillshade

Example of multidirectional, multicolored hillshading

While standard hillshading uses a single light source, the multidirectional method adds light from multiple angles and in multiple colors simultaneously.

Multidirectional hillshading method

This special shading method can expose hidden textures that the traditional single-source light might obscure. It’s useful for high-precision geological mapping or high-end artistic cartography.

In the UI, you can only edit four light sources/directions. When you edit the raw JSON {} source file, you can specify as many as you need.

Technical details

Data source

Hillshading is powered by our raster-DEM tileset Terrain RGB. Raster-DEM format encodes elevation data into standard RGB (red-green-blue) values. If you preview the raw Terrain RGB tileset, you’ll see elevated landforms such as mountains, hills, and volcanoes in different color shades. The hillshading settings described on this page allow you to change and customize those shades.

Reference

For full style specification, see the Hillshade layer reference.

Other styling options

You have styled the hillshade but it’s still not “just it”? We have more options in store to help you enhance map terrain, so you can check them out and even combine them for best results. Here’s the overview of all options:

  • Hillshade (this page): Custom color and precise light control, accurate on all zoom levels.
  • Hand-drawn hillshade: Artistic polished look, best for zoom up to 12.
  • Color relief: Elevation visualized using a color range, no shadows.