In this article I’ll show you the basics of how to do focus stacking using Lightroom and Photoshop. Focus stacking is the process of shooting multiple images of the same subject at different focus points and then merging them into a single image with great depth of field. It can be used in landscape photography, photomicrography (photography through a microscope), but it is particular useful in macro photography where depth of field is very shallow, even with very small apertures. There are a couple of specialized focus stacking programs on the market such as Zerene Stacker and Helicon focus, but you can do basic focus stacking in Photoshop alone. There is more involved than just blending the images together and all of these programs do all of the necessary adjustments. The biggest problem comes from what is called “focus breathing” which is the tendency for image size to change with changes in focus. This occurs in varying degrees in most lenses, at all distances, but is particularly pronounced at the very close focusing distances involved in macro photography.
For this image I started with four images of an iris. All images were shot on a tripod, and I really feel this is a must. Because of the close focus and high magnification, even the least movement between shots will make it hard or impossible to align the layers later. I started by focusing on the closest edge of the flower, and then shifted my focus further back on each successive image. I only shot four images, because I did not really want the far back petals to be sharp. If I had wanted to have the back petals sharp, I could have shot two more images with increasingly further focus and made them sharp.
Here are my four original images, and I’ve circled the approximate areas of focus in each.
I first selected all four images in Lightroom, went to the develop module and edited the first picture. By making sure auto synch was turned on at the bottom of the develop module, all four images were developed identically, which is important so that they would blend properly in our later steps. Back in the library module I selected all four images, right clicked and chose “edit in” and then near the bottom of the list of choices “open as layers in Photoshop”.
This opens Photoshop and then opens all four images as layers in a single Photoshop image. I then selected all of the layers by clicking on the top layer and then shift clicking on the bottom layer. I first went to “edit” and then “auto align layers”. It’s necessary to do this because of the size differences caused by focus breathing.
After the images were auto aligned, and with all four images still selected I chose “edit” and “autoblend”.
That will bring up a dialog box of options. I chose “stack images” and checked seamless tones and content aware fill transparent areas.
At this point Photoshop has created masks for each of the four layers and created a new layer that is a merger of the four layers and their masks.
I then selected “layer” and “flatten image” and my basic focus stack was done, and you can see the resulting image below.
Of course I didn’t stop there (some would say I never know when stop editing), so I used NIK Color Efex and Tonal Contrast to emphasize the details in the image as you see below.
Just to take it over the top, I used the Fractalius G4 plugin from Redfield and a preset I created in some earlier edits. This plugin goes crazy finding lines and patterns and creating some glows within the image. It is doing a ton of heavy calculations in several passes, so this plugin can take several minutes to complete. Here is my final image after running Fractalius.