In my previous blog post, I included a few images that used the focus stacking technique. This method blends a series of images to ensure all points of the scene are sharp and in focus. This tutorial will show you how to get started with focus stacking your landscape images.
Focus stacking is a useful technique for landscape photographers as well as in macro photography. I will be using landscape photos for my examples and discussion. When you are out in the field, you may decide you want to incorporate a distance background, like a mountain, and a foreground that is very close to the camera. If you focus on the foreground, your background will be blurry and vice versa. If this is not the look you want for your image, then you may want to consider focus stacking.
In some cases, it may be enough to adjust your camera settings. If you use a very small aperture like f22, you will have a large depth of field. So a larger portion of your image will be in focus, but due to the optics of your lens, the image will be softer because of diffraction. Stopping down will give you sharper images, but this may not satisfy your requirement for foreground and background sharpness. A range between f11 and f16 may work as long as your foreground is “far enough.” The “far enough” value is dependent on your focal length and called the hyperfocal distance – the focusing distance that gives you the greatest depth of field.
If you decide the hyperfocal distance does not give you the results you want, then it may be time to try out focus stacking. You will need at least two images to process. Everything about these images needs to be identical. Put your camera on your tripod, keep the same settings (shooting manual is good here) and use live view to zoom in on portions of the scene and manually focus on each portion.
Focus Stacking in Photoshop – Fully Automatic
The first thing you will have to do is load your photos into Photoshop. I use Lightroom and so I just selected my photos and opened them as layers in Photoshop (click on the images to see larger versions). Make sure your images are in order – foreground to background or background to foreground.
If I turn off the foreground and mid layers (click on the eyeball next to the layer to turn it on and off), the leaf in the ice is blurry in the layer where I focused on the mountain in the background.
Here is the zoom in on the leaf:
Make sure all your layers are visible again (eyeball should clicked on) and select all the layers. Then go to Edit -> Auto-Align Layers.
Click ok to the let program align the image automatically.
Photoshop will align your layers. You may see some white space around the image now since each layer was warped slightly to fit with the others. All your layers should still be selected. Select Edit -> Auto Blend Layers.
We want to stack our images, so in the next pop up window, select Stack Images.
Photoshop will automatically blend the layers and create a new merged layer with the focus stacked image. Provided nothing went wrong and there were no errors…
Zoom in on sections of the image to ensure the blend was done correctly.
Focus Stacking in Photoshop – Manual Blending
If you have a more challenging image and Photoshop was not able to blend your layers correctly, or you are not satisfied with the results, it is possible to manually blend your images. For my example this will be easy to do.
We will begin from the step where the images were auto-aligned. Click on the foreground layer and add a layer mask. You can do this from the bottom of your layer panel by clicking on the rectangle with a circle inside.
We will need to invert the layer. White means everything shows through and black means everything is masked. Click on the layer mask and type Cmd+I or Ctrl+I. Then select the paint brush tool.
With the brush tool you can paint in the section of the image that you would like to be visible. If you want to check what you have painted, hold down the alt key and click on the layer mask. The mask will now appear over your image. Hold alt and click on the layer again to remove the mask view.
Click on the next layer down, add a layer mask and paint in the portion you want visible from that image.
Again make sure you zoom in and check your work. You can also turn the layers on and off to check if you have painted in a section that is not in focus or if you missed spots.
Finally, crop the image. After the auto-alignment there may be white space around the edges of the images or edge artifacts after the blend.
Subscribe to my newsletter to keep up to date on tutorial, workshops and other exciting news!