Sign in to follow this  
Tanel

HDR image blending (tone mapping)

Recommended Posts

Tanel    7

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)

Share this post


Link to post
Share on other sites

Great tut really

Technique described in my tutorial is entirely improvised

even beeing improvised i think it's really good

one that should almost definitely be stick'd

huge thanks Tanel

Share this post


Link to post
Share on other sites
BoltBait    1,228
Someone please make this a plugin...

That would be very nice.

OK, I'll see what I can do.

Share this post


Link to post
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)?

Share this post


Link to post
Share on other sites
Tanel    7
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)

Share this post


Link to post
Share on other sites
Domesticfix    0

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 ..

Share this post


Link to post
Share on other sites
Mr Frojo    2
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.

Share this post


Link to post
Share on other sites
Tanel    7
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.

Share this post


Link to post
Share on other sites
Mr Frojo    2
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this