Focus Stacking Made Simple: Capture Sharp Photos from Front to Back
I love learning new photography techniques, as well as different methods of processing the images. Focus stacking isn’t something I anticipate using a lot, but I’ve been wanting to learn how the process works and what I can do with it. I also believe that in the places where I can use it, nothing else will really do the job. Focus stacking is the process of taking multiple photographs of the same scene, each focused on a different point, and blending them into a single image with the main objects in sharp focus from front to back, but leaving the background out of focus. If that sounds confusing, don’t worry—it’ll make more sense once you see it in action.
Focus stacking is a technique that would be very helpful in product photography. In many product photos, we still want to keep a shallow enough depth of field that the background remains pleasantly blurred. However, the shallower the depth of field, the less of the image, from front to back, will be in focus. If you had objects positioned in a line and you wanted to shoot down the line so that each object was in focus but not the background, that’s where focus stacking shines. Understanding depth of field is important for this, so if you’re not solid on that, reading my post on depth of field can provide the foundation you’ll need.
I’m going to show and explain the setup and what I used, and I’ll explain the process. This was a fun experiment. For my demonstration, I positioned four wine glasses in a line and photographed them from end to end. No single image could keep all the glasses completely sharp, but after focus stacking, all of the glasses were crisp while the background remained softly blurred.
When to Use Focus Stacking
Not every scene is a good candidate for focus stacking. The best subjects are stationary and have enough depth that a single image can’t keep everything you want sharp. Product photography, macro photography, and carefully arranged still-life scenes are ideal because nothing moves while you capture the series of images. If your subject is blowing in the wind, walking across the frame, or otherwise changing between exposures, focus stacking becomes much more difficult. It may introduce unwanted artifacts into the final image. A good rule of thumb is this: if you find yourself wishing you could keep your entire subject sharp without bringing the background into focus, focus stacking may be exactly the solution you’re looking for. This is the arrangement I set up:

How to Shoot for Focus Stacking
We don’t need much gear, but every piece serves an important purpose. You must use a tripod unless you can rest the camera on a surface for all the shots. You can’t do this well holding the camera in your hand. You’ll also need a camera that either allows manual focus or does focus bracketing. My camera does have focus bracketing, but I did it manually for this exercise. You will also need either a remote shutter or a camera that lets you set a timer.
Don’t fool yourself into thinking that you can use the shutter button for stacked focus images. When you press the shutter button, you move the camera ever so slightly. Using a remote shutter means you don’t need to touch the body of the camera, just the focus ring. If you don’t have one, set the timer option and leave it set for all the captures. The camera will be able to settle after you press the shutter, but before the exposure.
I use AI to quickly check whether my camera has a particular feature instead of digging through the manual. If your camera supports focus bracketing, you’ll usually find it somewhere in the camera’s shooting menu while the camera is in a creative mode rather than full Auto.
You will use manual focus, and you’ll move the focus point by adjusting the focus itself. You will not move the camera, just the focus ring. Lock the exposure and white balance, and keep the ISO low to produce nice, clean images. Start with the closest part of the subject in focus, then gradually move deeper into the scene until the farthest point you want sharp has been photographed.
These are my images, front to back:



The Stacking Process
I used Photoshop to stack the images, and it was pretty simple. Other programs will do it as well, such as Helicon Focus, Zerene Stacker, and Affinity Photo, but I don’t have those. If this is something you need to do regularly and consistently, you probably want to invest in one of these.
I shoot in RAW, so the first thing I needed to do was open them in Lightroom, check the exposure, and export them as JPG images. This leaves me with the original file untouched, so I really don’t care what happens to the exported images. I can always go back and export a fresh copy of the virgin image. If you don’t shoot in RAW and instead go straight to Photoshop or an equivalent, make sure that you’re not messing around with your only copy of an image.
I opened Photoshop and brought in all the images I wanted to use for my stack. I made an arbitrary choice of which image would be the “base document” that all the other images would stack onto. It really doesn’t matter which one you pick. But for the next step, I needed to know which file it was, so I made a mental note of it. The filename appears in the open tabs, but if you have several open with similar filenames, it’s easy to forget which one you need to remember.
Next, I went to one of the other files that I had open in Photoshop. In the Layer menu at the top, I selected Duplicate Layer. In the dialog box that opened, in Destination > Document, I selected the name of the base image. Photoshop listed the open files in a dropdown box, so I didn’t have to type the name in or navigate through a complex file structure. I clicked OK. Then I did it for the other files in the series. Now, in the base document, I had a layer for each of the other files, plus the base file. It doesn’t matter what order the layers are in.
First, align them
The next step was to align the layers. I selected all the layers by clicking the top layer, then holding the shift key while clicking the bottom layer. With all the layers selected, I went to the Edit menu and selected Auto-Align Layers, selected Auto, and selected OK. This step made sure that all the elements in each image were perfectly in line with the other images, just in case the camera shifted during any of the shots. It enables Photoshop to evaluate the proper focus for each object. Wait for Photoshop to finish before moving on; it doesn’t take very long.
Now, blend
Then I blended the images. With all the layers still selected, I went to the Edit menu and selected Stack Images. I made sure the box was checked for Seamless Tones and Colors, but I unchecked the Content Aware Fill Transparent Area. If I had ended up with some gaps around the edges from the alignment step, I’d have left that box checked. I clicked OK and let Photoshop do its magic. Photoshop created masks on each layer to reveal only the sharp-focus parts of each image. This is the result. It’s a subtle difference, but it’s a difference that could make the difference between saying what you want the photo to say and a near miss. Be aware that an action like this adds information to the resulting file, so the image file will be bigger than you might expect.

Common Mistakes and How to Avoid Them
The most common mistakes are going to be reasonably easy to avoid. If you let one of them slip, you won’t be happy with the stacked image.
The first one is subject movement between the shots. Photoshop may struggle to align the images correctly, and even if it does, moving subjects often create ghosting artifacts. That’s where you see a suggstion of the object, rather than the actual, complete object. Moving the camera will cause alignment problems as well. The only thing you want to change is where the focus hits.
Another problem is caused by not having enough overlap between the focus planes. The focus planes need to overlap enough that every part of the subject appears sharp in at least one frame. Photoshop needs to use that overlap to line up the images.
Finally, you want to make sure the light doesn’t change in your shots. It can really confuse Photoshop and create a problem in both alignment and stacking. If you’re using natural light and the sun goes behind a cloud, you can choose between waiting for the cloud to move or go back to the previous points and take the shots with the cloud over the sun. Just make sure that the images you select for the process are all either under cloud or in the sun.
Your Turn
I don’t know where I’ll use this technique, but it’s in my toolbox now. Ready to try it yourself? Share a use case and a stacked image in the comments!
My photography shops are https://www.oakwoodfineartphotography.com/ and https://oakwoodfineart.etsy.com, my merch shop is https://www.zazzle.com/store/south_fried_shop.
Check out my New and Featured page – the latest photos and merch I’ve added to my shops! https://oakwoodexperience.com/new-and-featured/
Curious about safeguarding your digital life without getting lost in the technical weeds? Check out ‘Your Data, Your Devices, and You’—a straightforward guide to understanding and protecting your online presence. Perfect for those who love tech but not the jargon. Available now on Amazon:
https://www.amazon.com/Your-Data-Devices-Easy-Follow-ebook/dp/B0D5287NR3
