A description of how to get the most our of Blend Modes in QGIS software. The talk shows what each of the blend modes does, and how to apply them to improve choropleth maps, bi-variate and tri-variate maps, hill shades, label halos and to show data densities.
50. density
• Marker size or line thickness
• Scale or distribution of
features
• Intensity of the blend mode
• Brightness or Saturation of
the start colour
Good afternoon, my name is Tom Armitage and I ramble about doing data visualisation and a few other things in QGIS at learnGIS.uk
Some of you may remember I talked about blend modes and draw effects and possibly a bit too much about star wars at FOSS4G UK last year.
This is a follow up talk to that one because
I spent a long time introducing blend modes and draw effects and at the end I showed this homage to John Nelson’s firefly map.
Lovely isn’t it.
But it really is nearly all the work of the draw effects, it is just brought together by a lighten blend mode at the end.
So I wrote this talk to do a little more justice to blend modes…
Back in 2013 it was a dark time for QGIS not many people were using it but since version 1.8 the software was really pretty good.
Then a young Jedi developer called Nyall Dawson, from the remote part of the planet known as Australia made his first major commit to QGIS.
Blend Modes had been added to QGIS and from the first time I used them I was hooked! QGIS became my go to GIS.
This is a story of how to use blend modes in a range of different ways, not just to make fancy Lightsaber maps.
So, who has used blend modes in their map? For those that haven’t when you have several layers on a map you generally want to see them at the same time and normally you’d reach for the transparency slider and get this: Click:
Blend modes are the secret sauce that produce a map like this: Click
Geology data shows its colours more truly the hill shading adds pop, without dulling the flatter areas of the map.
Geology maps were the first maps I made using a blend mode. The colours leap out even though the topography is still there in the background. It was this that got me hooked, this and the one click greyscaling of Ordnance Survey’s Colour Raster data. I mean even MapInfo has had that for over 10 years!
So, who has used blend modes in their map? For those that haven’t when you have several layers on a map you generally want to see them at the same time and normally you’d reach for the transparency slider and get this: Click:
Blend modes are the secret sauce that produce a map like this: Click
Geology data shows its colours more truly the hill shading adds pop, without dulling the flatter areas of the map.
Geology maps were the first maps I made using a blend mode. The colours leap out even though the topography is still there in the background. It was this that got me hooked, this and the one click greyscaling of Ordnance Survey’s Colour Raster data. I mean even MapInfo has had that for over 10 years!
So, who has used blend modes in their map? For those that haven’t when you have several layers on a map you generally want to see them at the same time and normally you’d reach for the transparency slider and get this: Click:
Blend modes are the secret sauce that produce a map like this: Click
Geology data shows its colours more truly the hill shading adds pop, without dulling the flatter areas of the map.
Geology maps were the first maps I made using a blend mode. The colours leap out even though the topography is still there in the background. It was this that got me hooked, this and the one click greyscaling of Ordnance Survey’s Colour Raster data. I mean even MapInfo has had that for over 10 years!
The reason I chose Geology maps as an example is because they are very colourful and transparency really dull them down, and with some geology maps having many colours that look similar you really do need to be able to distinguish them. Geology print maps are actually made by taking an OS map and removing the colour separations made for printing leaving only the black. The geology colours are then added leaving the black to lighten and darken in the right places, much the same way as the multiply blend mode used here does.
I love blend modes, but I must admit I had no idea what they actually are.
There are currently 12 blend modes in QGIS divided into 4 groups.
They all work on different elements of the colours you use: saturation, hue or the amount of black/white.
I wanted to know more so I did a little experiment.
I put together a matrix of colours and shades see what they all did.
Firstly the lighten group: If the pixels of the selected layer are lighter than the ones on the layers below, they are kept in the image If the pixels in the layer are darker, they are replaced with the pixels on the layers below (they show through to the selected layer). The group includes lighten, screen, dodge and Addition. Each one producing a more intense effect.
Screen: As an analogy, imagine the selected layer and the underlying layer as being 35mm slides.
Firstly the lighten group: If the pixels of the selected layer are lighter than the ones on the layers below, they are kept in the image If the pixels in the layer are darker, they are replaced with the pixels on the layers below (they show through to the selected layer). The group includes lighten, screen, dodge and Addition. Each one producing a more intense effect.
Screen: As an analogy, imagine the selected layer and the underlying layer as being 35mm slides.
Darken, basically the opposite of lighten: If the pixels of the selected layer are darker than the ones on the layers below, they are kept in the image. If the pixels in the layer are lighter, they are replaced with the tones of the layers below (they show through to the selected layer), so basically the darker tones of all layers are kept.
Multiply: The best mode for adding colours on to a lighter base map. Works by multiplying the luminance levels of the current layer’s pixels with the pixels in the layers below.
Burn: Darker than Multiply, with more highly saturated mid-tones and reduced highlights.
Darken, basically the opposite of lighten: If the pixels of the selected layer are darker than the ones on the layers below, they are kept in the image. If the pixels in the layer are lighter, they are replaced with the tones of the layers below (they show through to the selected layer), so basically the darker tones of all layers are kept.
Multiply: The best mode for adding colours on to a lighter base map. Works by multiplying the luminance levels of the current layer’s pixels with the pixels in the layers below.
Burn: Darker than Multiply, with more highly saturated mid-tones and reduced highlights.
All of the Contrast modes work by lightening the lightest pixels, darkening the darkest pixels, and dropping the gray mid-tones (50% gray). Combinations of the lightening and darkening modes from the Lighten and Darken groups.
Overlay: Uses a combination of the Screen blend mode on the lighter pixels, and the Multiply blend mode on the darker pixels. Softer and more organic
Hard light: Uses a combination of the Dodge and Burn half-strength application of these modes. much stronger effect particularly where saturation is high.
All of the Contrast modes work by lightening the lightest pixels, darkening the darkest pixels, and dropping the gray mid-tones (50% gray). Combinations of the lightening and darkening modes from the Lighten and Darken groups.
Overlay: Uses a combination of the Screen blend mode on the lighter pixels, and the Multiply blend mode on the darker pixels. Softer and more organic
Hard light: Uses a combination of the Dodge and Burn half-strength application of these modes. much stronger effect particularly where saturation is high.
Difference is part of a wider group of blend modes called the inversion group. With this blend mode, similar colors cancel each other, and the resulting color is black.
Subtract is part of the wider Cancellation group. Similar to the Difference mode.
So it’s a lot to take in but hopefully the groups make sense but really nothing can beat trial and error!
If you want to do something truly original make sure Steven Kaye hasn’t done it already!
Stevefaeembra.com
Notice the effect on the colour, Screen has none but the others all change it to a greater or lesser extent.
Dodge has a bigger effect on the colour hue Addition does more lightening.
Same with the darken group darken and burn both affect the colour values
Overlay, a combination of multiply and screen doesn’t affect it but the others do
Difference and Subtract have some quite strange properties and so I have struggled to find a practical use for them.
Overlay, a combination of multiply and screen doesn’t affect it, but the others do
Blend modes can be found on the Symbology Tab for both the layer and the individual features.
They also pop up on the labels
And in the draw effects.
Blend modes can be found on the Symbology Tab for both the layer and the individual features.
They also pop up on the labels
And in the draw effects.
Blend modes can be found on the Symbology Tab for both the layer and the individual features.
They also pop up on the labels
And in the draw effects.
Basically, don’t use transparency, use Screen or Multiply depending on whether your background is light or dark!
Basically, don’t use transparency, use Screen or Multiply depending on whether your background is light or dark!
This is using the multiply blend mode one two different layers covering the same spatial extents but showing two different variables.
Pinks for one and greens for another.
When both values are high they create the blue colour.
Basically, don’t use transparency , use Screen or Multiply blend modes depending on whether your background is light or dark!
Oh yes, it is possible to use the multiply effect to recreate the colour printing process and make some CYMK maps.
Now I couldn’t find any examples from QGIS and I didn’t have time to make one, but returning to John Nelson I found he had created this masterpiece from smoking, drinking and obesity data.
He admits it is probably a bit too much to take in but the use of small multiples it becomes easier to interpret. These highlight the various combinations and overall risk. All achievable in QGIS without the need for any third party software to do the blending ahem ArcGIS… It must be coming soon to Pro?
It even has small multiples too, to highlight the various combinations and overall risk. All achievable in QGIS without the need for any third party software to do the blending ahem ArcGIS… It must be coming soon to Pro?
Pretty much the same, don’t use transparency, use Screen or Multiply depending on whether your background is light or dark!
I like here how the Black and white background makes clips the heat map to the land when using the multiply effect.
Multiply is the go to blend mode for applying nice looking hill shades
Overlay is more subtle
Hard light gives the effect of one of those plastic maps.
Overlay is more subtle
Hard light gives the effect of one of those plastic maps.
Overlay is more subtle
Hard light gives the effect of one of those plastic maps.
Labels can often disappear into the data you are showing, so a halo can prevent this but can look terrible if you don’t blend it into the background.
There are a couple of tricks you can use to make the halos appear only when they are needed.
Greens, used a mid green taken from the aerial photo. Used a lighten blend mode for the black text and a darken blend mode for the white text. It only appears where needed.
Greys, you don’t always have a dominant background colour so grey can help. I’ve used a dark grey with a lighten blend mode for the black text and a light grey with a darken blend mode for the white text. The result is a very subtle effect that only kicks in where it is really needed.
Wonderful images coming from Ordnance Survey from the Likes of Charley Glynn and Paul Naylor from Ordnance Survey .
Dot Density showing all the ponds in the UK
But they can be difficult to master
But they can be difficult to master
You can see the pattern that there are more bakers in cities and a good distribution of butchers across the countryside. Even from this map it is hard to tell that there are only around 6400 butchers to 8700 bakers.
Changing the zoom can ruin your map and it is easy to create one that looks terrible with no blending or way too much blending going on
You need to set your map scale to show the area you want and fix it, set your colours so they aren’t too bright if you are lightening the map or too dim and unsaturated if you are darkening. You need to choose the right blend mode too, remember some affect the saturation and some affect the brightness.
You need to balance a few things, firstly you need the features to overlap or they aren’t going to blend!
You need to adjust the blend mode and starting colour to make sure that you get a good distribution of colours with white or black representing the highest concentrations only and a good range of colour that hasn’t disappeared into the backdrop everywhere else.
It’s nice to be able to see individual points as well as the intense patches of high density, but this isn’t always possible, sometimes something has to give.
And finally, yes blend modes have made it into the print composer so your overlays and labels can be integrated into the map.
Thanks guys, without your hard work, inspiration and great blog posts none of this would be possible.
Impact, a bit over the top, but it catches the eye and gets data and so the research behind it noticed.
Some of these techniques can produce some great cartography, coastal effects, pollution clouds and blending in labels are all areas of “Serious” cartography that can be enhanced with these tools.
Which brings me on to my last point, these options mean that you can now get away without the expense or added complexity of putting your map through a graphics package in many instances!