Focus Stacking: Your Ultimate Guide

10 min read

Last updated:

focus stacking.

Focus stacking is a technique to create sharp focus across the entire photograph. This method uses a number of images that are in focus at different focal points but have a softer focus in other planes. Then, these images merge to form a composite photograph that is in focus throughout the frame.

The process is fairly easy to learn and resolves the issue of the very shallow depth of field that is common with telephoto and macro lenses.

In this post, we’ll discuss focus stacking in detail, why it is useful, and when to use it. Also, we’ll outline a step-by-step process to create images that are in focus front-to-back and point you toward the best focus stacking software.

What is Focus Stacking?

This process is also known as Z-stacking, focus blending, and focal plane merging. Focus stacking images were developed to overcome the limitations of lenses, especially shallow depth of field. As great as they are, modern photography lenses have a depth of field that decreases as focal length increases and as the camera moves closer to the subject.

To focus stack images, capture a series of shots of the same scene without moving the camera. Focus the lens on multiple objects or areas in the scene. Move the focus point as needed to have everything in focus. How many shots are needed depends on the scene. It may require just two or three images.

Or, it may require a dozen or more, as many images as required to get everything in focus across various focal planes. The size of the scene being photographed and the camera settings determine the number of images required.

Then, these images merge in focus stacking software. And the result is the depth of field across the entire image with everything sharply focused, as in the photograph below.

wicker rattan decorative balls sharp focus.

When Should I Focus Stack?

Since the focus stacking technique requires extra work in post processing, we want to resort to it only when necessary. So the answer to “when” is anytime you want an image that is tack sharp in both the foreground and the background but is impossible to achieve with a single frame.

Each of the following scenarios will benefit from focus stacking in order to get optimal sharpness throughout the scene.

  • Landscape photography with a foreground that is close to the camera and background much farther away.
  • Capturing an image of a subject close to the camera with an ultra-wide angle lens.
  • Employing a telephoto lens with an open aperture and wanting the entire scene in focus.
  • Maintaining clarity and focus in macro and product photography.
  • Avoid subjects in motion when it comes to focus stacking. This is not a technique for sports or wildlife photography.

Landscape Photography

If you’re shooting a scene with subjects close to the camera as well as far away, you can still get everything in focus.

You may try a narrow aperture, such as f/11 or even f/22, and find that you still are not tack sharp from front to back. The distance between the foreground and background is too great to capture a sharp image throughout the entire frame.

landscape photography.

Start with a sharp foreground. Focus on the subject closest to the camera, get a shot, move to a second focal point, make sure the depth of field overlaps, get a second shot, and so on. Then, merge those photos in post processing.

Macro Photography

In macro photography, the lens is so close to the subject, and the depth of field is so shallow that you may need to take multiple images of a single subject.

For example, a closeup of a seashell is nearly impossible to get the entire subject in sharp focus. And again, even narrow apertures won’t capture all parts of the shell in focus. So the solution is taking multiple photos for focus stack merging.

seashell on black background for focus stack merging.

A series of frames with different focus points puts the entire image in focus one frame at a time. Then, a rendering process merges those frames into one razor sharp photograph.

Product Photography

Let’s say you’re shooting jewelry products, and the client wants everything in focus. Here, the process is similar to that of macro photography.

Focus first on the area closest to the camera and take the shot. Focus again on a second area, making sure that the depth of field overlaps with that of the first image. Continue the process until you have frames with everything in focus.

From there, merge the series of frames into one client-pleasing photo.

product photography.

Capture the Images for Focus Stacking

First of all, I recommend using a sturdy tripod. You want to eliminate even slight camera movement between shots to ensure the frames align perfectly when you load the files into your focus stacking software. The tripod also allows for a slower shutter speed. In addition, you may want to opt for a remote shutter release.

camera on tripod with remote shutter release at sunset.

Some photographers recommend using manual focus to capture the progressive focal points. However, you may find that manual or auto focus work, depending on the situation. Just keep a light touch on the camera to avoid movement between frames.

In-Camera Focus Change

Some camera models offer an automatic focus change feature designed for focus stacking with various names.

  • Nikon: Focus Shift
  • Canon: Focus Bracketing
  • Sony: Focus Stacking
camera photo shooting menu set for focus shift.

The feature makes focus stacking photography much easier. Very simply, you select the number of images to capture and the focusing increments. Then, focus on the subject nearest the camera and start the process.

The camera takes care of the rest, delivering a series of shots ready for the second part of the focus stacking process.

camera menu settings for focus shift shooting.

Find the Sweet Spot of Your Lens

Of the three sides of the exposure triangle, the aperture is the most critical in focus stacking. Since an aperture that is wide or narrow creates issues, finding the sweet of your lens means you capture quality images for stacking.

aperture and depth of field.

A wide aperture, with its narrow depth of field, means you’ll have to take more photos to have everything in focus.

Meanwhile, a narrow aperture expands the depth of field but may lead to diffraction, a soft focus that gets progressively worse as the aperture closes.

Therefore, find the sweet spot of your lens. A test shot comparison helps you to find the balance between wide and narrow aperture; the result is a sharp focus, acceptable depth of field, and low diffraction. For the lenses that I have experience with, an aperture of f/8 to f/10 seems to be the best balance.

Shoot Images to Focus Stack in Manual Mode

Maintain consistent exposure for the images to be merged. With manual exposure, you avoid dramatic changes in exposure from image to image. Then, the merging process renders the final image with a more natural color, seamless tones, and consistent luminance.

camera mode selector set to manual exposure.

The same is true for white balance. Set it manually since the white balance may change slightly from one focus increment to the next.

Now, you’re ready to capture multiple photos and stack them into one frame that is razor sharp across the composition.

Focus Stacking in Adobe Photoshop and Lightroom

Focus stacking is a technique that emerged in the digital age. It sounds complicated and time-consuming, but modern technology simplifies the process and allows photographers to create stunning images that would otherwise be impossible.

A number of software programs perform excellent focus stacking; however, for the purpose of this article, we limit the discussion to Lightroom and Photoshop. These are two of the most popular photo processing platforms, offer great flexibility, and automate part of the process.

Import the Images into Adobe Lightroom

Focus stacking is not available in Lightroom; however, it offers some features that streamline the process and matches up nicely with Photoshop.

Open Lightroom and import your source images. The screenshot below shows the Lightroom Library module with 15 focus stack images that were uploaded.

focus stacking Lightroom library module with 15 images.

Choose one to edit in the Develop window and make the necessary adjustments to Basic Tone, Color, Noise Reduction, etc. Then, synchronize the settings. Select all the images to be stacked and click Auto Sync. In the Synchronize Settings window, select individual settings to synchronize or Check All. Click Synchronize to apply all the edits to all the source images to be merged.

The screenshot below shows the Synchronize Settings window in Lightroom.

lightroom develop module synchronize settings window.

Now, select all images and load the files into Photoshop. From the Photo menu, click on Edit In, then Open as Layers in Photoshop. Loading may take a few minutes, depending on the number of images.

Focus Stack in Photoshop

In the Layers panel at the lower right, select all your images. Under Edit, click Auto-Align Layers. This corrects for small changes between the individual images. For instance, it makes adjustments for slight camera movement from one image to another. Also, when the focus is adjusted, the focal length of the lens changes slightly. This is called focus breathing and is corrected in the Auto-Align Layers tool.

photoshop auto align layers window.

In the window that pops up, under Projection, select Auto. And under Lens Correction, you can choose Vignette Removal and Geometric Distortion. You may want to experiment with these settings to see what delivers the best final focus stacked image. Click OK. Your images are now aligned and stacked.

Now, merge the images. Under Edit, select Auto-Blend Layers. In the dialogue box that opens, select Stack Images. In addition, you might select Seamless Tones and Colors or Content Aware Fill Transparent Areas, or both. These are optional and may require some experimentation so that you know how focus stacking works.

Click OK. The auto-blend layers process may take a while, depending on the number of images and file sizes.

photoshop auto blend layers window.

Edit the Focus Stacked Images

Check all the layers of the resulting focus stacked image. If the merged image still needs adjustment, each layer can be edited as a layer mask. The Clone and Healing tools can help make further enhancements.

Also, you may need to crop the final image slightly to remove transparent edges that shifted during alignment.

photoshop crop transparent edges.

If you think you might return to the image for further work, save it as a PSD file with all layers. If you’re satisfied with the stacked image, choose Layer and select Flatten Image. And finally, save the focus stacked photograph in the file format of your choice.

Other Focus Stacking Software

While Adobe Photoshop is highly regarded worldwide, other platforms perform focus stacking.

Considered by some professional photographers as the best focus stacking software, Helicon Focus from HeliconSoft is fast and effective. It renders tack sharp images that surpass Photoshop, according to some reviews. The downside is that it’s a focus stacking specialist. But if you are stacking and blending images as part of your daily workflow, it could be a valuable tool. Helicon Focus offers a free trial and three tiers to purchase.

ON1 Photo Raw, unlike Helicon Focus, combines the functions of Lightroom and Photoshop, including full focus stacking software. ON1 also offers a free trial and multiple levels of purchase or subscription.

Another alternative to Photoshop, Zerene Stacker features excellent focus stacking software. It’s available on a trial basis but places a watermark over the final composite image. It comes in multiple versions, from student to professional.

Affinity Photo 2 delivers simplicity and convenience, drawing favorable reviews from multiple sources. The platform makes several levels of licensing available.

The Focus Stacking Niche

Focus stacking is a very useful technique. And while it’s not for every photo, you can get great results with a bit of post processing magic. Focus stacking takes your photography to another level, with clarity and focus that is sharp throughout the frame.

lake with pier focus stacking photography.

The front-to-back, total image focus is not just possible but practically certain when images are focus stacked in landscape photography. The same is true for macro and product photography. What we cannot achieve in one shot is transformed into a stunning single image with focus stacking.

In Closing

As you become a more experienced photographer, knowing when to use focus stacking will become intuitive. When you can’t capture the depth of field that you would like, you have a backup plan. And since a camera, tripod, and some software are all you need, you’re probably already equipped and won’t need an additional investment in gear.

The basic process is more involved than a normal shoot-some-images and loading them into the editing software. But a little practice and experience smooth out the rough spots. I hope this post clarifies the subject for you and opens the door to new possibilities in photography.

See more in

Shares

68
Articles
Daniel is a professional photographer who has been providing photographic and written content to websites since 1995. He maintains a photo gallery on Pictorem.com, showcasing his most recent work. In addition, Daniel is active in stock photography, with portfolios on Adobe, Getty/iStock, and Shutterstock.
Daniel is a professional photographer who has been providing photographic and written content to websites since 1995. He maintains a photo gallery on Pictorem.com, showcasing his most recent work. In addition, Daniel is active in stock photography, with portfolios on Adobe, Getty/iStock, and Shutterstock.
Responses

Your email address will not be published. Required fields are marked *


  1. Hi Daniel, always great articles you post on this website. I would love to try Focus Stacking but my Nikon D5100 is not equipt to handle this process and I would need a Nikon D850 or other newer camera. Your article piqued my interest and it’s something to put in my bucket list. Thanks

    1. The D5100 does not do focus shift shooting; however, you can still do focus stacking in post production. You would just have to manually focus your shots. Focus first on the foreground, then about mid ground, then background. You may get by with just three focus points or you may have to go with more. A steady tripod and a gentle hand on the focus ring and you can do it.

Connect with aspiring and professional photographers

Learn how to improve any kind of photography

Get access to exclusive discounts, courses, rewards, etc
Find daily inspiration in a diverse community
Recommended Articles
featured image - how to resize an image
Photo Editing
Daniel Wright

How to Resize an Image

A step-by-step guide to resizing images in various software and for different applications.

types of photography
Beginner
Daniel Wright

51 Types of Photography Genres and Styles

Photographers around the world practice a wide range of photography genres and styles. Each offers a unique perspective and creative approach to capturing images.

📷 Join us for episode #201 of the podcast! This episode features GBPW contributor, Daniel Wright!

X

Explore, Learn, and Connect: Dive into Our Classes, Podcasts, and Contests with a 7-Day Trial for Just $1

X

Your Ultimate 52-Week Photography Challenge