Friday, 8 October 2010

HDR photography tutorial

With my recent appearance on Flickr and uploading a bunch of my HDR photos (and B&W HDR photos) some people started to ask me questions like "what software do you use for HDR?" or "what settings do you use to achieve this effect?". I decided to write a tutorial on that to thank everyone on their positive feedback on my attempts. I'm definitely not a pro but I believe I got the HDR quite right and can share some thoughts on that.

Answer to the first question is crucial as depending on the choice of software the results can be really different. I use Photomatix Pro 4 all the time. The other option to go is Photoshop CS 5 which have HDR support built-in. These are the most popular ways of doing HDR these days, one giving best results. I'm going with the first one for several reasons:
  • Photomatix Pro is a way cheaper (costs something like $100) than Photoshop,
  • Photomatix focuses on HDR whereas Photoshop is a whole image editing package, for further post-processing I simply use GIMP (somewhat limited but free),
  • some tests available on the net show that it outperforms Photoshop in the most of statistics (performance, results),
  • With release of version 4, Photomatix automated a lot of things, like noise reduction and reducing ghosting artifacts thus saving quite a lot of time.

What is HDR?

Many people misunderstand concept of HDR (High Dynamic Range). It's not a special effect in its very sense. It's just a way to hack our cameras sensors' and monitors' limitations. Although I have nothing against overdone HDR (provided it's done on purpose and with full awareness) but many beginners in HDR processing just don't understand what it's all about.

The problem is the typical scene can have contrasts of 100.000:1 or even much higher. This ratio tells the difference between the brightest and darkest point of the scene. The contrast in reality is sometimes so high that even our eyes don't get all of it (try moving from very dark room to the open sunlit space - at first everything is just white then your eyes adapt to it but look back and the room seems to be completely black although just a while ago you could see all the details pretty well). The good example is a forest with a lot of shadows and sunlight coming through the leaves, or a dark cave from which we take photo of a very sunny outdoors. In other words our cameras cannot capture detail both in shadows and highlights and even if they could there is no monitor capable of displaying that wide range of contrast.

HDR is just a trick. It uses wide contrast photo and maps it to this limited colour space of the monitor in the process known as tone-mapping. It improves contrast locally not globally as curves tool would do. Another example: try to shoot forest and clouds at the same time, you will either end up with overexposed sky&clouds or underexposed forest depending for what you set your exposure. One of the solution for this is to use ND graduation filter or use HDR. With HDR contrast for the clouds and forest will be enhanced locally so you will have them both properly exposed.

Taking HDR photo

Although you can tone-map a single RAW photo using Photomatix using multiple RAWs will definitely yield better results. Sometimes there is no other option so tone-mapping a single photo is definitely a useful feature:

You can also use multiple jpgs but you will be faced with all limitations of this format as normally. I usually take 3 photos with auto-bracketing at 2 EVs break. Using 3 photos is quite intuitive:
  • 1 goes for shadows,
  • 1 for midtones,
  • 1 for highlights.
In the most outdoor scenes 3 photos is enough but sometimes you may need 5, 7 or even more photos to get best results (especially when shooting indoors and showing outdoors, eg. through a window).

I start with finding the best exposure for my midtones photo and then bracket it at 2 fullstops (2 EVs) hence I sometimes end up with exposures sequence like -3, -1, +1 instead of the most common -2, 0, +2 sequence.

Important thing to note: always shoot in Aperture Priority or fully Manual Mode (and change Shutter Speed value between the photos). The reason for that is you need to have depth of field stay the same between the photos, the results could get a bit weird if -2 photo would have aperture of f/11.0 and +2 photo would have f/2.8 :) crazy thing, isn't it :) ?

Another thing to keep in mind is that HDR generally increases the noise in the image. So you have to reduce it as much as possible when shooting so ISO 100 is a must in the majority of cases. You also have to have your photos perfectly aligned so shooting from a tripod is another thing you should consider, preferably using remote shutter release... OK, to be honest, I often shoot handheld in burst mode (~ 6 FPS helps a lot :) ) but shooting handheld using 10-22 mm lens at 10 mm most of the time is quite easy. Try it with 50 mm or longer lens and it's not that easy anymore :)

Processing in Photomatix

When you get to tone-mapping your photo in Photomatix you will be presented with quite a number of sliders. Photomatix offers a few ways of tone-mapping, I use Tone Mapping -> Details Enhancer most of the time as it is the most flexible mode. If you have files (tiffs, jpgs) you edited before tone-mapping it might be a good idea to use Exposure Fusion instead. Now I will give description of the most important options and give the values I use most of the time:

  • strength - between 90 - 100 - as it is the strength of the effect. I like strong but still natural effect so high value is necessary.
  • colour saturation - between 50 - 80. Higher values in most cases result in overdone effect and I believe most of the guys use something like 100 :)
  • smoothing - medium or high (in light mode), sometimes very high, never anything else :) rarely I set it to 0 (when not in light mode). Lower values result in surreal effect and can also produce nasty halo artifacts.
  • gamma - between 1.10 and 1.40. For very dark images I set it to 0.8 - 0.9.
  • luminosity - change it only occasionally - it boosts/darkens details in shadows and brightens/darkens whole image.
  • microcontrast - values between 5 - 10 - higher values give the image sharper look and enhance local detail (useful when you have nice textures in your photo).
  • temperature: between 0.0 - 3.0. But I don't use high temp. values if the photo wasn't shot near the sunsets/sunrises as it works best for them. For a midday something like 1.0 - 1.5 works well for me. For winter scenes I also use positive values to create nice contrast as seen here:
 
  • saturation highlights and saturation shadows - this I tune to get best results (no golden advice), but in most of my photos saturation shadows is about -1, -0.5, sometimes even around -5 to get nice contrast between highlights and shadows and create nice definition for the subject which is usually well lit and thus have more highlights than background.
  • microsmoothing - I use defaults in most scenarios. Otherwise noise can get really ugly :) for some scenes I decrease it to around 0.5 - 1.0 when there are a lot of details (snow/sand looks best without smoothing).
  • other options I don't generally touch :) and don't know the reason for their very existence :)
Further processing

Your photo at this stage might be finished or what is more probable requires further tweaks and improvements. In the most cases I need only to modify curves/levels a little bit and apply Unsharp Mask. Sometimes it's also necessary to get rid of halo artifacts. When using Photomatix 3.2.9 and older a lot of work was required to get rid of ghosting artifacts too. Now this is hardly the case.

Example

Let's take a look at the HDR photo I've uploaded recently to Flickr: 

Following bracketed photos were used for it:
  
   
Here's some EXIF data for them:

Camera: Canon 50D
Lens: Canon EF-S 10-22 mm f/3.5-f/4.5
Focal length: 10 mm
Aperture: f/5.6
ISO: 400
HDR: 3 RAWs shot handheld (-2, 0, +2), tone-mapped in Photomatix Pro 4 Beta 10, fine-tuned in GIMP 2.6.10

Here is how I set ghosted regions in the semi-automatic ghosting artifacts reduction:

For each of the regions I used 0 EV photo to be used. This works best for me most of the time.

I used following settings for tone-mapping:
  • strength - 100
  • color saturation - 70
  • luminosity - 3.0
  • microcontrast - 7.0
  • smoothing - 1.0
  • gamma - 1.30
  • temperature - 2.0
  • saturation highlights - 3.0
  • saturation shadows - 0.0
Rest of the options was set to defaults.

After finishing processing this photo in Photomatix Pro, I opened it in GIMP and applied S-Curve to enhance contrast a bit. I also used Unsharp Mask to sharpen it.

B&W HDR

Recently I take quite a lot of black and white HDR photos and it become more and more popular. Here is my example shot:


To achieve that there are two options:
  • Desaturate photo in Photomatix,
  • Desaturate photo during further processing
Both ways you can achieve similar results, starting with version 4 Photomatix Pro have built-in preset for B&W photos.

Thoughts on fast moving objects

Ok, most of the techniques described here work well for static scenes or ones with the slowly moving objects. What if there are fast moving objects? There are few options in such a case:
  • Create HDR from a single RAW - I used it a few times and the results were pretty good. The biggest advantage is you need no further processing. The biggest disadvantage is that your dynamic range is rather narrow (compared to 3 or more photos).
  • Create HDR from multiple RAWs and use semi-automatic deghosting in Photomatix Pro 4. In previous versions there is no such an option. You mark regions as potentially ghosted and select the photo to use for it. The process is the same as in the example above.
  • Create HDR from multiple RAWs and use no deghosting in Photomatix Pro - this is most difficult task as you will need to remove deghosting artifacts later on when processing photo in Photoshop/GIMP. This involves erasing parts of the photo and use your exposures photo as other layers. However, this way you can create more interesting blur effects.

14 comment:

  1. PeterYoung1 FlickrOct 12, 2010 10:40 AM

    Great tutorial with plenty of exmaples and detail.

    ReplyDelete
  2. Jeremy Sargent FlickrOct 13, 2010 01:27 AM

    Thank you for this, I have recently been trying HDR and been unsure with the results so will give your ideas a go. Would love to know know your ideas for achieving great HDR results with fast moving subjects.

    ReplyDelete
  3. I've just added paragraph on that.

    ReplyDelete
  4. Excellent!!!!!

    ReplyDelete
  5. i like this tutorial. i will try it on soon...

    you should also add your comment list as yahoo and flickr.

    thanks

    ashish parmar - flickr

    ReplyDelete
  6. Thank you everyone for your comments both here and on Flickr. I'm glad you like the tutorial and if anything requires further explanation just let me know - I will try to write on it to.

    @ashish parmar - I don't think it's possible with Blogger but I'll check that.

    ReplyDelete
  7. I've noticed increasing saturation highlights reduces halos in the sky. I use it a lot and I say it for if it helps. My final image is always very bright but photoshop-curves fixes it.
    Great tutorial. I've never used de-ghosting that non-automatic way. It's for sure quicker than masking in photoshop. I have to try it. Thank you.

    ReplyDelete
  8. Great tutorial,thank you so much.

    Bill Humason

    ReplyDelete
  9. Sorry, I was wrong: it wasn't "saturation highlights", but "highlights smoothness" what reduces halos in the sky.

    ReplyDelete
  10. Yes, that's true. I forgot mentioning about that. But I don't use it that often as for me it can change the mood of the image quite dramatically :)

    ReplyDelete
  11. this is amazing! thank you so much, i gave up on photomatix and just used photoshop a lot but this is making me go back! thanks a lot

    ReplyDelete
  12. Thank's a lot for this excellent tutorial. It makes me try again :)

    ReplyDelete
  13. thank you so much for this useful tutors cox i'm very much interested in hdr works.. and im very new to this skills, but still i try to learn it from experts like u. thank u once again :)

    ReplyDelete