Have you ever seen a macro shot of an insect or flower and wondered how they got the entire subject in focus? The answer is focus stacking. In macro photography, you shoot at a close distance, which results in a very shallow depth of field. Even if the lens is closed down to its smallest aperture such as f/22, it is difficult to achieve focus on the entire subject, foreground to background. Typically only a single plane of focus will look sharp.
This post contains affiliate links. Thanks for supporting Click it Up a Notch®.
For example, notice the single plane of focus in this image, taken with my Nikon 105mm f/2.8 macro lens. Looking closely, the parts of the leaves in front of and behind the plane of focus is blurred.
So in order to achieve a greater depth of field, with sharp focus on all planes, there’s a little trick you can do in Photoshop called focus stacking.
What is focus stacking?
In a nutshell, you take several images of your subject, each with different areas in focus, then merge them all together in post processing. The result is one image that is perfectly focused, front to back!
Setting up your shot
- Use a tripod so that each shot is in the same position.
- Choose a subject that is not moving.
- Shoot in manual mode so your settings don’t automatically change from image to image.
- Keep your tripod steady and try not to move your camera up or down as you change the focus points.
- Shoot in high resolution and in raw for the best clarity.
Taking the shot
- Use the same camera settings for the entire series of images you take.
- Manually focus for full control.
- Compose wide with extra room on the sides for cropping. There will be some overlapping on the edges after the images are stacked. Allow room to crop those rough edges out.
- I recommend using live view on the back of your camera rather than looking through the eyepiece for a larger view of what’s in focus.
- Start with one area in focus and click the shutter.
- For your next shot, move your focus point so it falls on a different area.
- Overlap areas of focus slightly to ensure that nothing gets missed.
- I recommend starting near the edges with your focusing, then work your way across the frame.
- Take as many shots as you need in order to get all the areas of the image you want in focus.
Notice in this set of images I changed my areas of focus in each image, but kept the same angles and alignment. Remember, when you place a focus point on a part of your subject, it will focus not only that point, but everything within the same plane.
Post-processing/merging your images using focus stacking
1. Import your images into Lightroom or Photoshop. If you need to make any adjustments to a single image, make sure you apply those same changes to all the images so they will merge more smoothly.
2. If you are using Lightroom, export your images into their own folder once you have made adjustments.
3. Create a new file in Photoshop with each image on its own layer. Do this by choosing File>Automate>Photomerge.
4. Next, click the browse button and locate your images in your folder. Select the images you want to use then click Open.
5. Leave layout on “auto” and unselect the three options on the bottom. Click OK.
6. This will put all your images in one file on separate layers.
7. Next, select all your layers in your layers palette and go to Edit>Auto Blend Layers.
8. Select Stack Images and Seamless Tones and Colors.
9.This may take several minutes to complete, depending on how many images you are using.
And voila! What you have is a blended image that is perfectly in focus with an increased depth of field created by focus stacking. You will notice the edges may be a little rough. Flatten the layers then crop the rough edges out.
For my final image I edited out the tie on the stem and cropped to a square.
The more you play around with focus stacking, the better you will get. This knowledge will come in handy not only for macro work, but for landscapes when you want to achieve a sharper depth of field in the foreground as well as the background.