Saturday, 17 May 2014

Focus Stacking - a worked example / tutorial

Over the last couple of years, I've developed a great interest in macro photography, partly because of the birth of my daughter (limiting the opportunities to travel the wold as much), and partly because of the incredible diversity of our environment, where even small bugs and flowers can reveal beauty,

Whilst posting flower macros on my portfolio on, a very nice follower suggested I tried focus stacking technique. I hadn't heard much of it, but a quick Google search revealed that this allows, a bit like HDR processing for exposure, to combine multiple images with different focus areas into one image with a deeper depth of field.

By its very nature, macro lenses (and shots) have a very shallow depth of field, the closer you get to the subject. This of course allows for beautiful separation of subject against its background, as well as nice bokeh effects, etc. but this means that 1) the subject has to be parallel to the plane of the sensor and 2) only part of the subject (if very close) can be in focus. 

Whilst this creates a nice creative effect, that I don't mind in a shot such as this one:, it was worth having a try at this new technique. 

I'm very happy with the results I got, and here are some very basic steps to achieve it:
1. Get your tripod out! 
Whilst I usually try to keep my shots handheld for most images, for focus stacking, you need at least 4 images (and I've gone up to 12 photos) to merge together, so tripod is a must, so you get consistent framing and exposure (note that the framing slightly changes across your shots as you modify the focus, but the stacking process takes care of this)

2. Set your camera to manual focus
This is imperative, as you are going to change, on the same photo, the area of focus, so the best is to do this manually (some more advanced options involve macro rails and live view, but I don't have either!!)

3. Set your scene 
In this example, I've got an area of my garage set as a temporary studio - one sheet of black cloth as background, a double garden light (thank you Bunnings!) with 500W bulbs, and something to hold a flower (that's where your creativity is also tested)

4. Frame your shot
Set your tripod to the right distance, your lens to the desired distance (if not a fixed lens), and check your exposure (I prefer to use an aperture-priority mode, with an aperture at 5.6 or whereabout)

5. Take shots and vary the focus as you go
There are no rules, but I prefer to start with the very first area of the subject (here, the front petal of the flower) in focus, then manually move the focus area (I do this with the view finder, but if you have a camera with live view, that's probably easier), shoot, move the focus, shoot again, and repeat until the further away area is in focus

Here are the 10 images I shot for this example - you can see the change in focus area as you scroll down

6. Get to your computer
Now that you have all your photos (and downloaded), you need a software to merge (stack) them - once again, a quick Google search pointed me to a few options, and I tried ZereneStacker. 

7. Let the magic happen
Once in ZereneStacker, simply drop all your files into the drop area, and select Stack > Align & Stack All option. There are 2 options available, PMax and DMap - I haven't yet worked out the exact differences, so I run both and then select the best outcome. In this example, this was the PMax version I kept

And here is the result (also posted on 500px:

Hope you found this tutorial useful. Happy to have your comments, and suggestions re other software / how to improve this technique