Focus Stacking – “How to”

Among the innumerable possibilities that have been introduced by digital technology is an interesting technique known as focus stacking.

We need to use it whenever our goal is to obtain the sharpest possible image. By applying the hyperfocal rule it is already possible to obtain, with a single exposure, a photo in which everything is in focus from the foreground to infinity, subject to certain limitations.

The rule states that by focusing on a subject at a specific distance, we can get in focus objects that are:

  • At the distance we have focused on
  • At a distance that extends behind the subject
  • At a distance between the subject and the photographer

However, as I mentioned just now, there are some limitations to the application of this rule. It is a mathematical formula that is difficult to calculate, unless we rely on tables or handy smartphone apps. In short, the following factors determine whether we can successfully apply this rule to the subject we are photographing:

  • Sensor size (a full-frame sensor is better than an APS-C sensor)
  • Focal length (the shorter the length in mm, the more of the scene is in focus)
  • Diaphragm aperture (one of the first rules of photography is that closing the diaphragm aperture obtains a bigger depth of field)

It will probably apply when you find yourself photographing a close-up subject (but not too close!) with a wide-angle lens and full-frame camera, closing the aperture to f/16 (I strongly advise against going above that value).

Here is an example shown by screenshots from the PhotoPills app for iPhone:

Hyperfocal distance - Roberto Moiola

After setting the focal length of my lens (15 mm), the type of camera (Canon EOS 5D Mark IV), the aperture (f/16) and the distance from the subject to the camera sensor (0.5 m), I was able to obtain a hyperfocal distance of 0.48 m (48 cm) and a second, very interesting value—called the hyperfocal near limit—of 0.24 m (24 cm).
In a nutshell, this means that if I set the camera to focus on a subject 48 cm away by precisely adjusting the focusing ring on my lens, I can get everything in focus from 24 cm to infinity (the infinity symbol is actually the DOF far limit value). Clearly, then, I will have to position myself 24 cm away from the subject (perhaps leaving a minimum margin of error, so ideally, I should be a bit further away) to get everything in focus from 24 cm to infinity.

But if you were shooting under different conditions, you might be disappointed to notice that the application of this rule gives us unsatisfactory values that don’t get everything in focus as we would like. For example, this is the case when one or more of the following conditions are present in the scene, or when there are limitations in our equipment:

  • My subject is too close
  • The focal length of my lens is not purely for wide-angle photography
  • I’m using an APS-C
  • I can’t use a large aperture value, because my lens vignettes or loses definition at the edges

This is when we can make use of focus stacking, a technique that involves taking multiple exposures of the same subject at different focusing distances and then combining them into one perfectly sharp image.

I often use this technique with blossoms or other natural subjects that require a lot of definition and in scenes where the landscape, all the way to the horizon, has a strong emotive impact and reveals something of interest to the observer. It is also often used in still-life or food photography, where the subject is practically right up against the lens.

After many years of photography, I have decided to use this technique more and more, abandoning the hyperfocal rule in order to avoid having to shoot at very large aperture values. This is because, as I mentioned before, if the aperture value is too large, we don’t obtain good images, at least not the same as what we could obtain at apertures values that get the best out of our lens. You only have to search the Internet with a query such as “What is the optimal aperture value to use” to find the answer. You will also be surprised to discover that, even despite their hefty price tags, our lenses come up short in terms of diffraction and aberrations.
Just be careful not to risk getting bogged down trawling endless discussions on photography forums, or browsing extremely technical websites that review equipment using complex diagrams. Instead stick to this rule of thumb: f/8 and don’t be late! Which essentially means that it’s a good idea to shoot at apertures of between f/8 and f/10.

Now let’s get down to some serious photography.

First things first, how many exposures should I take and how?
Decide on the composition of your image, the only limitation being the minimum focal distance of your lens, which you obviously cannot go below. Try to use the most stable and ergonomic tripod possible. It’s very important when taking the sequence of shots that the camera doesn’t move between exposures. I opted for the brand-new BeFree Advanced tripod in aluminum with an M-Lock fast twist-locking system and 494 ball head with three excellent independent controls for precise framing operations (https://www.manfrotto.co.uk/collections/supports/befree-advanced-series). It’s an excellent compromise for those who are trekking into the mountains and therefore need to limit the weight of their equipment, while maintaining stability and fast, intuitive operation.
After testing it on some of the most treacherous and uneven terrain, I had no qualms about pairing it with my 2 kg equipment (800 g Canon camera and 1100 g Tamron lens), which is well below the 8 kg load capacity for which the tripod is designed.

Composizione e istogramma Roberto Moiola

Roberto Moiola Photography

After configuring the usual camera settings, such as the ISO, shutter speed and aperture (in my case ISO 100, f/10 and 1/30s) we get down to the nitty-gritty, which is focusing. Check out this photo of my lens:

Roberto Moiola Photography

After setting Manual mode (1) on the lens, let’s analyze the scale that indicates focusing distances. There are two different scales, but we will obviously refer to the metric scale indicated by the “m” symbol (2).

Let’s start by setting the focus to the distance between the closest point of my subject and the sensor plane: it’s important to remember this and avoid miscalculating the distance between subject and lens. The sensor plane is exactly in the middle of the camera body.

So, depending on the lens you are using, set a value of 0.20 cm, for example, then take a succession of shots, gradually increasing the focusing distance after each exposure. So for example, set 0.35 cm and shoot, then 0.50 cm and shoot again…and so on. The last shot must be taken using a value of infinity, so that it captures the sharpest possible image of whatever is on the horizon, which in my case is mountains. Decide how many shots to take, but remember that it’s always better to give yourself some leeway, so take plenty.

Once finished, we move on to the editing. First of all, we use a software product such as Lightroom, which allows us to process our images in batches, making the standard color temperature adjustments and improving the brightness, contrast and color. Processing images in batches means that the editing settings must be the same for all images.

At this point, the images are ready for merging, which is done using dedicated professional software called Helicon Focus. Here are some screenshots that show the editing steps I performed on Adobe Lightroom and Helicon Focus, steps that I cover more extensively in a number of video tutorials, if you’re interested. Feel free to contact me to find out more. In the meantime, I wish you happy snapping and successful focus stacking…the blossoms await you!

Photography Roberto Moiola

Photography Roberto Moiola

Photography Roberto Moiola

Our Brands