An Experiment in Focus Stacking

September 9, 2018

A common “tell” in model railroad photographs (and all macro photography, I suppose) is a shallow depth of field. Back in the early 2000’s my friend Chap and I put a fair amount of work into simulating this effect with both a real tilt-shift lens (Chap’s), and Photoshop filters.

When I take photos of a model railroad, however, I’m either trying to get a good representation of what I see, or I’m trying to make it look real. Frequently, conditions require that I use a relatively shallow depth of field, either with my iPhone’s camera, or shooting without a tripod. Depending on the shot, this can lead to disappointing results: in a photo of an oncoming train, only a small part of the train will be in focus.

Base photo, one of six.

Note that only about three quarters of the locomotive is in focus; ideally the whole train would be, but that’s simply not possible with phone cameras. (It should be possible with my dSLR, depending on subject distance, lens, etc. Good followup post topic?)

There is however a technique called focus stacking that uses image processing to combine photos with of varying focal plane settings into a single, [almost] tack-sharp photo. I was reminded of this while working on Mark’s layout – Daryl had come to take photos and he mentioned that he was going to be focus stacking. I resolved to try it out. (Another benefit of working on other people’s railroads!)

Six photos, focus-stacked.

This photo is made up of six different photos taken on my iPhone, using Camera+ as the camera app, for better control the manual focus setting while keeping exposure constant. Affinity Photo’s built-in focus stacking feature was then used to combine the images, resulting in the image above. Certainly not as simple as snapping a photo, but worth it for a shot/scene that I care about.

While it is satisfying to have found a good way to take better photos, this post really serves to underscore the need for actual scenery on my railroad!