focus stacking in landscape photography

Focus stacking - everything you wanted to know! A relatively advanced concept in photography that most photographers encounter when delving into the fields of landscape photography, macro photography, product photography and more. So what exactly is the technique of focus stacking, when and how do you use it, how do you perform it and how to merge the photos in post processing? All the answers below.

Still missing basic knowledge on the subject? You are welcome to read my comprehensive article on focus and depth of field.

Iceland stokksnes beach and Vestrahorn mountain | Tomer Razabi photography

what is focus stacking?

Focus stacking is a photography technique that aims to achieve a greater depth of field than can be achieved in a single shot. In a single shot, the depth of field in the image depends on three main variables: the focal length, the focus distance and the aperture size. If you already exhausted the above three parameters and also used the hyperfocal distance to get maximum depth of field, but still lack more depth of field in the image, the only way to increase the depth of field in the image will be to shoot with the focus stacking technique.

There are situations where we do not have the possibility to get the maximum depth of field in a single image, since one of the parameters is required to be one that does not increase the depth of field. A good example is Astrophotography, in which we will often use an open aperture to bring more light into the image. In such a case using a wide aperture will reduce the depth of field and as a result we may not get a sufficient depth of field and will have to use focus stacking.

Using the focus stacking technique, we will take several photos, where between photos the only thing that will change is the focus distance. At the end of the shoot, we will have several photos, each one will have a part of the required depth of field. We will then merge/stack them all in an editing software to get a single image that contains the entire depth of field range from all the images together.

Fjallsarlon glacier lagoon in Iceland | Tomer Razabi

example of focus stacking necessity

In the two images below you will see a situation that required focus stacking, as it was impossible to get enough depth for all parts of the image in a single shot. The flowers in the foreground of the photos were a few centimeters away from the camera in order to make them appear large in the foreground. The photo was taken with a 14 mm lens, with an aperture of F/16 (the narrowest on the lens). Even using the hyperfocal focus distance (a focus distance that allows maximum depth of field) it was impossible to get enough depth of field in all parts.

הערמת פוקוס בצילום נוף | תומר רצאבי

In this photo I placed the focus to the nearby flowers. You can see that they are indeed sharp, but a little further away and up to the mountains there is no longer focus and sharpness.

הערמת פוקוס בצילום נוף | תומר רצאבי

In this photo I placed the focus a little further (about 50 cm forward) and you can see that most of the picture is sharp except for the near part of the flowers.

using focus stacking without depth of field issue

Some photographers  choose to use focus stacking even when there is no problem to achieve the required depth of field in a single shot. Such a case can be in a situation where using a very narrow aperture such as F/16 and up to F/22 achieves the required depth of field. The disadvantage of using a very narrow aperture is the increase of an optical phenomenon called "diffraction". The diffraction causes a certain decrease in the sharpness of the details in the image (not in the depth of field) and increases Chromatic Aberration which are color distortions in the areas of light and shadow transition.

When using high-quality lenses, these phenomena are almost not noticeable (especially in images seen on a screen), so the use of narrow apertures is very common. Photographers who do insist on uncompromising image quality (for example, a large and very high-quality print) will sometimes prefer to shoot with a wider aperture and do focus stacking.

זריחה בהר צין ושדה הבולבוסים קורס צילום נוף מתקדם - תומר רצאבי

focus stacking technique

Focus stacking technique is not very complicated. Practically it is about taking several photos of the same shot, while maintaining the same composition and exposure parameters. The only thing that changes from photo to photo is the focus distance. The change of the focus distance can be done by using automatic focus and moving the focus point between images, or by manually moving the focus ring.

Important guidelines:

  • Number of frames - we will take as many pictures as necessary to get sharpness in all parts of the picture. There are cases where 2 photos will be enough and there are cases where we will need more. It is difficult to know in advance how many photos you will need, but as you experiment with the technique and understand the level of depth of field in the photo, it will be easier for you to understand more or less how many photos you will need.
  • Maintaining composition - in order to merge the photos in post processing in a good and uniform way, the composition should be the same in all the shots. It is highly recommended to use a tripod!
  • Same exposure - the exposure parameters (ISO, aperture and shutter) should be the same in all shots in order to maintain the same lighting.
  • Change in environmental lighting - sometimes there are situations when during the shooting the environmental lighting may change (especially in nature and outdoor environment). Small changes will not pose a serious problem and can be balanced in editing. In case of extreme changes in lighting it is recommended to wait and shoot when the lighting is relatively uniform.
  • Movement of elements in the image - during the shooting, there may be movement of elements in the image. As long as it happens in areas which the depth of field overlap is not required, it won't be a problem (for example clouds in the background). If the movement occurs in an overlapping area, it is necessary to try to shoot more quickly so that we will be able to merge the overlapping areas and there will be as little difference between the frames as possible.

In the picture below you can see a visual illustration that shows an example of taking 3 pictures, with each picture having the focus in a different place. At first in the very close part of the image and then a little further.

focus stacking gif

focus stacking post processing

After shooting the necessary photos to get the entire depth of field, we will upload them to an editing software that will allow us to combine and merge all the photos, into a single image that contains all the required depth of field. There are various editing softwares with which you can combine focus stacking images. I will demonstrate the sequence of work in Photoshop.

Upload the images as layers to Photoshop. For a better workflow, it is recommended to give a name to each layer from the closest to the farthest or vice versa, as you like. This will allow you to make repairs more easily later.

layers with names in photoshop for focus stacking

Select all the layers and go to Edit and from there select Auto Align layers. The purpose of this operation is to "align" the parts between the images in case there was a change between images, something that happens quite a few times when focus is changed between frames.

ישור תמונות בפוטושופ להערמת פוקוס | תומר רצאבי

Select all the layers again and go to Edit and from there select Auto blend layers and then select Stack images.

מיזוג תמונות בפוטושופ להערמת פוקוס | תומר רצאבי
איחוד תמונות בפוטושופ להערמת פוקוס | תומר רצאבי

After doing this, you will get a screen where you will see the layers of the blending, each layer will have a mask that marks the parts selected in Photoshop to create an image with the entire depth of field. If necessary to make corrections, you can add or subtract parts of the masks to get a better result. After doing corrections and getting a uniform and good image, you can merge the layers and edit the image like any other image to achieve the desired result.

stacked layers in photoshop for focus stacking

conclusions

Focus stacking photography is a relatively advanced technique. It requires a good understanding of depth of field, when it is really necessary to use the technique and of course practice of the technique itself and the editing to achieve good results. As I say again and again - the more you practice, the faster you will get better results. Good luck!