Why do this?
The shaded relief images (also often called a hillshade) that GIS software produces are pretty good. Here’s one made with QGIS.
Hillshading algorithms typically take three parameters: the elevation of the sun, the azimuth (direction) of the sun, and the vertical exaggeration of the landscape. (60°, 337° and 1X, in this case.) They do some geometrical calculations to figure out the intensity of incident light on all the pieces of the landscape, and then produce a greyscale image. (They do not, typically, however, calculate actual thrown shadows.)
You can tweak the brightness and contrast in your GIS software, or stretch the histogram to your liking. This can do a lot to lighten up the darkest shadows, or to turn the hillshade into a ghostly wash that merely suggests relief without dominating everything else on the map.
Much of the time what we can get out of GIS software meets our needs for a hillshade, which, after all, is not the final map but a merely a layer of the map. (Although occasionally it is the pièce de résistance…)
But perhaps you don’t like the glossy, shiny quality of that hillshade above. You think the mountains look like they were extruded in plastic. They remind you a little too much of Google maps Terrain layer. Maybe you’d like to see actual shadows thrown by precipitous cliffs. Maybe you’d like something that looks more like it was chisled from stone, like this…
Or perhaps you are interested in…
This might be why you are investigating Blender.
The big settings that make a difference (besides the conventional settings of azimuth, elevation and vertical exaggeration) are…
- multiple lights and their colours
- amount of light bounce
- denoising the render
In animation modelling, Material is what reflects, absorbs and scatters light. Blender spends much of its time tracing light rays and deciding how the surfaces they encounter affect them.
With your plane selected, go to the Material tab and hit New. The default material that comes up has these Surface properties. (And this is what Blender used for your basic render.)
Principled BSDF is a sort of super-versatile material that allows you to have all of these properties (subsurface scattering, metallic look, sheen, transmission of light) that in earlier versions of Blender were assigned to specific surface types, like “Diffuse BSDF,” “Glossy BSDF” or “Subsurface scattering.”
(BSDF stands for “bidirectional scattering distribution function.”)
These various surfaces are actually shaders, which are pieces of software that render the appearance of things (and may actually run on your GPU, not your CPU). If you click on “Principled BSDF” next to the word “Surface” a list of all of the possible shaders comes up.
You can learn a lot more about shaders in the Blender manual, but Blender essentially wants to give you the tools to be able to simulate any material, from water to hair, and some of the effects you can get applying this to shaded relief are pretty weird.
The main shader you probably want to play with is the Mix Shader, which allows you to mix the effects of two different shaders. The Mix Shader’s factor (from 0 to 1) determines how much the results are influenced by the second shader.
The other aspect of material that is worth experimenting with is value. Blender’s default material, the Principled BSDF, has a default colour of near-white, and its value is 0.906 (on a scale of 0 to 1).
By darkening this you create a more light-absorbing material.
You might think that the effect of a darker material is just to shift the distribution of pixel values down in the render, and that you could get the same effect by turning down the brightness of the original. But if you look at the histogram of each image you see the pixel values are distributed differently, and even when both are displayed with “histogram stretch,” they are distinct from each other.
And of course if it works for your map you can give the material real colour. (Don’t forget to save the render as RGB rather than BW). This, however, is very similar to colorizing your shaded relief in GIS software.
Multiple lights and their colours
To add another light to your scene, go Add>Light>Sun. You can also experiment with adding other types of lights: point lights (which shine in all directions from a specific place), spot lights (which send out a specific cone of light) and area lights.
A second light can bring out features in a very nice way.
By giving colour to lights, you can create differential lighting and colour.
There is one more light in your scene that often goes unnoticed, and this is what Bender called the world background colour. You can think of this as a very far away surface that nonetheless does contribute a bit of light to your scene—from all directions. You can see the world colour in action if you render your scene with the sun strength turned down to 0.
If there are places in your scene that sunlight does not reach, the world background still contributes to their illumination—and colour.
By default the word background colour is 25% grey (value = 0.25), but you can change this to a dark blue if you would like dark blue light to collect in your shadows.
Amount of light bounce
Part of the charm of Blender is that it calculates how much light reflects off surfaces and then hits other surfaces, which is why even shadowed areas have some light. You can control, however, the number of bounces a light ray has before it expires. This is on the Render tab, in the Light Paths section.
By default, the light paths settings are as above. With the material I am using, the Max Bounces for Diffuse materials is the important part, and by default it is 4.
The icon to the right of “Light Paths” indicates that there are presets available. Clicking here reveals three key presets:
- Direct Light: light gets few bounces, and none off diffuse material
- Limited Global Illumination: light gets one bounce off diffuse material
- Full Global Illumination: light gets 128 bounces off diffuse material
Changing among these does not make a huge difference, but in scenes with deep shadows it is visible.
Denoising the render
Blender offers the post-processing feature of denoising the render. I liken this to a blanket of snow on your landscape: it erases tiny details.
To activate denoising, go to the View Layer tab, scroll to the very last section, Denoising, and check the Denoising box.
I do not find that denoising does much if you keep the default settings. I tend to turn both Strength and Feature Strength up to 1.0.
This is only been the tip of the iceberg. Some things I have not talked about are
- Applying a subdivision surface modifier to your mesh so that Blender is interpolating and smoothing it on the fly.
- BlenderGIS’s ability to read your DEM As DEM Texture, which creates a plane with subdivision and displace modifiers instead of a plane whose every vertex corresponds to a DEM cell.
- How to focus the orthographic camera down on one small part of your DEM where you can do quick test renders while you work out lighting, material, etc.
- The node editor for complex materials
- Using a perspective camera to shoot a scene that is not straight down
- Cutting DEMs into tiles for Blender to work with, when the whole DEM is simply too much for the RAM on your computer.
Have fun exploring Blender’s many features!