Facebook Pixel Focus Stacking: The Ultimate Guide (With Step-By-Step Instructions)

Focus Stacking: The Ultimate Guide (With Step-By-Step Instructions)

A guide to focus stacking for tack-sharp images

Want every inch of your composition to look sharp? Discover how to transform your images using a powerful focus-stacking approach.

Focus stacking is a technique that takes photography to a whole new level; it helps you achieve an astounding depth of field and breathtaking clarity in your shots. Whether you’re a seasoned pro or an enthusiastic beginner, focus stacking is a game-changer that can elevate your images to new heights.

And while it’s a technique that photographers often find intimidating, it’s actually fairly straightforward – as long as you use a tried-and-test approach. That’s where I come in. I have plenty of experience using the photo stacking technique to capture tack-sharp shots of a variety of subjects.

In this article, I draw on my background to explain everything you need to know about focus stacking, including:

  • What it is and what the technique offers for photographers
  • When you should use focus stacking in your photos (and when you should avoid it)
  • The simple, step-by-step process to stack and merge your files
  • Advanced tips and tricks to improve your image stacks

So get ready to take your skills to the next level as we embark on a fascinating journey into the world of focus stacking. Here’s my guarantee: By the time you’re done reading, you’ll be able to stack landscape photos, macro photos, and much more.

Let’s dive right in, starting with the basics:

What is focus stacking?

Focus stacking is a technique designed to achieve a deep depth of field by blending (or stacking) several images together. Each stacked shot is focused in a different spot, so the combined depth of field is deeper than the depth of field produced by any of the individual images.

Focus stacking in photography
If you want to keep both the foreground elements and the background elements sharp, focus stacking is a viable option.

Feeling confused? Don’t be. While the concepts may sound tricky, the basic process is very simple:

  1. You take several images of a scene, making sure to focus on each part (i.e., the foreground, the middleground, and the background).
  2. You blend the images to achieve a final file that features a sharp foreground, a sharp middleground, and a sharp background.

Note that focusing stacking doesn’t require fancy equipment, either; you can focus stack with a standard camera (even a smartphone camera, in fact), though I do recommend you work with a tripod and a manual focus lens if you can, as I discuss in a moment.

When should you focus stack your photos?

Focus stacking in photography

Focus stacking is designed to overcome the limits of depth of field. In other words, focus stacking is only necessary if you’re faced with a scene that can’t be well handled by your camera setup’s current depth of field capabilities.

Now, if you’re familiar with camera optics, you’ll know that the depth of field is affected by three key factors:

So as you zoom your lens, move closer to your subject, or widen your lens aperture, the amount of the scene that’s in focus will decrease. On the other hand, as you widen your lens, move away from your subject, or narrow your lens aperture, the amount of the scene that’s in focus will increase.

In most situations, you can handle your depth of field requirements without focus stacking. If you’re faced by a sweeping landscape, you can choose a wide-angle lens and you can narrow your aperture; that way, you can capture the entire scene in focus using a deep depth of field. And if you’re faced by a standard close-up subject such as a flower, you can back up slightly from your subject and narrow your aperture to get your desirable depth of field.

But in a few situations, you won’t be able to achieve a deep enough depth of field to keep the entire shot sharp (from the nearest foreground element to the most distant background element).

Specifically, you’ll run into depth-of-field problems when working with:

  1. Very deep landscape scenes
  2. Ultra-close macro subjects
  3. Deep building interiors

Your depth of field just won’t be deep enough, and only parts of the shot will turn out sharp (while other parts will turn blurry).

Of course, you can always try to back up or use a wider lens, but that isn’t always feasible (especially if you’ve already chosen your composition). And you can narrow your aperture, but at a certain point, you’ll start to run into optical problems caused by diffraction.

In such cases, you have two options:

You can take a single shot with a shallower depth of field and try to make the effect work. (Shallow depth of field shots can look beautiful when done carefully!)

Or you can focus stack.

Essential focus-stacking gear

Focus stacking is a technique that can be done with just a smartphone camera and zero fancy equipment! However, if you’re serious about getting the best results, there are a few basic items that I highly recommend investing in. Here’s what I recommend:

  • A tripod. A tripod is your steadfast companion in focus stacking. It keeps your camera steady and ensures consistent composition as you capture a series of images. It’s a game-changer when it comes to achieving sharp, aligned shots.
  • An interchangeable-lens camera. To have full control over your camera settings and the flexibility to swap lenses for different compositions, an interchangeable-lens camera is the way to go. Whether it’s a mirrorless camera or a DSLR, any model will do the job just fine. Don’t fret too much about the specific camera model; focus on the features that suit your genres of interest.
  • A lens that offers manual focusing. When it comes to focus stacking, having a lens capable of manual focusing is crucial. Manual focus allows you to precisely control the point of focus by rotating a ring on the lens. Fortunately, most lenses offer a switch for toggling between manual and autofocus, but before you get started, it’s essential to ensure you have at least one lens that can be manually focused.
  • Focus-stacking software. While some cameras offer built-in automatic focus stacking, I strongly recommend using dedicated stacking software for more control and optimal results. Options like Photoshop provide solid stacking capabilities, but you might also want to consider specialized programs like Helicon Focus or Zerene Stacker for their powerful stacking features.

How to focus stack: step by step

Want to get started stacking your images? Let’s take a look at how you can successfully carry out this technique, from shooting in the field to blending the images on the computer.

Step 1: Pick your subject, choose a composition, and set your exposure

Focus stacking starts by locking down a subject and a composition.

Mount your camera on a tripod and carefully compose your photo. If you don’t have a tripod, you can do handheld focus stacking, but you’ll need to maintain the composition as carefully as possible.

(Quick aside: You’ll struggle to focus stack scenes that feature moving subjects, which is part of the reason why portrait photographers, wildlife photographers, and street photographers rarely use this technique. Pick a scene that will remain steady for the few minutes it takes to set up your shot.)

Next, set your camera to Manual mode, then dial in an exposure. You should use the camera’s exposure meter and histogram to guide you, and note that the exposure will remain fixed across all focus-stacked shots. Once you’ve set your exposure, you should not change it, or else you’ll need to do extra work standardizing the exposures when blending your shots later. (For the same reason, I’d also recommend you select a white balance preset and dial it in. It doesn’t need to be perfect – you can always make changes in post-processing – but if you can keep the white balance consistent, it’ll make your job much easier down the line.)

And by the way: Before you proceed with the rest of the focus-stacking steps, make sure that your scene actually requires focus stacking. If you’re using a wide-angle lens, you can probably shoot most landscape scenes at f/16 or so and get an image that’s sharp throughout. It’s only when you add in close foreground objects – thus increasing scene depth – that focus stacking becomes essential.

Not sure whether focus stacking is necessary? Take a test shot with your lens focused about one-third of the way into the scene, then review it on your camera LCD. Zoom in and check both the foreground and background. If everything turned out sharp, then you’re good to go – but if parts of the shot are blurry, then you’ll need to proceed with the focus stacking technique.

Step 2: Switch your lens to manual focus and take your first shot

Set your lens to manual focus. (There’s usually a little AF/MF switch on the barrel.)

Then manual focus on the nearest part of the scene, such as the sand in the foreground (if you’re shooting a seascape) or the tip of the flower petal (if you’re shooting a close-up).

(If you’re using a camera that doesn’t offer manual focus, then you can autofocus on the nearest part of the scene. Just make sure that you get the autofocus point exactly where you want it.)

Take the first shot, making sure your exposure and composition remain locked in place.

Step 3: Take your remaining images

At this point, you simply need to take a series of images while slowly moving the focus away from the foreground. Adjust the focus, take a shot, adjust again, take another shot, and so on, until you’ve captured a sharp version of every part of the scene.

How many images do you need? That really depends on your scene/subject. Most focus-stacked landscapes require just two or three shots (one for the foreground and one for the background, or one each for the foreground, middleground, and background). The exception is if the foreground is unusually close to your lens or you’re using a telephoto focal length, in which case you may need four, five, or more images.

focus-stacked building with fence and garden
To get this shot, I took three photos. The first was focused on the fence, the second was focused midway into the scene, and the third was focused on the front of the house.

Macro focus stacking, on the other hand, is more time-consuming. You’ll often need to shoot 8+ images (and sometimes upwards of 20, especially if you’re working at 1:1 magnifications or beyond). The image on the left is a single shot, but the image on the right is a 12-image focus stack:

two versions of a flower image, one with focus stacking and one without

(If you’re looking to get into serious macro focus stacking, I’d recommend you invest in a focus rail, which will help you adjust your point of focus more precisely.)

Over time, you’ll get a sense of how many shots are required for a focus-stacked scene, but when in doubt, take too many images, not too few. You can always discard similar shots later, but if you fail to capture enough shots, you’ll end up with a bad final result.

aster flowers focus stacked

Step 4: Blend the images in post-processing

Blending a handful of files might sound difficult, but it’s actually pretty easy; various programs, including Photoshop, automate the process. The instructions below reference Photoshop, but you can get similar (or better) results with a program like Helicon Focus.

First, add your focus-stacking series to your hard drive. Open Photoshop, then select File>Scripts>Load Files into Stack:

selecting the Load Files into Stack option in Photoshop

A Load Layers window will appear; click Browse, then select your files:

Clicking the Browse option in Photoshop

Check the Attempt to Automatically Align Source Images box in the Load Layers window. Then hit OK.

Checking the Attempt to Automatically Align Source Images in Photoshop

Take a look at the Layers palette. You should see all of your files listed as separate layers. Select every layer, then go to Edit>Auto-Blend Layers.

Make sure to check the Stack Images option, and be sure to check the Seamless Tones and Colors checkbox:

Check the Seamless Tones and Colors box in Photoshop

Finally, click OK.

After a few moments of processing, you’ll see your final stacked image appear. You may notice issues along the edges, which you can simply crop away.

Finally, select Layer>Flatten Image, and you’re done! You can now edit the photo like any other file.

One recommendation:

Before you export a stacked image, zoom in to 100% and check over the details. Occasionally, the software will struggle to blend the files, which will result in a few strange artifacts. You can remove these pretty easily with the Healing Brush, but if you don’t check, you may end up exporting an imperfect shot.

Tips and tricks for improving your image stacks

Focus stacking in photography cherries

Once you understand the focus-stacking basics, you’ll be able to get solid results by following the step-by-step instructions I shared above. However, if you want to take your stacks above and beyond, here are a handful of additional expert tips:

1. Watch out for moving subjects

Getting beautiful focus-stacked shots can be pretty straightforward, especially when you’re photographing scenes with minimal movement, like still-life images or desert landscapes. But as soon as you add movement into the mix, things get more complicated. Let’s say your scene features a tree waving in the wind. In this case, each file in the stack will capture the tree in a different position, making it very difficult, or even impossible, to blend effectively.

To overcome this challenge, it’s crucial to shoot without movement in the scene. If you’re photographing a flower on a windy day, consider using a plamp to hold it in place or even use your body to block the wind. By ensuring a stationary subject, you’ll be able to capture a series of images with consistent focus points for successful stacking.

Alternatively, if capturing a moving subject is essential to your composition, you can take a different approach. Capture an image stack while ensuring the moving subject is captured with sufficient depth of field in a single image. Then, if needed, you can use manual masking techniques to overlay the sharply focused moving subject onto the scene.

With careful masking, you can also remove any areas where the moving subject created a ghosting effect, resulting in a seamless and striking focus-stacked image.

2. Use a remote release when stacking in low light

Focus stacking in photography

Stacking can be done in good light, in which case your shutter speed will generally be fast enough to prevent vibrations caused by pressing the shutter button.

But if you’re shooting indoors or after the sun has set, you may struggle to get a shutter speed above 1/60s or so. If that’s the case, your tripod will prevent more general camera shake, but a remote release offers a handy method of avoiding blur caused by each press of the shutter button. This device allows you to trigger the camera from a distance, ensuring minimal vibrations and maximum sharpness throughout your image stack.

Here’s how it works in practice: After adjusting the focus, you can wait for any vibrations to settle, then trigger the camera using the remote release. Once the image is captured, you can adjust the focus again, wait for stability, and repeat the process until you have obtained the complete series of images for your focus stack.

3. Don’t be afraid to try handheld stacking

While using a tripod is highly recommended for focus stacking, it’s not always feasible or practical in every situation. Thankfully, there’s an alternative technique known as handheld focus stacking that can produce impressive results without the need for cumbersome support.

To perform handheld focus stacking, you’ll need to keep your framing consistent as you capture a series of images. You can lean against a sturdy object or find a comfortable position to stabilize yourself. The key is to minimize camera movement between shots.

While handheld stacking may not yield the same level of precision as using a tripod, the results can still be quite solid. It’s important to note that you may lose some content along the edges of the frame, requiring a crop during post-processing. To mitigate this, it’s advisable to deliberately compose a little wider than your desired final composition, providing room for cropping later on.

Keep in mind that practice and experimentation will help you refine your handheld focus stacking technique. With experience, you’ll be able to capture a series of images with consistent framing and achieve impressive focus-stacked results even without a tripod!

4. Combine focus stacking and HDR photography for outstanding results

Focus stacking in photography

HDR (high dynamic range) techniques are often favored by landscape photographers, allowing them to capture scenes with a high dynamic range (i.e., a scene with very bright and very dark areas, such as a vibrant sunset). Modern cameras often struggle to capture such scenes without blowing out the highlights or underexposing the shadows.

The HDR technique involves capturing a series of shots of the same composition, each exposed separately for the dark portions, light portions, and mid-toned portions. These images are then blended together in post-processing to create a final result that retains detail throughout the entire dynamic range.

Now, what if you want to focus stack a scene with a high dynamic range? The good news is that you don’t have to choose one technique at the expense of the other. You can combine focus stacking and HDR for exceptional outcomes.

Instead of capturing just one image each time you adjust the lens focus, capture multiple images for each focus point, ensuring that you also expose separately for the different tones in the image. In post-processing, merge each set of bracketed images in the stack, creating an HDR version of each file. Once you have the HDR versions, continue with the standard focus-stacking approach.

By employing this combined technique, you can achieve a final image that not only boasts incredible depth of field through focus stacking but also maintains accurate exposure across the scene’s entire dynamic range. This powerful combination allows you to capture and showcase scenes with stunning detail, even in challenging lighting conditions.

5. Achieve precise macro stacking with a focusing rail

Focus stacking in photography

When you’re working at ultra-high magnifications in order to capture an insect, a flower, or some other tiny object in sharp focus, the depth of field will often be so tiny, and each movement of the focus ring so significant, that you struggle to capture your series of images for stacking.

Fortunately, there is a solution: a focusing rail. This handy tool attaches to your tripod and supports your camera, allowing you to make incremental adjustments in the focus position. Instead of manually adjusting the focus ring at ultra-high magnifications, you can set the focus on the front of your subject, take a shot, and then use the focusing rail to make subtle and precise adjustments to the focus point for subsequent shots.

By using a focusing rail, you eliminate the need for delicate manual adjustments, making the process of capturing a series of images for stacking much more manageable. It provides you with the control and precision needed to achieve optimal focus throughout the subject, ensuring each image in the stack contributes to a final result with exceptional detail and clarity.

While a focusing rail is not a mandatory tool for macro stacking, it significantly simplifies the process and improves the quality of your stacked images. So if you plan to do frequent close-up photography with stacking, purchasing a focusing rail can make a huge difference!

Focus stacking in photography: final words

Now that you know what focus stacking is and how it works, you’re ready to achieve great results with nothing more than a camera, a tripod, and a bit of Photoshop wizardry.

So go out there, unleash your creativity, and experiment with focus stacking. Capture the delicate petals of a flower, the rugged textures of a landscape, or the mesmerizing details of a macro subject. Do some stacking, and watch as you produce a stunningly sharp photo!

Now over to you:

What do you plan to focus stack? Have you tried focus stacking before? Share your thoughts (and focus-stacked images!) in the comments below.

Read more from our Tips & Tutorials category

Bruce Wunderlich
Bruce Wunderlich

is a photographer from Marietta, Ohio. He became interested in photography as a teenager in the 1970s, and has been a passionate student of the art ever since. Bruce recently won Photographer’s Choice award at the 2014 Shoot the Hills Photography Competition in the Hocking Hills near Logan, Ohio. He has also instructed local classes in basic digital photography. Check out Bruce’s photos at Flickr

I need help with...