Visit our blog with the latest post: 3D Is Not Enough - Meet 6D (08/11/2008)

HDR with Smart Objects

This article could be easily called “Shoot once, Use twice”, because this article explains how to use a single RAW file to get most data out of it. Usually the dynamic range of the camera (or JPG file) doesn't allow capturing all the details in highlights or in shadows. But the RAW files have this information and a few steps would allow us to retrieve and use this information. That's why we are going to create High Dynamic Range (HDR) file using Smart Objects.

What we have and what we'd get

In this article I am starting with a RAW file that could be converted into two of the images below. First image was converted to preserve the detail in highlights and the second to preserve details in shadows.

[Converted for Highlights]
Converted for Highlights.
[Converted for Shadows]

Converted for Shadows.

Our goal is to preserve details in both ends of the histogram (Highlights and Shadows). Though such preservation reduces the overall contrast of the image, we still can tweak the contrast afterwards. But here is what we are trying to achieve:

[Final Image]

Final image with Shadow and Highlight Details
~ Top ~

Smart Objects

This is a new feature of Photoshop CS2, which allows working with an object (i.e. an image) without actually loosing all of the details or characteristics. It simply keeps the original untouched, so you can always return to the original or do more changes without quality degradations. For example, if you reduce and image with Free Transform tool and then decide to make a larger copy, you would get highly visible pixilation – some of the information is lost. With Smart Objects you can do it all without impacting the quality of the image.

But there is one more thing with Smart Object based on RAW file. You can change the way you convert the RAW file at any point during your workflow and keep all your other changes intact (such as adjustment layers and other layers). And here we are going to use this approach.

STEP 1: Blank document

First we have to create a blank document in Photoshop where we are going to place our Smart Objects. The document should be of the exact size and resolution as the RAW file you are going to work with. In my case Adobe Bridge shows me the following information about my file:

[Image Metadata]

That's why I am going to create an image 3504x2336 with 240 dpi. So, let's press Ctrl-N or click in menu File, New. It would give us the following dialog:

[New Document Dialog]

I populate the dialog with the information about the file and give it the name “HDR”.

~ Top ~

STEP 2: CONVERT FOR SHADOWS

Now we are ready to insert our first Smart Object. This operation is called “Place” and is available via main menu: File, Place. When you run this command, Photoshop will ask you to select a file. Please select you RAW file and click OK.

Note: We are going to work with the same RAW file in this and in the next step.

After you click OK, Photoshop will open CameraRAW dialog where you have to set the parameters of conversion. The first Smart Object we are going to create is about Shadow details, so ensure that the histogram has no clipped data in its left side (see example below). This is the histogram I achieved by setting the Exposure parameter:

[Histogram - for Shadows]

My CameraRAW dialog looks like the following (click to see large image):

[Thumbnail to CameraRaw for Shadows]

Here you can see that there are plenty of details available in shadows, though highlights are clipped and some of the details are lost. When all the parameters are set and the histogram looks good, click Open. Photoshop will place the image as a new layer and would allow you to change the position of it. Simply press “Enter” and continue.

Your layers palette should look similar to this one:

[Layer Palette]

Note: I've highlighted the difference of a Smart Object icon from a regular image icon – there is a small sign in bottom right corner. You have to know that you can change the parameters of the conversion any time during the process – just double click on the layer's icon and the CameraRAW dialog will be open up.

One last thing – rename the layer, so we would know that we are working with Shadows here. I called mine “Shadows”. This concludes our Conversion for Shadows, next is the Conversion for Highlights.

~ Top ~

STEP 3: CONVERT FOR HIGHLIGHTS

To convert for Highlights we have to repeat most of the same step as we done it for Shadows:

  • Main menu: File, Place
  • Select the same RAW File

Then adjust the parameters in CameraRAW to have data for Highlights – there should be nice slope to the very bottom on the right side of the histogram. Mine looks like that:

[Histogram - For Highlights]

In the CameraRAW dialog I changed only the Exposure slider, so the highlights would have more room. And here are the parameters in the dialog (click to see larger image):

[Thumb - CameraRaw highlights]

Then click “Open” and press “Enter” to fix the position of the layer. For additional convenience I renamed this layer and gave it name “Highlights”.

So my layer palette looks as follows:

[Layer Palette]

~ Top ~

Combine Data

So far we have all the data we could get from the photograph, but we now we have to combine it, so both highlights and shadow details are visible. Right now only the highlights are visible (because the “Highlights” layer resides on top of others).

My approach here is to create a Layer Mask that would let shadow details shine through. And what I do is I am creating a layer mask for the top layer (Highlights) by clicking Layer Mask icon at the bottom of the Layer palette - [Layer Mask Icon]

It would create a layer mask for the top layer and the Layer Palette looks as shown below:

[Layer palette]

So far nothing has changed; we've just done the ground work for revealing the shadow details. And the next step is to actually create the mask (fill it with some black ink).

While the layer mask is selected - in main menu select Image, Apply Image. The following dialog will allow you to create the layer mask based on the content of other layers and blending modes:

[Apply Image dialog]

You can play with the parameters as you sit it fit. The parameters depend on the image you are using and the effect you want to achieve. In my particular case the parameters are shown on the image with the dialog. And the mask (a) and layer palette (b) are shown below:

[Layer Mask]
a. Adjusted mask
[Layer Palette]

b. Layer palette

How can we read the layer mask here? It's simple. The darker the tone, the more transparent the pixels of the layer are. It means that the dark areas allow seeing more of the pixels in the layers below. And for this mask we can say that the shadow areas will shine through the top layer (because they are darker).

Well, this actually concludes the main part of the tutorial. We achieved our main goal – combined highlight and shadow details into a single image from a single RAW file. Though there are a few tune-ups left. See next Step.

~ Top ~

Final Tune-Ups

OK. We got the final image, but the results may not look as appealing as we want them to be. What can we do?

There are several options for tuning the image:

Conversion for Highlight and Shadows

The way we inserted Smart Objects here allows us to change the parameters of the conversion at the very last moment – simply double click on the layer icon and change the settings.

Layer Mask

If you look at my layer mask (above) the image looks bleak and lacks of contrast, so you can apply Curves or Levels to the mask, and it will change the appearance of the final image.

Still not satisfied? Use Brush tool to paint black or white on the Layer Mask. It will hide or reveal areas with highlight or shadow details and change the contrast as well. I would recommend to create a History Snapshot before you start changing the mask.

Single Layer with Everything

Sometimes it's easier to work with a single layer, which is a combination of all layers (more like when you Flatten the layers). However if you use Flatten the image, you loose the possibility to get back and change things. Here is a tip for you – Select the top layer and then while holding Ctrl, Alt and Shift – press “E”. It will create a new layer atop of all others with the content, which you see that moment. And now you can easily apply all your changes to that layer without fearing to loose the changes you made before. [end of the text]

~ Top ~