Here's a recipe I use for topographic relief maps. Here, I'm using Ordnance Survey Opendata. As well as the usual hillshading, it lightens ridges and darkens valleys to give a better feel for the terrain.
For this recipe you'll need QGIS and SAGA GIS.
The problems with hillshades
GIS hillshades are limited as they usually only work with incident light. In other words, once the virtual light 'hits' the surface, it stops.
Real life isn't like that. Some light is reflected and scattered. The side in shadow isn't black, it's lit by diffuse light from the sky and light bouncing off from the surrounding ground.
Hillshading is done from a single direction. This means we get more contrast on features (such as fissures, streams or ridges) which are at right angles to the lighting source. Those features running parallel to the light source can get washed out.
There is a option called "Ambient Occlusion" in SAGA's "Analytical Hillshading" module (Terrain Analysis > Lighting > Analytical hillshading) . This produces much softer, smoother results. However, it's very slow - it took about 1 hour on a 2000x2000 raster with default settings.
Generate topographic openness
To get around this, I use SAGA to create a topographic openness raster from the original DEM (Terrain Analysis > Lighting > Topographic Openness). This filter creates two outputs, Positive and Negative openness. It measures how 'open' or 'closed' the terrain is. Peaks and ridges are very open; valley bottoms are less open, and fissures and streams are least open.
These are saved to a geotiff using File > GDAL/OGR > GDAL: Export to Geotiff. You can save time by saving both layers to one geotiff, but in different bands...
The following image shows the Positive Openness, rendered as greyscale. Note how the ridges and peaks are brighter, the valleys darker. Also, note the effect around cliffs.
Generate the hillshade
There are several ways to create a hillshade in QGIS, if you have GRASS and SAGA installed too:-
- GDAL hillshade (Raster > Analysis > DEM, select hillshade)
- GRASS via the processing plugin (r.shaded.relief)
- SAGA via the processing plugin
All of these give pretty much identical results, given the same settings (for vertical exaggeration, azimuth and height). SAGA's 'combined' and 'ambient occlusion' do give different results, though.
I used these settings...
- azimuth 315
- altitude 45
- vertical exaggeration 4
Compositing the layers in QGIS
Start with the original DEM as the bottom layer. Here, I used the cpt-city ramp called "sd-a", and tweaked it to colour the sea blue.
Above this, add the hillshade layer. Make sure you calculate the global min/max, 'Stretch to min/max' and choose 'Black to white' (you may need to use 'White to black' depending on which tool you used to create the hillshade).
The hillshade layer is set up to 50% transparency, "Multiply" blend mode.
On the highest layer, import the topographic openness layer you exported from SAGA. QGIS will identify this as a multiband raster and you will see some really garish colouring!
To fix this, just use properties and change it to 'Singleband gray', and choose 'band 1 (grey)' as the source. Find the min/max and stretch and clip as before.
Then set the transparency to 24%, blending mode Normal.
Credits / Acknowledgements
DEM data from Ordnance Survey (OS), crown copyright and database rights 2015