Focus stacking is a way of achieving greater depth of field by combining multiple photos in Photoshop, each shot having different areas of the frame in focus. This is a photography technique I’ve used sparingly, (most recently in the Death Valley and Big Sur photos in this post) because it’s a bit of a hassle. However, in the right situation focus stacking achieve impressive results.
First of all, when I say it’s a hassle, where it’s a hassle might be surprising. It’s not a hassle in post processing at all. Photoshop uses all sorts of magical leprechauns and/or algorithms to accomplish crazy stuff, and focus stacking in Photoshop is as simple as a 15 second process involving 2 automatic steps. I was really surprised to learn it was so easy. This is actually why I hadn’t done it previously–I assumed getting the stacking right involved a lot of masking by hand or some special equipment in the field to move the camera slightly when focus changed.
Where it is a hassle is in the field, where it almost requires the use of a tripod, live view, and patience. Patience is something I’m short on, so even though I like the results of the technique, I think I mostly am fine with slightly sloppier results, to be honest. We’ll discuss all of that in turn, though, so let’s start with the technique.
The Technique: Focus Stacking
The technique here can be applied to a variety of photos, but I’m going to discuss it here in terms of wide angle landscape photography where you want a sharp shot from to back. Now, most of the time, this can fairly easily be accomplished by going for an aperture of f/16 or so.
However, there are some situations where you might want to get really close to your foreground subject. In those situations, either manually focusing just past the foreground and cranking the aperture to f/22 and being okay with a softer photo and extremes in the foreground and background that might not be tack sharp or focus stacking are your options. Perfectionists will want to go the photo stacking route.
If you’re photo stacking in landscape photography, a tripod is a must. Use manual settings for exposure so levels are consistent across shots. Once you have your composition lined up, you will typically want to enter live view as its autofocus is more accurate corner to corner and zooming in on focus is really helpful.
From there, focus on the foreground, turn off autofocus, exit live view, take a photo, then enter live view and repeat for the middle ground and background. When all is said and done, you’ll have 3 exposures: 1 of the foreground, 1 of the mid-ground, and 1 of the background in focus. Multiply this times whatever if you’re bracketing.
The next step is post processing. I would recommend starting by fully editing your three individual focus frames in Lightroom, Adobe Camera Raw, or whatever software you’re using. This could even mean processing each photo or set of photos in HDR software–just make sure when all is said and done, you have 3 photos with consistent exposure to open in Photoshop.
Once you open the images in Photoshop, stack them as layers in a single photo, select all of the layers, and click Edit -> “Auto Align Layers.” In the dialogue box, leave it at “Auto” and let Photoshop work its magic. This first step is key because the change in focus will cause slight shifts in the image, and Photoshop removes these shifts. This is the same feature you’d use when aligning layers of a handheld series of bracketed photos if you wanted to do HDR via hand by layer masking, by the way.
Next step, Edit -> “Auto Blend Layers” -> Stack. Photoshop will then apply a series of crazily thorough layer masks to your photos, giving you a photo that is sharp front to back in an instant (well, assuming your computer is fast). The first time I did this (literally this morning, for this photo) I was blown away by how quickly Photoshop executed this, and how accurate it was. Here’s a pretty good video demonstrating the step by step process if you’re a visual person. Note that this guy did it for handheld shots, but since he wasn’t shooting a landscape, the same rules don’t quite apply.
If Photoshop wasn’t totally accurate, merge the layers here, then stack in the in-focus photo for the area it messed up, repeat the auto-align process, and layer mask. For the photo above, I had to do this, as it was a windy day and the flowers in my shot were blowing around. I guess that gave Photoshop some problems, but it was only in a small area of the frame, and really easy to fix.
The Photo: Big Sur Lilies
To illustrate the focus stacking technique, here’s a photo I recently shot on my latest banzai photography trip last week that took me up the Pacific Coast Highway into Big Sur, into the Bay Area through San Francisco, and then up to Lake Tahoe before heading home. All in about 36 mostly sleepless hours.
This area of lilies in Big Sur has become incredibly popular, and many of the lilies were trampled this year when we arrived (they bloomed way early, and many were starting to circle the drain, so to speak). The popular spot for shooting these is way farther back from the water than I was so you can get a sea of lilies leading to the ocean. I have seen a lot of photos like this, all from pretty much the same perspective, so I wanted to try something different.
I found this spot much closer to the ocean with fewer lilies, but also a nice little bridge over a stream in the mid-ground, and a bit more variety in the landscape. I wouldn’t call it a better spot, as I don’t think it is, but it’s a different spot, so I opted to give it a try. I setup my tripod, Nikon D750 and Nikon 14-24mm lens about 4 inches above the lilies, and waited for the light. Here, my camera is almost directly above the lily on the bottom right corner (I actually had to crop my tripod leg out of the frame)–that 14-24mm is awesome for distorted shots in portrait orientation, and I really need to shoot more like this.
Anyway, since I’m super impatient, and didn’t want to walk away with just one photo from this sunset, I left this tripod where it was, and wandered around with my Nikon D810 taking handheld photos during the sunset (I should have shot the D810 on the tripod and the D750 handheld, but I messed up and didn’t want to change cameras when I caught the mistake).
As for shooting, I did exactly what I described above, shooting in live view right as the sun started to fall below that mountain on the left, adjusting my focus. I actually shot a ton of frames throughout a 30 minute period both before and after the sunset. As I get distracted really easily, for many of these, I forgot to focus stack, and was just shooting away watching that gorgeous sunset. Other times, I wouldn’t do my focus stacking in the order of foreground->mid-ground->background.
When I got home and started reviewing the photos in Bridge, I noticed I had about 3,424 shots (slight exaggeration) of these darned lilies shot from the tripod. When you’re reviewing these photos in the little icons in Bridge, it’s impossible to tell what areas are in focus.
Combing through photos trying to figure out what the heck I had done, where I had focus stacked and where I had not, etc. was literally the longest part of the process from start to finish. The lesson here is that, you really need to decide in advance whether or not you’re going to focus stack. If so, stick with it while shooting and make sure you consistently stack, and always stack in the same order.
Other post processing involved a couple of other techniques, including an Orton application to soften the light and using the 50% grey layer technique. Aside from that, processing was my basic curves adjustment layer, a vibrance adjustment layer, and a color balance adjustment layer.
Overall, I am pleased with the end result. It’s far from the best shot of these lilies at Big Sur that you’re ever going to see, but I wanted a fresh approach. I couldn’t get quite as close to the lilies as I would have liked, as that would have cut the stream out of the frame, but I’m fairly pleased with the composition. Next time, I think I will go farther back, get closer to the lilies, and try to shoot the sea of them. (I planned on doing this with my handheld camera…but just didn’t before all the good light disappeared.)
Honestly, I’m not sure how often I’ll use focus stacking. I think it’s a hassle in the field and I’m a quantity over quality type of guy when it comes to photography. I’m not saying I don’t like high quality shots, but if I have to cut corners that will probably be unnoticeable to most viewers, I’m absolutely fine doing that if it means getting more photos. I was lucky here in that I was shooting in a location where I could leave my tripod unattended with one camera on it while running around with the other camera. If I didn’t have that luxury, I probably wouldn’t have bothered focus stacking at all. With that said, it is a good weapon to have in your arsenal as a photographer, so hopefully this post provided you with a useful new technique!
If you’re planning a California road trip or vacation, check out my California category of posts for other things to see and do! To get some more Big Sur photo ideas or to purchase prints, check out my Big Sur Photo Gallery. For photo licensing inquires, please contact me.
Have any questions about what I did here? Is there any additional info you’d like? How would you have approached this shot differently? Share your thoughts on this or anything else, or questions you have in the comments!