How I Focus Stack for Perfectly Sharp Landscape Photos

Mark Denney
Mark Denney
Mar 4, 2020 • 8 min read

You find a composition you love, get a strong foreground close to your wide angle lens, and take the photograph. The foreground looks fantastic. Then you zoom into the background, and it’s soft.

So you focus on the background and try again. Now the distant landscape is sharp, but the foreground isn’t.

This was one of my biggest frustrations when I started using a wide angle lens for landscape photography. The solution I turn to is focus stacking. It lets me combine the sharpest areas from several photographs into one image that’s in focus from the nearest foreground detail all the way to the background.

Blending multiple photographs might sound intimidating, but the workflow is surprisingly straightforward. Most of the heavy lifting happens automatically in Photoshop. The important part is giving it a good series of images to work with.

What You'll Learn

  • Capture the same composition at several focus distances while keeping the camera steady.
  • Synchronize lens corrections before opening your source photographs as layers in Photoshop.
  • Align the layers, then use Stack Images to blend their sharpest areas automatically.
  • Inspect the finished blend closely, especially when the scene contains moving water.

What Is Focus Stacking?

Focus stacking means photographing the same composition several times, with each photograph focused at a different distance. During post-processing, you blend those images together, using the areas of greatest focus from each one.

Rather than choosing between a sharp foreground and a sharp background, you combine both, along with the sharp midground details in between.

The number of photographs depends on the composition. Some scenes may only need two images. Others need several more. There isn’t a single number that works for every landscape.

The example I’m using here is a desert composition with a cactus very close to the camera and a distant rock formation behind it. I was working at 16mm, and even at f/16, I couldn’t get the entire scene sharp in a single exposure. The cactus was simply too close.

Lightroom displaying a vertical desert photograph with a foreground cactus and distant rock formation
The close cactus and distant cliffs make this composition a good candidate for focus stacking.

Stopping down further wasn’t the answer I wanted. Using an aperture such as f/22 might increase depth of field, but it can also introduce diffraction and reduce overall image sharpness. A focus stack gave me a way to keep the detail I wanted throughout the composition.

Capture the Focus Stack in the Field

The capture process is simple: keep the camera still and work your focus through the scene, starting close and moving farther away.

1. Set Up a Sturdy Tripod

A solid tripod is important because every photograph needs to have essentially the same composition. Once you’ve framed the scene, be careful not to bump the camera, shift the tripod, or change the framing between exposures.

Photoshop can correct small alignment differences later, but that doesn’t mean you should rely on it to rescue unnecessary camera movement.

2. Choose Your Aperture and a Small Focus Point

I generally work between f/11 and f/16 for this process. That gives me a useful amount of depth of field in each individual photograph.

I also use a small focus point so I can be specific about where the camera focuses. The goal is to move that point through the different distances in the composition without moving the camera itself.

3. Work from Foreground to Background

  1. Focus on the nearest foreground detail. In this composition, that was the cactus close to the lens. Focus, then take the photograph.
  2. Move the focus point farther into the scene. Focus on a more distant area and take another photograph.
  3. Continue through the midground. Capture additional focus distances as needed for the composition.
  4. Finish with the background. Focus on the distant landscape and take the final photograph.

Think of foreground, midground, and background as the basic progression, not a rule that you must take exactly three frames. I used six source photographs for this particular stack.

4. Mark the Beginning and End of the Series

Here’s a small habit that can save a lot of time at the computer: before taking the first photograph in your stack, put your hand in front of the lens and take a picture. After the last photograph, do the same thing again.

Those hand photographs act as visual bookends. When you import a card full of similar compositions, you can immediately identify where each focus stack starts and ends.

I forgot to do that for this series, so I had to inspect the individual photographs to work out which frames belonged together and where each one was focused. It’s manageable, but the hand markers make it much easier.

Identify and Prepare the Images in Lightroom

Back at the computer, I first identify the photographs that make up the stack. For this example, I gave the six source images a five-star rating, then filtered by that rating to isolate them.

It’s worth checking the first and last photographs at a close zoom before moving on:

  • In the foreground-focused photograph, the cactus spines are sharp, but the distant rock formation is soft.
  • In the background-focused photograph, the rock formation is sharp, but the nearest parts of the cactus are out of focus.

That comparison makes the reason for stacking obvious. Each image has detail that the other one lacks.

Apply Lens Corrections First

Before sending the photographs to Photoshop, I apply lens corrections. In Lightroom, that includes Remove Chromatic Aberration and Enable Profile Corrections.

Correcting the lens’s natural vignetting is useful here. I want the source photographs to be consistent so they blend together as cleanly as possible.

There’s no need to repeat those adjustments on every image individually. Apply them to one photograph, select the rest of the series, then right-click and choose Develop Settings > Sync Settings. In the synchronization dialog, choose the relevant lens correction settings and click Synchronize.

Lightroom Synchronize Settings dialog above a row of selected cactus landscape photographs

At this stage, I’m preparing the images for blending rather than doing the complete creative edit. My preference is to finish the overall look after the stack has been assembled.

Open the Photographs as Layers in Photoshop

With all the source photographs selected in Lightroom’s Library module, right-click one of them and choose Edit In > Open as Layers in Photoshop.

This creates a single Photoshop document containing the photographs as separate layers. In this example, six photographs become six layers.

Lightroom context menu with Open as Layers in Photoshop selected

Give the computer a little time to open everything. The wait depends on the number of photographs, their file sizes, and your computer’s performance.

Once the document opens, the eye icons beside the layers control visibility. Turning layers on and off lets you compare the source photographs. You may notice that the composition shifts slightly between them, even though you used a tripod.

That’s why I align the layers before attempting the blend.

Align the Layers Before Blending

Select all the source layers in the Layers panel. One easy way is to click the top layer, hold Shift, and click the bottom layer.

Then go to Edit > Auto-Align Layers. Choose Auto and click OK.

Photoshop Auto-Align Layers dialog showing projection options over the desert photograph

This step lines up the content across the photographs. Even with a sturdy tripod and careful technique, there can be small changes as you adjust focus. Aligning first gives Photoshop a better foundation for combining the sharp areas.

The operation can take a minute or two, depending on the files and computer. It may also leave a narrow uneven area around the edges of the document. That’s normal, and you can crop it away after blending.

For this workflow, I use Lightroom to organize and prepare the photographs, but the actual alignment and focus blending happen in Photoshop. You need Photoshop or another application capable of combining the images this way.

Blend the Sharpest Areas Automatically

Keep all the aligned source layers selected, then choose Edit > Auto-Blend Layers.

In the dialog, choose Stack Images and click OK.

Photoshop Auto-Blend Layers dialog with the Stack Images option selected

This is where the process becomes much less complicated than it sounds. Photoshop examines the individual photographs, determines which areas are in the greatest focus, and creates masks to combine those areas into a single result.

You don’t have to manually trace every cactus spine or paint a complicated selection around every shrub. For a scene like this, the automatic blend does that work for you.

It isn’t perfect every time, but in my experience it works extremely well most of the time.

Inspect the Result and Understand the Masks

Once Photoshop finishes, zoom in and check the image from front to back. Don’t judge the stack only by how it looks when the entire photograph fits on the screen.

For this desert scene, I check the closest cactus spines, the vegetation and ground through the middle of the frame, and finally the distant rock formation. The goal is consistent sharpness throughout, without the soft regions visible in the individual source photographs.

You can also examine how Photoshop built the result. Temporarily hide the merged result, if one was created, and turn the masked source layers off and on. As you reveal them, you’ll see different pieces of the landscape appear.

Photoshop displaying partially revealed cactus landscape layers with white gaps and mask thumbnails in the Layers panel
Revealing the masked layers shows how Photoshop assembles sharp detail from different photographs.

The black-and-white thumbnails beside the source layers are the masks. They identify which portions of each photograph contribute to the blend and which portions are hidden.

It’s a useful way to understand focus stacking: Photoshop is assembling the finished photograph from the sharpest pieces of the source images.

Crop, Save, and Finish the Edit

After inspecting the blend, crop away any uneven edges left by the alignment process. You can do this in Photoshop or leave the crop for your preferred editing application.

From here, the finishing workflow is up to you. You can continue editing in Photoshop, or save the blended image and return to Lightroom, Capture One, or whichever application you normally use.

I prefer to save the stacked file and finish the creative edit afterward. That’s when I work on the overall white balance, exposure, and other adjustments that shape the final photograph.

If you no longer need the separate layers in your working file, flattening the image combines them into one layer and reduces the file size considerably. Just be aware that a flattened file no longer gives you the same access to those individual masks and source layers.

The sequence I find easiest is prepare the source photographs, build the focus stack, then edit the finished image. That avoids repeating the full creative edit across every source photograph.

When Automatic Focus Stacking Struggles

The main situation where I’ve seen Photoshop struggle is a scene containing movement, particularly moving water.

If that part of the scene changes between photographs, Photoshop can have difficulty deciding which areas to use. The automatic blend may need more attention than it does with a mostly stationary landscape.

In those situations, I turn to manual blending. That’s a separate technique rather than another automatic setting, but it’s worth knowing that an imperfect automatic result doesn’t mean the photographs are unusable.

Start by testing this workflow on a scene that stays relatively still. Once you’ve captured and blended a couple of stacks, the process becomes much more familiar.

The next time a close foreground looks sharp but the background doesn’t, you don’t have to abandon the composition. Keep the camera steady, photograph a series of focus distances, and combine the detail afterward. It’s a simple technique that can make a tremendous difference in wide angle landscape photography.

This tutorial was sponsored by Squarespace, which offers photography portfolio designs, customizable galleries, online scheduling, and email campaigns. The associated offer is a free trial and 10% off your first purchase through squarespace.com/markdenney.

Share

Mark Denney

Practical landscape photography lessons from Mark Denney, covering camera settings, composition, editing, and life outdoors.

© 2026 Mark Denney
Powered by Convella