Published on 30th January 2014

HDR Landscapes 3 - Luminosity Blending

Blending with luminosity selections can be very simply divided into two parts. The first is blending highlights, which is as easy as pie. The second is blending shadows and it requires a few extra steps that may take a while to program into your subconscious. I have again put together a batch containing a number of easy HDR sequences to practice the blending on. Head over to the products page to view the practice image downloads.

Please remember that this tutorial builds on systems and techniques explained in previous ones. This tutorial won't make sense if you haven't read the tutorials listed (in order) below. 

Blending Highlights

What do you do with a sequence like the two images above? In the first exposure, everything except the highlight around the mountain at the end of the peninsula (The Sentinel, Houtbay) is well-exposed. The second image has that highlight detail, we just have to figure out how to blend it into the first image. The problematic area is very small, oddly shaped and right behind a shadow. There's no way that you can neatly brush around the sentinel and using a gradient will affect way too much outside the highlight. How can you reveal detail from the darker layer in only that blown highlight area? With a luminosity selection of course! For those who missed the introduction to luminosity selections or never read it, it is explained in great detail in the contrast and luminosity selections tutorial.

Using a luminosity selection, you can try to isolate the highlight from the rest of the image and paint black into that area (on a mask) to reveal the detail from the image below. This means you need to get a selection in which the marching ants are as closely around the desired area as possible...but there's a challenge in this. The best and worst part of luminosity selections is that they are highly feathered. The good part is that you can make any adjustment to a selection and it will blend nicely with the rest of the photo. The bad part is that because it is feathered you can never be 100% sure of what is in the selection. The marching ants are only a guideline of what is selected and it takes a bit of experience to know which selection is the right one. A few tips below.

  • By the time you get to the 4th selection (whether highlight or shadows) you are dealing with such an arbitrarily small amount of the image that you should try to get the ideal selection of an area within the first 4 selections. Because the ants are only a rough indication of what is selected, you have to do a bit off guess work to settle on the right selection.
  • You can always assume that the ants include too much, so you'll almost never be able to get them perfectly around the blown (or black) area. 
  • I use the 1st and 2nd selections 90% of the time. I rarely use the 3rd one and I honestly can't remember the last time I used the 4th. 

Getting Started

If your two images are stacked, the next step is to add a white layer mask and get the selection. Hold CMD and click on the RGB channel to get the 1st lights selection; what do you think? In my image (the one below) I would certainly say that it contains too much, despite the guideline that the ants always contain too much. It has a lot of the water selected as well as bits of that dark sky. I'll go for the 2nd lights selection by holding CMD+ALT+SHIFT and clicking on the RGB channel. 

The 2nd lights selection looks a lot better. It still contains slightly too much of the sky and even a bit of water, but it's time to experiment. Select the brush tool and check the following

The brush must always be the opposite colour of the mask, black in this case. 

  • Brush mode should be on it's default, which is normal. 
  • Set your brush to 30-50% opacity. Multiple strokes of a low opacity are always better than one 100% opacity stroke.
  • Set the size slightly larger than the problematic area. Using the square brackets to set the brush size is a useful shortcut: - [ ] +
  • Smooth, singular, side to side strokes. Brush like Van Gogh, not like a hyperactive 6 year old. 
  • If you feel the ants are in the way (as I do) then you can hide them by pressing CMD+H. 

Now simply make one smooth stroke from left to right through the highlight. If all is good it should have revealed the detail in the highlight areas from the layer below. You can do a second stroke and see if you like it, if not just hit undo. In this case a second stroke looks good. The result after two strokes is in the image below. The 2nd image is of the mask, showing where the black was painted in and as you can see it only affected the highlight area. The brighter an area, the more of it the luminosity selection contains and thus the more data will come through from the exposure below. Magic!

There was a slight glow on the sentinel due to the highlights around it which allowed a small amount of black through, but it's nothing problematic. You'll also notice that there is a bit of black on the water, which might be a problem as the water isn't identical in the two exposures. You can just change the brush to white, make it smaller and paint over black areas on the water. Once you're done you can get rid of the ants (CMD+D) and flatten the layers. From there you can treat the image as a single exposure and do all your normal editing. 

Rookie Mistake #2 - Forgetting to deselect the Ants

Whenever you're blending, one of the biggest mistakes you will make is forgetting to deselect a selection when you're done with it. I don't think all people hide the ants when brushing, but I do and I have been haunted by those sneaky ants countless times because I forgot that I still have a selection active. There will only be one clue that you still have that selection active and that is the histogram. If you look at the histogram below you can see that it only has data in the right half and that is because a highlight selection is still active. If you hit CMD+H then those sneaky marching ants will reappear to confirm it. Hit CMD+D to remove the selection and you can continue. 

Never Forget the Gradient Tool

Below are three images of which the first is obviously the primary and the 2nd contains most of the detail from the sky, but is blown around the sun. The 3rd contains a bit more of that detail around the sun that can be recovered. That makes this a P+H1+H2 situation. You may now wonder why I told you in the previous tutorial that this sequence only consisted of two images? I had already blended h2 into h1 to give you only two exposures, which could be easily blended with a gradient. Well there's a very specific reason that I did so; Once people learn about luminosity selections they seem to forget about the gradient tool as if it's the old dvd player without Blu-Ray or an Iphone without 4G. It is in actual fact a tool that does a much better job in many situations than luminosity selections can. 

The first step (which you should be getting familiar with now) is stacking the three images. When you're blending more than two images you should always identify which two will blend the easiest and work on them first. In this case it involves blending H2 into H1, so you can hide P by clicking the eye next to it, then select H1 and add a layer mask to it. Your layers palette should then look like the image below. 

Rookie Mistake #3 - Working on the Wrong Layer or Mask

Time to work on those bottom two images! In order to work on a certain image it has to be selected in the layers palette. Whenever things aren't going to plan, remember the three rookie mistakes you have to look for.

  • Make sure you have the right brush colour selected.
  • Make sure you don't have a hidden selection active.
  • Make sure you're working on the right layer or mask.

The next step is to get a selection of that blown area in the sky. Hold CMD and click the RGB channel for the 1st lights selection. In my opinion it contains too much of those dark clouds, so lets go for 2nd lights...That looks better!

Select the brush tool, set it to black, 50% opacity and roughly larger than the area within the ants. On a 3000px wide image my brush size was 1200. Now make a singular stroke from left to right through the sky and see the result. It has recovered plenty of detail from the very blown area and also brought down the other highlight areas a bit. You'll see that if you do another such a stroke then those other softer highlights that aren't blown become a bit too dark, undo the 2nd brush stroke. What I'll usually do in such a case is to reduce the brush size to slightly larger than the blown area (700 in this case) and give it a stationary click or two on the highlight. The resulting image and mask will be as you can see below. 

If you're happy with the results then you can deselect the ants (CMD+D) and merge the bottom two layers. Now what I've noticed on workshops is that once people are occupied with luminosity selections they completely forget about the gradient tool. Hopefully your knowledge that the gradient tool does a perfect job with this sepcific image will make you realize that just because luminosity selections are advanced and difficult, it doesn't make them the best tool for the job. All you need to do now is unhide the top layer, add a mask (to the correct layer) and then drag the gradient exactly as in the previous tutorial. This whole process becomes a walk in the park after a few tries.

Look at the set of images below. You may recognize the images below from the RAW editing tutorial where I defined this as a category two exposure as it has all the detail in the histogram, but the exposure is badly balanced. In the primary exposure (top one) the water and corners of the sky look right, but the rocks are too dark and the highlight is a bit too bright. I developed a -1.00 exposure (H1) for the highlight and a +2.20 (S1) exposure for the shadows, all from the same RAW file. Don't attempt to recover that much shadow detail if you're not shooting with a D800 or D800e! This is a typical S1+P+H1 situation even though all images came from the same RAW file. 

The first step is to stack the images and then to decide which two you will combine first. It's always best to combine the easiest two first and that will of course be the primary and the highlight exposure. Technically, shadows aren't more difficult in any way, but it requires a few more steps that are challenging when you're still learning the ropes. I always prefer to work from bright to dark, meaning that I blend highlights first, then primary and then shadows.

Stack the layers from dark to bright, hide the S1 layer and add a mask to the P layer. Your layers palette should then look as below.

Time to blend that highlight detail from H1 into P. Hold CMD and click on the RGB channel icon for the 1st lights selection. If it looks right to you then you can brush, but there's no harm in seeing how the 2nd lights selection looks. I experimented with both and they have an almost identical result so either is suitable. You can see the results of my blend below. When you're done you can deselect the ants and merge the two layers together. 

Blending Shadows

If you've merged H1 and P and you unhide the the top layer then you'll be looking at the shadow exposure. As far as your experience in blending currently goes you should now presume that you need to recover the highlight detail in the sky, the waves and the water. That is a lot of effort and you have to ask yourself if there isn't an easier approach than to blend all of that detail in around the rock shelf? The rock shelf is clearly the minority of the image. When blending you should work as efficiently as possible and that means always blending the lesser image into the greater one. In this case the greater image is the one at the bottom of the stack in which the sky and the water are correctly exposed. It's easier to blend the detail in the rock shelf into the image that is now correctly exposued for the sky and the water. To blend the lesser into the greater you need to be looking at the greater image, which is at the bottom of the stack. There are two things you can do so that you are looking at the top layer. 

  1. The first is to actually swop the layers around and it is the one I advise against. If your bottom layer's name is 'Background' instead of 'Layer 0' as in my image below, you won't be able to move it. Double click it in the layers palette, a pop-up dialog will open and you can just hit ok. This will change the background to a loose layer and you can swop the two around. I'm just informing you of this so that you don't think the way I recommend is the only approach.  
  2. The other method is to simply add a black mask. The black mask will reveal what's below and you'll be looking at the primary exposure. You can choose which one of the two is easier? (The 2nd one obviously)

The next step is to get the selection, but first we need that inverted reference layer to get the shadow selection from. As explained in the contrast tutorial, you must duplicate the layer by hitting CMD+J and then invert it by hitting CMD+I. The problem now is that when you duplicate a layer with a mask it will duplicate the mask as well and you don't want that mask on the reference layer. You can select the mask in the layers palette and delete it by clicking on the trash can, but you can save yourself two clicks by only adding the mask to the shadow exposure after creating the reference layer. The efficient way of doing things is to only add the top layer's mask once you have created the reference layer, but there isn't an absolute correct way. If all is good then your layers palette should look like the image below. 

Now we are in familiar territory again! Hold CMD and click the RGB channel to get the first shadows selection. In my image it looks okay, but a bit of the water is still selected. I'll go for the 2nd selection to see if it gets rid of the water and just because the 2nd selection is my favorite.

Now simply hide the reference layer, get out the brush and start brushing. Remember that on a black mask you need a white brush. This image is a bit different than the rest when it comes to brushing because the shadows are a number of areas located around the cauldron instead of just one solid area as in the previous images. I set my brush to 500(on a 3000px wide image) and 50% opacity, then did one whole paint of the entire rock shelf. Then I made it a bit smaller and did a few small and local strokes on the darkest areas to bring some more detail out. Finally I set it very small and did one stroke across that shelf in the distance on the left. Results shown below.

Easy as that! When you're done you can deselect the selection, delete the reference layer and flatten the stack.

The Other Way Around

Now I want you to see what happens when you flip the stacking order around. Take the same three images as in the last exercise, but stack them from bright to dark as in my layers palette below.

You have to start exactly the same by determining which two to blend first. When you invert the stacking order, almost all the other procedures invert as well.  The first thing is the order in which you tackle the images. In the previous exercise you had to hide the top layer and then work on the bottom two. Those two are now at the top, thus there is no need to hide the bottom one. The next thing that inverts is the color of the mask - add a black one instead of a white one. Your layers palette should look as below. 

Get the same highlight selection as you did in the previous exercise and do the exact same brushwork to brush H1 into P. When you're done you can merge the two and deselect the ants, then your layers palette and image should look as below. 

Time to blend the shadows again. You're now looking at the greater image and you have the lesser one with the shadow detail below. Exactly as before you require a reference layer to get the shadow selection and a mask to brush on. The big catch that the inversed stacking order brings into playxn is which layer to create the inverted reference layer from. Differently exposed images will produce different selections. In the two images below I have inverted the P and S1 exposures and activated the first selection to show you the difference. The first image is the S1 exposure, which is the brighter one with the shadow detail. The second image is the primary exposure in which all but the shelf is now (after blending the first two) correctly exposed. Have a quick look and then continue reading below.

We know that we need to isolate the the rock shelf from the rest of the image and you can clearly see that the first image (the inversion of s1) does a better job of that. It would be pretty stupid to assume from this single example that the brightest image always produces the best shadow selections, but I can back that assumption up with a lot of experience. You always want to make the reference layer for a shadow selection from the brightest image in your stack. Write that little pointer down and lets continue! In the previous example where the images were stacked the other way around it was very simple to make your reference layer from the brightest image in the stack. It was the one on top, so all that was necessary was a simple CMD+J and CMD+I to duplicate and invert it. It's still very simple, but that layer is now at the bottom which just necessitates a few extra clicks.

Select the S1 layer at the bottom of the stack, duplicate it with CMD+J and then invert it with CMD+I. Now all you need to do is to drag it to the top of the stack and then you can add a mask to the P layer. Remember that the mask colour is one of the things that are inversed with the stacking order. In the previous example we added a black mask to do the shadow blending so now we need to add a white mask. When all of the above is done your layers palette should look as below. 

All that is left to do is to repeat the selection and blending process exactly as in the previous exercise. Once you're done you can flatten the image and deselect the ants. Simple as that!  Take the image into Color Efex. I gave this image some pro contrast, a slight grad filter to lighten the foreground and then added a vignette with darken/lighten center. Apply some of my web sharpening and your result should look as below.

All in all, what is the difference in the stacking orders? Not much really...it just comes down to your personal preference. I always stacked my images from dark to bright and had no problems whatsoever. When I switched to Lightroom last year and started using the auto-stack function I started doing things the other way around. I found that some situations were just clearer and simpler to do once I was comfortable working both ways around. My previous tutorials only taught how to work as I did in the past, but following my enlightenment of reversing the stacking order I now prefer to teach both. If you're keen to understand blending and not just learn the process like a robot then I strongly advise that you do all your practice images both ways around. 

That's it for HDR Landscapes 3. In #4 I will look at the pros and cons of masking the selection instead of using a selection on a mask. To find out what that means, subscribe to our mailing list! 


  • Please leave your comment below.