Racking Focus


Camera on tripod in a lavender field with floating focus plane layers

I bought a DSLR in 2016 because my friends had one. That was the whole reason. No research, no plan, just the social proof of people around me carrying a camera with a big lens.

I shot on auto mode and got results that were worse than my iPhone at the time. I did not understand exposure, light, or post-processing. My images were flat and wrong and I could not figure out why. After a while I stopped carrying the camera entirely and went back to my phone.

But I kept seeing images shared by people online that stopped me mid-scroll. Some of them were shot with the exact camera and lens I had put in a drawer. That gap between what I was producing and what was possible with identical equipment bothered me enough to actually do something about it.

Learning from scratch

I started over. Read about aperture, shutter speed, ISO, what they actually mean and how they interact. Took courses, read blogs, worked through each skill one at a time. The results started improving.

One thing I had done right even when I had no idea what I was doing: I always shot in RAW. I had a Nikon and was saving NEF files to a drive that ended up on my NAS. I had no idea what to do with them at the time, but I kept them.

After I learned post-processing, I went back to those old files. Images that had looked hopeless turned out to be completely recoverable. Good light, decent composition, just no processing applied. The image was always there. I just did not know yet how to see it.

Before
Before post-processing — straight RAW export
After
After post-processing — noise reduction applied

Getting close

Once I had the basics working, I started exploring close-up photography. Small objects, flowers, textures, details the camera can reveal in ways the eye misses.

This is when I ran into depth of field as an actual problem rather than a concept.

When you get close to a subject, the zone of sharp focus gets extremely thin. At close focus distances it can be just a few millimeters. So if you are photographing a flower and you want the whole thing sharp, physics will not cooperate: you can focus on the near petal or the far petal, not both, not in a single frame.

You can stop down the aperture to bring more into focus, but stopping down costs sharpness at the pixel level due to diffraction. There is no free lunch. A smaller aperture gives you a deeper zone of focus, but none of it is as sharp as it could be.

Focus stacking

The technique that gets around this is called focus stacking. You take a series of images, each focused at a slightly different distance. First frame has the nearest part of the subject sharp. The next frame shifts the focus plane slightly farther back. You keep going until you have covered the full depth of the subject.

Then software takes all those frames, finds the sharpest region in each one, and assembles them into a single image where everything is in focus. I use Helicon Focus. Photoshop has a built-in version too. The algorithms determine what is sharp in each frame and composite only those parts.

There is an alignment step because even on a tripod, tiny shifts between frames add up. The software handles this automatically in most cases. What it cannot handle is a subject that is moving: a flower in the wind, a bug that walked away, camera shake. Those ruin the stack. The fixes are mechanical: tripod, remote shutter release, shooting bugs early in the morning before they get active, bringing a potted plant indoors out of the breeze.

Here is a sequence I shot of a lavender plant with a 50mm prime, focused close. 59 frames, racked from far background to near foreground. The slider on the right moves through them, or let it run and watch the plane of sharpness travel through the frame.

Lavender field — focus frame 1 of 59
1 / 59
far
near

If you watch closely you will notice the problems too. There is a bug moving across the plant between frames. The buds are swaying slightly from shot to shot. And one bud near the center never comes into sharp focus in any of the 59 frames. 59 frames, a tripod, no wind to speak of, and this stack is still not usable for any real output. That is macro photography being honest with you about what it requires.

The blur you see in any given frame is not a flaw. It is the information the software will discard when it assembles the final composite. Each sharp zone gets kept; everything else gets replaced by a sharper frame. The result is an image that could not have been taken in a single shot.

This is from the same session. The software took those 59 frames, found the sharpest pixels in each one, and assembled this:

Completed focus stack — lavender flowers with full depth of field

Every part of the plant is sharp at once. That is not possible in a single exposure at this distance and aperture. The moving bug, the swaying bud that never came into focus — none of that made it into the final composite. The software found the clean frames and used those. What looks like a straightforward image required about an hour of setup, 59 shutter presses, and software to stitch it together. The camera does not make the image. It collects the material.

Closer

This is the same subject shot a few days later with a better lens and more frames — 131 this time, at extreme close range. The focus plane travels through a single bud from background to foreground.

Lavender bud close-up — focus frame 1 of 131
1 / 131
far
near

131 frames to cover one bud. The result:

Completed focus stack — single lavender bud with full depth of field