Free and Open-Source HDR Tutorial
First, you need some software
Well, that’s not a problem! You are extremely fortunate to have at your disposable plenty of choices for creating beautiful photos, all free! First, you should download and install Luminance HDR; it’s a crucial step of the entire HDR photo process. Fear not! I shall guide your trembling hands and together we will make beauty happen before your eyes—it’s really quite easy!
Whoa there, what is HDR?
Apologies! Let’s start with the basics: HDR stands for High Dynamic Range, sometimes called HDRi (High Dynamic Range Imaging). It is a method of being able to capture, then blend together, all of the available light in a scene so that the final photo matches much more closely to what your human eye can see.
Perhaps you’re on a beach, the white sandy coast stretches out to the distance, the water is a cool blue and the sun is setting, casting intoxicating shafts of golden light everywhere. Inspired, you fetch your camera out and shoot the scene, hoping to capture the memory and feeling of the scene as you experienced it. But then you look at the photo on your camera: the sky is totally white, the colours seem dull and overall it’s just not how you experienced the moment.
You see, your human eye can take in much more light than a camera’s sensor can, even modern and hugely pricey DSLR cameras cannot compare to the range of light the human eye is able to capture. So how do we photograph the complete scene as we experience it? We shoot multiple exposures of the scene, from a fast shutter speed that grabs all the bright light in the sky, all the way to a slower shutter speed that captures all details in the dark shadows. Later, we take these exposures back home, hopefully with a warm fire and pint of ale, and we blend the exposures into one final photo that shows the scene exactly as your human eye saw it. Fret not, it’s very simple!
Show me some examples
Well, well, I thought you’d never ask! Below is a collection of some of my more popular HDR photos; it should give you a good idea of what is possible using my HDR techniques and free, open-source software!
No. 1: Gather thy tools
The wonderful thing about the apps below, apart from it all being free and open-source (meaning you are entirely free to modify it however you wish) is that you can download and install it all regardless of whether you’re running Linux, Mac OS X or Windows! The only exception here is Darktable, which unfortunately is not available for Windows. There’s a solution to that though: run Ubuntu instead!
HDR Software: Required
Luminance HDR: this wonderful, powerful app is a key part of the entire HDR process… and it’s totally free! Available for Linux, Mac OS X and Windows. Download it from the Luminance HDR website. Remember: free and open-source software is often developed by volunteers entirely in their own free time for your enjoyment. Wanna help the Luminance HDR team continue to add cool new features to this app? Be a gentleman or lady of generous birth and donate to help it grow!
More apps for the finishing blow!
Darktable: comparable with the likes of Adobe’s Lightroom, Darktable is a free, open-source RAW library manager and processing app. Your camera captures the light in a scene in what is known as the RAW format, pure light information files that you can tweak to produce incredible photos. Darktable helps you to manage your RAW library easily and has a wide variety of tools and plugins that will help you to create wonderful images with great speed and ease, giving your HDR photos that extra shine and polish. Download it from the Darktable website.
GIMP: a weird name, but one of the triumphs of the free, open-source software world, the GIMP has been in action probably since the Dawn Of Time (if you’re wondering, “GIMP” stands for “GNU Image Manipulation Program. Don’t ask). GIMP is a supremely powerful app and can look confusing to new users… but fear not, novice of mine! I shall guide you. GIMP allows you to stack images on top of one another, allowing you to blend between them to really give your photo the master’s touch. It also comes with lots of plugins, filters, scripts and other tools that allow you to make your HDR photos uniquely your own. And of course, it’s totally free! Available for Linux, Mac OS X and Windows. Download it from the GIMP website. And as before, the GIMP is developed solely by developers in their own free time, a great community of volunteers from all over the world. If you want to see GIMP get some amazing awesome features, you can help speed up this process by donating to the project!
I am ready for this!
Bodacious! You’ve got apps installed, you are ready to make some art.
Show me an example!
But of course! I took the shot below towards the end of Spring 2013 at Wastwater in the Lake District. Wastwater is perhaps one of Britain’s most epic scenes and I fell in love with the place ever since I first visited it many years ago, pre-photography days! However, whilst the scene is epic, the shot that comes straight of the camera is… not so much.
Here is Straight Out Of Camera (SOOC)
After using my tutorial
No. 2: Get thyself a camera
Kinda obvious right?
Most cameras on the market can take these kinda shots. For the purposes of HDR, try to get one that can do any of the following:
- Shoot multiple exposures of the same scene in one go. Being a Nikon user, I know that Nikon cameras call this “Auto-Bracketing” but other cameras use terms such as “Auto-exposure mode” or “Exposure Bracketing”… it’s all the same: a function that makes the camera shoot multiple shots of the scene from darker images to brighter ones.
- Allows you to shoot in Aperture Priority mode and also manually adjust Exposure Compensation. These terms may sound like I’m speaking Double Dutch. Be chill! We shall get to these in a bit.
- Allows you to shoot RAW images. If your camera can’t do Auto Bracketing or set itself into Aperture Priority and let you change the exposure compensation, you can still produce a respectable HDR from a single RAW file!
Really, the Auto Bracketing function is the killer feature here; with it, you can set the camera up so that, once you’ve composed a scene, you just press a button and the camera will quickly shoot all of your photos, from darkest to brightest, in one go, automagically. But why do we need these multiple exposures? Because we are compensating for the cameras inability to take in as much light as our eyes. If you were to take one photo of a sunset scene, for example, you’ll find that when you look at the image the sky is totally white (blown out highlights) and a good chunk of the image is in deep shadow (clipped shadows). But your eyes could see it all fine! By shooting the scene at different light levels, from darkest to brightest, we sweep across and capture the entire light range of the scene. Later, we can take those photos and merge them together with free and open-source software to create something a thousand times more evocative… and more like what we experienced when we were there! And I will show you how.
And you don’t need a super-expensive, ultramegahypergiantblackboxofdoom camera to create beautiful HDR photos… some of my best shots were made using a Nikon D60 and that camera’s five years old! Better gear doesn’t make a better photographer… always remember that. Currently, I use a Nikon D7000. It’s a few years old, and has recently been superseded by the Nikon D7100, but it serves my purposes well. Whilst it can’t shoot as many bracketed photos in one go as many of the more somewhat more expensive Nikon cameras, it does allow me to shoot three brackets very quickly, giving me -2, +0 and +2 exposures, which, in my experience, is absolutely fine for 90% of scenes.
You’re probably going to want a tripod too. That way, you can keep the camera rocksteady as it shoots the exposures for you and, in doing so, you can keep the ISO as low as possible to minimise noise in your final image. If you don’t have a tripod, no worries, you can still shoot bracketed photos handheld and the software will align those images up for you.
No. 3: Go out and get those shots
Well… what are you waiting for? Go out there and enjoy the world around you! Compose a scene that pleases you. Then, set the camera into Aperture Priority mode and enable Auto Bracketing. For your average landscape scene, an ⨍-stop of anywhere between ⨍/8 and ⨍/11 is absolutely fine as that will ensure that the whole scene is in focus. If you have a camera like mine, you can set it to shoot three brackets at -2EV, 0EV and +2EV. That is all you really need. Other cameras can only “stop” between each exposure by a maximum of 1EV, meaning you need to take 5 shots: -2EV, -1EV, 0EV, +1EV and +2EV. This is also fine, there’s no major difference between shooting one-stop brackets or two-stop brackets.
Also, shoot in RAW. Why is that? RAW files are much more flexible than JPGs and will help in the post-processing later on. That’s the super fun part!
If you’re shooting on a tripod (recommended) then set your ISO as low as possible. For most cameras, that’s ISO100. This keeps the noise in the images down to a minimum. Shooting on a tripod also keeps your images nice and steady.
Don’t have any RAWs just yet? Here’s three of mine No.1, No.2, No.3
Righto, in the screenshot of Darktable below you can see the three photos I took of Wastwater below:
No. 4: Blend the photos in Luminance HDR
Fun times! This is where the magic happens.
Open up Luminance HDR and load in your bracketed photos. Just click the leftmost button in the toolbar labelled “New HDR Image” and when the “HDR Creation Wizard” dialog pops up just hit the plus button and find the photos you want to merge into a HDR photo.
When you load the photos, Luminance HDR grabs the exposure information from them and gives you this dialog. Don’t panic Mr. Mannering! If you shot those photos on a super-sturdy tripod with little wind, you probably don’t need to align the images, so just hit “Next”. However, if you shot the photos handheld (with no tripod) or, like me, your tripod’s pretty rubbish, you’ll probably want to align the photos together as there will be some movement between each exposure that, when merged, makes the final photo look all blurry and will give you a HEADACHE. In which case, just tick “Autoalign Images” and hit “Next”. Luminance HDR will summon the powers of the Hugin software to examine each three photos and shift around the pixels so that they all match each other perfectly. Depending on your computer this could take a while, like it does with my poor little arthritic beasty, so grab yourself a coffee or something whilst it churns away…
Eventually, you’ll be presented with this:
This will look kinda confusing but it’s OK! Essentially it’s asking you to check the alignment between each photo and, if you want to, make adjustments of your own. I almost never do this, especially if I’ve asked the software to autoalign the images for me, so just hit “Next”.
Finally, you’ll be shown the last step of the HDR Creation Wizard dialog.
Luminance HDR asks you which “profile” you want to use to blend the exposures together. Now, I’ve been using Luminance HDR for years and even I don’t really know what any of these different profiles do. All I know, from personal experimentation, is that I use “Profile 1” about 95% of the time and that “Profile 2” can sometimes produce a more colourful HDR image. The differences between each profile though seems negligible. Feel free to experiment or, if you’re like me, just stick with “Profile 1” and hit “Finish”.
Luminance HDR will churn away. Essentially, it’s blending the photos on a pixel-by-pixel basis, selecting the best pixel from each exposure and merging all those best pixels into a single photo. MAGIC.
And then, this is what you see…
OK, yes, it looks a little bit underwhelming, doesn’t it? Well what you’re seeing is the true 32-bit HDR image. The thing is, most PC monitors and laptop screens can’t display 32-bit images properly; there’s just too much information. What we have to do is tonemap the 32-bit HDR image down into a 16-bit image that we can work with. What you usually see as “HDR” photos on the web by photographers are usually tonemapped photos, which produces that “HDR look”.
So how do we tonemap the image? On the left of the screen you’ll see a Tone Map section with a bunch of sliders and below a Tone Map Settings section. This is where the magic happens. You can tonemap your HDR image in a variety of different ways by changing between the different Tone Map Operators. I know that sounds confusing and I agree, it is. Essentially, the different Operators produce different HDR “looks”. When you select an Operator, the sliders and their functions all change. Now personally, for me, I really don’t use all those different Operators. Some of them are just rubbish.
The one I usually use is called Mantiuk ‘06, again, another awful name. Think of this one as a Details Booster. It’s brilliant for pulling out all those juicy details in mountains, rocks, wood, clouds and in architecture too! You’ll note that when you select the Mantiuk ‘06 Operator you are given three sliders: Contrast Factor, Saturation Factor and Detail Factor. Let me just briefly explain what these are and how they change your photo:
- Contrast Factor: this slider changes the type of contrast in your photo. What’s contrast? It’s the difference between the light and dark tones in your photo. With the slider more to the right, a larger number, the contrast is affected more globally, i.e. the difference between the light and dark tones in your photo is spread across the entire image. This makes the photo look more “natural”. With the slider more to the left, a lower number, contrast is affected locally; i.e. the difference between the light and dark tones in your photos is concentrated in smaller areas of the image. This makes the photo look more surreal with a high degree of detail. So it’s up to you how you want your photo to look! To summarise:
- Slider to the right: high global contrast, low local contrast, more natural;
- Slider to the left: high local contrast, low global contrast, more detailed and surreal;
- Saturation Factor: this slider is pretty self-explanatory; it affects how strong the colours are in your photo. This will turn out differently for different photos so do be free to experiment!
- Detail Factor: you need to be careful with this slider because its effect can get really extreme, really quickly. The slider starts all the way to the left at 1.0 and moving it to the right increases the details in your photo. What it basically does is darken highlights and brighten shadows. Detail Factor and the Contrast Factor work hand-in-hand, so you’ll probably be tweaking these two sliders the most, but you’ll probably never need to go beyond 10.0 as things start looking super strange.
Below the tonemapping sliders you have the Tone Map Settings section.
There are only two options here that I usually bother with: the Result Size and the Tonemap button. Usually, I first keep the Result Size low, say around 1024x678, so that when I make tweaks to the tonemapping sliders I then hit the Tonemap button and a quick result is displayed. This enables me to tweak the sliders really quickly, as asking Luminance HDR to tonemap a full-size photo (in my case, 4948x3279) can take some time… and my computer’s old. Once I’ve tweaked the sliders around so that the photo looks how I want it, I then change the Result Size to the biggest size possible, then hit the Tonemap button to get the full photo.
Once you have your full-size, tonemapped HDR image there’s only one thing left that I recommend to do. Along the toolbar at the top of Luminance HDR, next to the magnifying glass icons, you’ll see a white box with a black squiggly line inside. That’s the Adjust Levels tool.
With this, you can set the Clip Black, Clip White and Gamma points. Here, I recommend adjusting your Clip Black up a little bit to get some thick blacks in your photo, it’s important to have some black to help the colours resonate more. You can also adjust the Clip White point if you have blown out areas too. I rarely adjust the Gamma, or Midtones, slider.
Once you are happy with the Black and White levels, just click OK. Boom! That is one finished HDR photo! Save that bad boy and congratulate yourself.
But Wait, There’s More!
If you have never done this before, you’re possibly very happy with the results you’ve just created. And so you should be! You’ve achieved quite a lot. Now if you want you can share this image online with your friends and family… but personally, I like to finish off the Luminance HDR image with some final touches using Darktable and GIMP.
Finishing Touch 1: tweaking your RAWs
OK, first, let’s look at the HDR you’ve just made from Luminance HDR. Pretty cool, right? However, if you look closely there are some issues that need to be fixed.
This is a tradeoff when using HDR tonemapping software: it can produce strange artefacts and glitches in your photo even if other areas in the photo look really good! But this is easily fixed! How? We’re gunna make a “HDR” photo from one of our original RAW exposures. Not only will this fix some of the problem areas in the Luminance HDR image but as it will naturally look different, there may be other parts of the edited RAW we like better than the HDR, so we can mix and match between them to get the best of both worlds. We’re just going to produce one edited RAW today but in reality, in my daily processing, I will produce a variety of Luminance HDR images and edited RAWs to blend together.
Let’s rock with Darktable:
Here’s Darktable in action. As you can see, I’ve picked one of the original RAW exposures and we’re going to tweak it look as “HDR” as possible. Darktable is very powerful and allows you to perform a wide variety of edits to your photos. With this RAW, you can see the adjustments I’ve made on the left of the screen.
As you can see, we’ve made quite a pronounced difference with only a few tweaks! This is why you should always shoot in RAW; if we did these edits to a JPG file there would be glitches and noise everywhere. A RAW file contains so much more information than a JPG and is therefore extremely flexible, so we can be more rough and ready with our edits.
With the exposure made into a “HDR”, just export the photo. We’re now going to take the two photos, one from Luminance HDR and one from Darktable, and blend them together in GIMP.
Finishing Touch 2: time to blend
Welcome to the GIMP! Horrible name, isn’t it? In case you’re wondering, it’s an acronym of GNU Image Manipulation Program. In case you werent, well… now you know. Hooray?
Now, I know this app looks rather complicated, with buttons/toolbars/menus everywhere, but it’s OK, you don’t need to know everything about using the GIMP to do what we’re about to do.
First, just hit File > Open as Layers… then find the Luminance HDR and Darktable images you’ve made. GIMP will then load the two photos as separate layers, which you can see in your Layers Palette to the right. Give them names to make things easier to work with and drag’n’drop your Luminance HDR image to the top of the layer stack. Now, right-click on the Luminance HDR image layer and click Add Layer Mask… and in the dialog box that pops up leave the option White (full opacity) selected and hit Add. Your setup should look something like this:
Over on the left, click on the Paintbrush Tool, set the Opacity to 30%, choose a soft brush and make it as large as you like. On the right, make sure the white box (the layer mask next to your Luminance HDR image layer) is selected then, making sure that your paintbrush colour is pure black, start painting on the layer mask where you want bits of the bottom Darktable image to blend. When you paint black onto a white mask, you are essentially revealing the layer underneath. So, with one stroke of the paintbrush at 30%, you are revealing 30% of the Darktable image layer. This is an extremely powerful concept. Now, just paint on the layer mask where you want parts of the Darktable image to come through. I tend to start with a low opacity brush and make multiple strokes, gradually building up, so that I can revert any mistakes easily if I want to.
Here’s how our layer mask looks:
Remember: the parts where I’ve painted black onto the layer mask is where I’m revealing the Darktable image layer below; the darker the black, the more of the Darktable image layer is being revealed. So as you can see, I’ve blended in some of the sky, grass, mountains and all of the water from the Darktable image into the Luminance HDR image.
When you’re happy with how you’ve blended the two images together, just right-click the top layer and select Merge Down. The two layers are now one. Boom! Doesn’t that look a lot better?
Now of course, if you have more images to blend, then you can just keep bringing them into GIMP and blending them with layer masks in exactly the same way to produce the results you want.
Here’s The Before And After
Save up, export that bad boy and share with the internets your little bundle of joy! Of course, if you don’t want to stop there then there are plenty more things you can do this blended HDR. GIMP comes with loads of filters and plugins you can play with to get extra cray with your art.
I have my own GIMP process after the blending part. If you want me to create a full video tutorial of my entire HDR workflow, then share this tutorial and let me know, either in the comments or any of the social networks I’m on. If enough people want to see my workflow in action, then I shall record it. =)
Thanks For Watching!
If you have any questions at all, feel free to email me, leave a comment or get in touch via any of the social networks I’m on and I will do my best to answer.
Please share this tutorial around to help support this site and help me to produce more content!