![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How to Make a 'High Dynamic Range' (HDR) Image From a Single RAW Image
All text and images copyright Titus Powell. Do not reproduce without permission.
IntroductionHigh Dynamic Range (HDR) is a technique that is useful for high contrast images where no matter how you expose the image, some parts are too dark and some highlights are too bright. Normally for HDR you have to take multiple, bracketed exposures from the exact same position (usually requiring a tripod). The multiple exposures can then be combined into a single image which preserves the detail in the bright areas and the shadows, as well as everything in between. This tutorial shows you a technique I came up with that allows you to create a HDR effect using a single photo, as long as you have taken it in RAW format. It doesn't allow you to capture as big a range as traditional HDR, but it's something you can do to any image you take, without needing to set out to 'do HDR' to it. As long as you shoot in RAW, you can go back and apply this technique to images you've already taken. You may ask why not just use dodge and burn to brighten and darken areas of the image. The answer is, because at the point you're editing an image, it's often too late to capture the full dynamic range. If the clouds in the sky are 'burnt out' (as above, in the 'before' image) then no amount of darkening is going to restore what has been lost. If you still have the RAW file, however, that information is preserved, unless your initial exposure was wildly off. Here's the technique:
Step 1Open the image as a RAW file in Photoshop. If your version of Photoshop doesn't let you open the RAW file directly, download a free utility called Adobe DNG Converter, and run that on the RAW file(s) first to create .DNG versions, which Photoshop should then be able to open. When you open the file, you are then presented with a dialogue like this:
Notice the 'Exposure' slider, and try sliding it in both directions. Different parts of the image will be correctly exposed (not too bright and not too dark) at different positions on the scale. The goal of this technique is to make the whole image correctly exposed by combining different versions of the same image.
Step 2Move the Exposure slider to a position where *most* of the image is correctly exposed. Don't worry if some parts are too bright or too dark. Just pick a position where as much of the image as possible is correctly exposed. Click 'Open Image'. Now the image will open in Photoshop ready for editing.
Step 3From the File menu, click 'Save As'. Change the 'format' box to 'Photoshop' so that it saves it as a .PSD file. Call the file 'Base.psd' and save it somewhere convenient. Now close the image.
Step 4Open the RAW/DNG file once again. You'll get the same RAW dialog as before, except it will have remembered your selected Exposure value from before. Remember this base value; you'll need it again in a minute.
Step 5Notice which parts of the image are too bright. Adjust the Exposure down until those areas are correctly exposed, even though the rest of the image will then look too dark. This should be about 0.6 less than the base value. Click Open Image and then Save As a .PSD file like before, except this time call the image 'Highlights.psd'. Close the image.
Step 6Open the RAW/DNG file once again, and move the Exposure slider back to your initial base value. Notice which parts of the image are too shadowy. Now adjust the Exposure slider up until those dark parts are correctly exposed, even though the rest of the image will look overexposed. This should be about 0.6 more than the base value. Click Open Image and then Save As a .PSD file like before, calling the image 'Shadows.psd'. Close the image. You should now have three images with different exposures, called Highlights, Base and Shadows. For example:
Step 7Photoshop does have a built-in 'Merge HDR' function. It's better to do it manually, though, as it won't do as good a job as you will. Open all three images in Photoshop. Switch to the one called 'Highlights', select all ('Select' menu... 'All'), copy ('Edit' menu... 'Copy'), switch to the image called Base, and then paste ('Edit' menu... 'Paste'). It will overlay the base image as a new layer.
Step 8Click the 'Add Layer Mask' icon to add a mask. If your Layers window isn't visible, you can display it by going to the 'Windows' menu and selecting 'Layers'. The 'Add Layer Mask' icon is the one at the bottom that looks like a white circle in a grey rectangle. This: Once you click Add Layer Mask, a white square will appear next to Layer 1. This is the mask.
Step 9From the 'Image' menu, click Adjustments and then Invert. The mask should go black, like this:
Step 10Rename the layer (by double clicking on its name) from 'Layer 1' to 'Highlights'.
Step 11Switch to the Shadows image, select all, copy, switch back to the Base image, and paste. Click Add Layer Mask again and invert the mask again to make it black. Rename this layer 'Shadows'. The layer stack should now look like this:
What you've done is stack the three images on top of each other, with the base one at the bottom. Layer masks control the transparency of the layers that make up an image. Areas of the mask that are white are not transparent, and areas that are black are fully transparent. So because we've made the masks for the top two layers black (fully transparent), those two layers are in effect invisible at the moment. What you see is just the bottom layer, our base exposure image.
Step 12Here comes the magic of layer masks. Select the mask for the 'Highlights' layer by clicking on it (the black square, not the thumbnail of the image itself). Next, make sure the current foreground colour is set to white (pressing 'D' should do it.) It is shown in this icon:
Now select the Brush tool by pressing 'B' or clicking this icon:
Step 13Zoom in to 100% on the image and start painting the areas of the image that are too bright. You will need to adjust the brush size as you go along. As you paint over the overexposed parts of the image, they will miraculously be restored to the correct exposure. What's actually happening here is you're selectively painting out the transparency of the mask for the hidden Highlights layer, making it visible again in those areas you paint. Every time you paint, you may find that the brush stroke brightens it too much. In that case, immediately afterwards, click the 'Edit' menu and then 'Fade', and adjust the slider until you are happy with the amount to apply. This extremely useful option reduces the effect of whatever your last action was.
Step 14Once you've restored the overexposed highlights, select the mask for the 'Shadows' layer by clicking on the black square for that layer. Now paint over the areas of the image that are too dark. You will see them brighten where you paint, as parts of the Shadows layer are made visible. The layers stack afterwards will show the white you have painted on the two masks, illustrating the areas of the Shadows and Highlights layers that are showing, versus those that are still black and thus hidden. Something like this:
And here is what the composite image looks like now:
This particular image is still a bit bright in the clouds, so I actually went back to the RAW/DNG file and made a new layer with an even lower Exposure value, to bring the detail back in the clouds. With this edited in too, plus some minor retouching, I had the finished image:
Note that if you are converting your finished image to .JPG format, you need to use the 'Save For Web' option in the File menu, or the colours may be distorted.
I hope that tutorial was useful or at least interesting. I hope you will experiment with all these techniques to create images of your own, and let me know how you get on. If you did find it useful, please check out my photography e-book in the 'My Secrets' section HERE. Thanks and stay creative! Titus
|
![]() |
![]() |
![]() |