Online Tool Store Online Tool Store
🔬 Image Tools

· 4 min read

How to Get a Macro Shot Sharp Front to Back

Manesh Jayawardhana

CIO & Co-founder

Manesh Jayawardhana is the CIO and Co-Founder of Ceyentra Technologies, where he has spent over nine years leading the design and delivery of software solutions for clients across the globe, spanning web, mobile, AI, and capital market systems. He has grown Online Tool Store's engineering team from the ground up while steering the company's technical direction. His writing draws on this breadth of experience building and shipping software across a wide range of industries and markets. View on LinkedIn

Share

How to Get a Macro Shot Sharp Front to Back

At life-size magnification, depth of field is measured in fractions of a millimetre. Stopping down to f/16 buys a little more and starts softening the whole frame to diffraction.

There is no aperture that gets a small subject sharp from front to back. The answer is to take several frames and combine them.

Why stopping down stops working

Depth of field increases as you close the aperture, and diffraction increases with it. At some point the diffraction softening exceeds the depth gained, and the image gets worse overall while technically having more of it in focus.

In macro work that crossover arrives early, because effective aperture increases with magnification. A lens set to f/11 at life-size behaves optically closer to f/22, and the softening is visible.

Focus stacking sidesteps the trade entirely. Each frame is taken at the lens’s sharpest aperture — usually two or three stops from wide open — and depth comes from combining frames rather than from the aperture.

Getting the bracket right

Overlap is the requirement. Each frame’s in-focus zone must overlap the next. Where it does not, the merged image has a soft band, and no amount of processing recovers it.

Step size follows from depth of field, which at high magnification is very small. More frames than feels reasonable is normal — twenty or thirty for a small insect is not unusual.

Move the camera, not the focus ring, where you can. A focusing rail changes the subject distance without changing the lens’s focus setting, which avoids focus breathing.

Focus breathing is the change in magnification as focus is adjusted. Frames taken by turning the focus ring are slightly different sizes, and alignment has to scale them to match. It works, and it is one more thing that can go slightly wrong.

ApproachMagnification changeAlignment needed
Focus railNoneMinimal
Focus ringYes — breathingScaling required
Automatic bracketingDepends on implementationUsually some

Where stacking artefacts appear

Look at three places in a merged image:

Focus transitions, where one frame’s sharp region meets the next. Errors here show as halos or doubled edges.

Overlapping fine structures — hairs, antennae, anything thin crossing a background at a different distance. These are the hardest case for any blending algorithm, because both frames have plausible detail in the same place.

The edges of the frame, where alignment scaling has the least overlap to work with.

A merge that looks perfect at screen size can have obvious artefacts at 100%, which is where they need checking.

Diffuse the light or lose the detail

Lighting is the other half of macro work, and stacking cannot fix it.

At high magnification the subject is close to the lens, which blocks ambient light and makes the working distance shadowed. Direct flash from a small source produces harsh specular highlights on anything shiny — which at macro scale is most textures.

A large diffuser relative to the subject is what softens it. At macro distances that does not need to be large in absolute terms; a small softbox or even paper around a flash head is enormous relative to an insect.

Consistency across the stack matters too. Any change in lighting between frames shows as a brightness step in the merged result, so the lighting must be fixed for the whole sequence.

Common mistakes to avoid

  • Too few frames, leaving soft bands the merge cannot fix.
  • Changing aperture or exposure between frames, which makes blending harder and can produce visible brightness steps.
  • Any subject movement — a breath of air on a leaf ruins a stack that took five minutes to shoot.
  • Shooting the bracket handheld, where alignment has to fix both position and rotation.
  • Judging the result at screen size rather than at 100%.

How to do it with Image Focus Stack Merger

The Image Focus Stack Merger combines the bracket in your browser.

  1. Upload the series, shot from a tripod with focus stepped through the subject.
  2. Enable alignment if focus was changed by the focus ring rather than a rail.
  3. Merge, then inspect at 100% along the focus transitions.
  4. Reshoot with more frames if there are soft bands — those are a shooting problem, not a processing one.

Other browser-only image tools are in the tools directory.

Frequently asked questions

Why not just stop down the aperture?

Because diffraction softens the whole image, and effective aperture increases with magnification. In macro work the crossover arrives early enough that stopping down makes the image worse overall.

How many frames do I need?

Enough that the in-focus zones overlap. At high magnification that can mean twenty or thirty frames for a small subject. Too many costs only time; too few leaves soft bands nothing can fix.

Why does the subject change size between frames?

Focus breathing — changing focus alters magnification slightly. Alignment corrects it, which is why moving the camera on a rail is preferable where the setup allows.

Final thought

Overlap the in-focus zones and check the result at 100%. Everything else about stacking is processing; those two are the shoot, and they decide what the processing has to work with.

Try the free Image Focus Stack Merger

#focus-stacking#macro-photography#depth-of-field#focus-bracket#online-tools#free-tools