Jump to content

HDR image blending (tone mapping)


Tanel

Recommended Posts

HDR imaging plugin has been requested by some people here, but as far as it is not available I thought I’d drop in a tutorial.

You can learn the backround of HDRI (high dynamic range imaging) here:

http://en.wikipedia....ki/Tone_mapping

http://en.wikipedia....mic_range_image

http://cambridgeinco...namic-range.htm

Technique described in my tutorial is entirely improvised, but it works well for me, giving a good amount of control over the process and results.

Some inspiration was provided by “The Layer Mask” technique described here. Since there is no layer mask in PdN yet, we will use two excellent plugins instead: Curves+ and Gaussian Blur+.

Particular curve shapes and blur amounts were selected to match my sample image. Take it as a rough guideline only; feel free to propose improvements! Below sample images are 16% size screenshots, actual processing was made on fullsize 6MP image.

I will blend three differently exposed images:

hdr0.jpg

First image from the left is the original photo: camera was set to expose for highlights (spot metered from bright sky with +2 stops exposure compensation). Image was developed from raw file with no exposure compensation (note: raw file was developed to 8-bit tif-s with other software).

Second image was developed from the same raw file with exposure compensation of +1.3 stops to provide correct midtones.

Third image was developed from the same raw file with exposure compensation of +2.5 stops to provide correct shadows.

Obviously the dynamic range of the scene exceeds the capabilities of camera for a single jpg capture. But there are huge resources in the shadows with raw file (alternatively, in such static scene, the three separate images could have been shot using a tripod).

To blend a HDR image we will use highlights from the first (darkest) image, midtones from the second one and shadows from the third (brightest).

Note that in order to obtain natural look, the highlights should be kept on bright side and shadows on the dark side. Don’t overdo it by lifting all levels to the middle!

Preparation:

Open the images on layers and organize: dark image layer (first one in my sample) to the bottom, middle one to the middle, bright one to the top. Ensure all layers are checked.

Workflow:

Step1: tone mapping

In this step I will remove overexposed areas from bright images by turning those areas transparent. That will allow lower layers to show up on those areas.

a) Select the top layer (the brightest image).

Start Curves+ plugin from adjustments menu and apply a curve similar to the one shown below in order to remove midtones and highlights from top layer (Advanced mode, In: Luminosity, Out: Alpha) [download a sample curve to load into your Curves+: http://www.hot.ee/ta...r-curve_top.xml]

Note: this curve type adjusts transparency/opacity of pixels based on their brightness. You may find other curve shape to better match your images.

hdr-curve_top.gif

B) Select the middle layer.

Start Curves+ plugin from adjustments menu and apply a curve similar to the one shown below in order to remove highlights from middle layer (Advanced mode, In: Luminosity, Out: Alpha) [download sample curve to load into your Curves+: http://www.hot.ee/ta...r-curve_mid.xml]

hdr-curve_mid.gif

At this point your image probably looks quite coarse and artificial. Don’t worry, we are not finished yet.

Step 2: smoothing the transparency blend

a) Select top layer and Open Gaussian Blur Channel plugin from Effects>Blurs menu. Dial in Alpha blur with amount of 10. Repeat (Ctrl+F) Alpha blur two times (total 3 times of Alpha blur on this layer).

B) Select middle layer and Open Gaussian Blur Channel plugin from Effects>Blurs menu. Run Alpha blur total 3 times on this layer as well.

Note: This step especially improves fine dark detail or sharp edges against bright backrounds (my sample image has a lot of those). You may find larger or smaller blur amount and repeat times more appropriate for different types of images.

We are almost there:

hdr4.jpg

See how the layers look like on their own:

hdr3.jpg

On the top layer (3rd image) only shadows are visible while transparent area (represented by the “checkerboard”) lets below layers to show up. On the middle layer shadows and midtones are visible but only midtones can show up through the top layer. From the bottom layer (1st image) only the brightest areas can show up through the middle and top layer.

Step 3: fine toning

Here you are actually free to run adjustments like levels, saturation, contrast etc to your own taste – either on each layer separately or globally after merging. In my example I preferred to reduce levels on top layer to give shadows more natural look and improve overall contrast.

When it looks fine, flatten image & save.

Done! This is the best result I could do this time, representing what I actually saw in this scene:

hdr5_ready.jpg

Endnote: you can also merge just two images instead of three – sometimes it’s enough. If you do so then ignore the middle layer part of from my tutorial (marked with “B)” in step1 and step2).

8)

Link to comment
Share on other sites

Great tutorial! It has really helped with my understanding of the Curves+ plugin!

 

Take responsibility for your own intelligence. 😉 -Rick Brewster

Link to comment
Share on other sites

very good

firefoxvsIEsignature.png

What you describe is simply one stenographic algorithm. I'm sure BoltBait or one of the other CodeLab gurus would be able to quickly implement this.~Rick Brewster

Link to comment
Share on other sites

This is a very professionally written tutorial. Also, excellent use of Curves+. 8)

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

  • 4 weeks later...

*revives old sticky*

Nice one! I know I've seen this before..... oh yes! It was in Popular Photography a few months ago (as a CS2 tutorial)!

"The greatest thing about the Internet is that you can write anything you want and give it a false source." ~Ezra Pound

twtr | dA | tmblr | yt | fb

Link to comment
Share on other sites

Someone please make this a plugin...

That would be very nice.

OK, I'll see what I can do.

Hallelujah!

chorus> :P

Question though...would it be able to be used with one original picture, or would there have to be three different pictures of the same thing (as per the tut)?

Link to comment
Share on other sites

My first attempt at hdr ..

It's a good start!

I would try to give more depth to the tower at fine-toning stage, to make it stand out. And maybe clone out the dark spots from treetops.

Something like this:

hdr_domesticfix.jpg

I selected the tower and made:

- local contrast enhancement with Sharpen+ plugin @ Amount 20, Radius 40 (would try Radius 80 at fullsize)

- saturation +15

Then deselected and sharpened whole image with Sharpen+ @ Amount 100, Radius 1 (would try Radius 2 at fullsize)

Link to comment
Share on other sites

I think I'm going to try a different image with a lot more clarity . The detail is way to defused in the original . It was very hard getting all them shots with moving clouds :) I'll be back . Thanks for this awesome tut ..

Link to comment
Share on other sites

  • 3 weeks later...

I clicked the link, and yep, it's his. :wink:

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

What happened to the tutorial? Im not seeing it anymore.

I believe it is the third link. (I could be mistaken, however.)

Hi. This is my signature. :)

Link to comment
Share on other sites

What happened to the tutorial? Im not seeing it anymore.

I believe it is the third link. (I could be mistaken, however.)

According to the title of that page, thats HDR in CS2, not PdN.

I'm still alive!

Link to comment
Share on other sites

What happened to the tutorial? Im not seeing it anymore.

Tutorial disappeared magically somewhere last week :?:

Wormholes of universe, I guess :?

Anyway, I reloaded it now.

Link to comment
Share on other sites

What happened to the tutorial? Im not seeing it anymore.

Tutorial disappeared magically somewhere last week :?:

Wormholes of universe, I guess :?

Anyway, I reloaded it now.

Great, thanks! Its a great tutorial btw.

I'm still alive!

Link to comment
Share on other sites

×
×
  • Create New...