What focus stacking is
Focus stacking is a method of getting more of a scene sharp than one frame can show. You take a series of photos of the same subject, moving the focus slightly between each one. Each frame is sharp in a different slice of the subject. Software then combines the sharp parts into a single image.
The result keeps a moderate aperture, which avoids the softness of very small openings, while covering a depth that one shot could not manage.
Why close-ups need it
Close-up and macro photography leave very little depth of field. When the lens is close to the subject, the zone of sharpness can be only a few millimeters deep, even at a narrow aperture. A flower, an insect or a small object may be sharp at the front and soft at the back.
Stopping down to f/22 or f/32 would increase the depth, but diffraction would soften the whole image. Focus stacking gets the depth without that loss. Many macro photographers use it for exactly this reason.
What you need
A stack works best with:
- A sturdy tripod. The camera and the subject must stay in the same position for every frame.
- A stable subject. Anything that moves, such as leaves in wind or insects walking, will not line up across frames. Use a clamp, a stand or a stiff holder for objects. Never chill, restrain or disturb a living subject to make it still.
- Steady light. Use continuous light, or a flash that fires the same way each time. Changing light between frames makes blending harder.
- Stacking software. Several programs can blend a stack. Choose one that suits your system and your budget.
- A way to focus precisely. Manual focus with focus peaking, a focus rail, or a focus-shift function in the camera all help.
Shooting the stack
Set up the camera with these steps:
- Choose an aperture. Many macro photographers start around f/8 to f/11, which is often sharp on many lenses while giving a reasonable depth per frame. Wider apertures are possible, but they need more frames to cover the same depth.
- Set a base ISO and a steady exposure. Use manual mode so the exposure stays the same from frame to frame.
- Focus on the nearest point you want sharp, then take the first frame.
- Move the focus slightly farther away, and take the next frame. Keep the steps small enough that each frame overlaps the one before.
- Continue until the farthest point is sharp, then check the stack on screen.
The number of frames depends on the subject’s depth and the aperture. Close-up shots of small objects can need dozens of frames, and some can need far more. Many photographers take a few more than they think they need, because missing a slice is harder to fix than an extra frame.
Focus shift and focus bracketing in the camera
Some cameras can move the focus automatically between frames. This is called focus shift or focus bracketing. You set the number of shots and the step size, and the camera takes the series while the lens moves. This reduces the chance of uneven spacing and the need to move the focus by hand.
Check your camera’s manual for the feature and its limits. Some cameras cap the number of frames, and the step size is usually set in fixed increments.
Blending the frames
Once you have the stack, import the frames into your stacking software. Most programs align the frames first, then blend the sharpest parts. Check the result at full size for three things:
- Halos or edges. Bright or dark outlines around the subject can appear if the frames did not align well or if the subject moved.
- Soft areas. A part of the subject that is blurry in the result may need more frames at a smaller step size.
- Background detail. Background areas sometimes blend unevenly. You may need a mask or a second stack.
Some software lets you adjust the blend to favor certain areas. Use this sparingly, because heavy manual correction can look artificial.
Limits and common mistakes
Focus stacking is not always the right tool. It has some limits:
- It does not work well with moving subjects.
- It takes longer to shoot and to process than a single frame.
- Exposure or focus changes between frames can cause uneven results.
- Very thin or fine details, such as hair or fur, can be hard to blend cleanly.
Common mistakes include moving the camera between frames, changing the aperture or exposure partway through, and spacing the focus steps too far apart. Check each stack as you shoot, and review the result before you pack up.
For a wider view of how aperture and focus interact, see the article on how to get everything in focus.