Tutorial Focus stacking – getting everything in focus

Garry Edwards

Moderator
Messages
13,475
Name
Garry Edwards
Edit My Images
No
Garry Edwards submitted a new resource:

Focus stacking – getting everything in focus - Focus stacking has pretty much replaced large format monorail cameras for when we need to get everyt

View attachment 290384
Focus stacking has pretty much replaced large format monorail cameras for when we need to get everything in sharp focus. These large, slow cameras were the tool of choice for skilled photographers in the past, and they still have their uses, but they’re expensive to run and require a good knowledge of physics.

So, it became fashionable to use selective focus instead for food and other product shots – just shoot wide open, focus on the most important...

Read more about this resource...
 
Hi Garry. Nice resource. Well explained reasoning.

Is photoshop the only way to do this, or are there other tools out there? In particular any free ones!

Also might be worth mentioning that some cameras now have focus stacking built in, so it can be a button press. Thing is the user will have to read their camera manual :)
 
Hi Garry. Nice resource. Well explained reasoning.

Is photoshop the only way to do this, or are there other tools out there? In particular any free ones!

Also might be worth mentioning that some cameras now have focus stacking built in, so it can be a button press. Thing is the user will have to read their camera manual :)
The fact that I use a D3 should tell you how much I know about newer cameras with built in focus stacking :)
And sorry, but I don't know about other software programmes either, but I'm sure that there will be other people who can help with this.
 
Whilst focus stacking is a perfectly valid technique and in fact has been for years, its nothing new.
Currently its a doing the rounds as a buzzphrase, its like the new HDR.

and for this reason much like HDR its being misused, and used instead of other techniques that would work better.

Its pointless to shoot a 50 image stack at f1.8 or of an object which doesn't taper of into the distance.
Lots of shots can be shot at f16 and be perfectly fully in focus if shot right

p.s. HDR wasn't anything new either, it was a there as a technique way before it became a buzzphrase.
 
I have long tried doing focus stacks for landscapes at longer focal lengths (70mm +) where some sort of foreground is included. In these scenarios even f/16 won't help, particularly on high MP body.
Typical dslr lenses show focus breathing. I.e. View changes on refocusing. That is the first major problem. Photoshop auto-alight mostly fixes that. Auto-blend is the next logical step but I find it very buggy and predictable as it will try and use bits from random places and will include some out of focus parts. It's unusable. So you go back to auto-align stage and blend manually bit by bit. Everything is great when the transitions are gradual.
What do you do when the areas overlap, say a tree or another foreground object is extending deep into background areas, and both are very out of focus in the respective shots? The out-of-focus bits tend to be larger than in-focus equivalents.... more shots simply won't help here.
 
Hi Garry. Nice resource. Well explained reasoning.

Is photoshop the only way to do this, or are there other tools out there? In particular any free ones!

Also might be worth mentioning that some cameras now have focus stacking built in, so it can be a button press. Thing is the user will have to read their camera manual :)
Whilst it's not free, it is a bargain price - I've found Affinity Photo creates very good Photo Stacks.
My Olympus m4/3 cameras have focus bracketing but I don't find it all that easy to use.
In particular, you have a choice of bracket steps on a scale of 1 to 8, (on a range of small to large) but picking the right step for your application is a matter of trial and error and can take some time to work out. I get better results using a focussing rail, but maybe I'm just impatient.
There looks to be a very useful program marketed by Helicon, where the camera (Canon or Nikon only) is tethered and you can select the nearest and furthest focus points, and the software works out how many steps you need for your lens combination and remotely controls your camera. The snag is, you still need a Stacking Program to combine the resulting images.
I'd be interested to hear if anyone has tried this Helicon Remote tethered shooting program and what the results are like.
I use Affinity for my stacking so I don't need the expensive Helicon program, although Helicon seems to be regarded as one of the best.
Free stacking programs include Zerene Stacker, CombineZP and Picolay, none of which I have tried.
On1 Photo RAW 2020 claims to focus stack, but I've never had any decent results from it.
 
Last edited:
Whilst focus stacking is a perfectly valid technique and in fact has been for years, its nothing new.
Currently its a doing the rounds as a buzzphrase, its like the new HDR.

and for this reason much like HDR its being misused, and used instead of other techniques that would work better.

Its pointless to shoot a 50 image stack at f1.8 or of an object which doesn't taper of into the distance.
Lots of shots can be shot at f16 and be perfectly fully in focus if shot right

p.s. HDR wasn't anything new either, it was a there as a technique way before it became a buzzphrase.
Paul, I accept everything that you've said, and focus stacking is in fact just a form of HDR anyway.
But it's a valid technique that can be useful as part of the toolkit. You and I can use other methods and are proud to call Scheimpflug our friend, but most people can't, hence the tutorial.
 
Isn’t it used quite a lot in product photography to make sure everything is picked up and totally sharp? Seen it used in jewellery and watch product images a fair amount.
 
Whilst it's not free, it is a bargain price - I've found Affinty Photo creates very good Photo Stacks.
My Olympus m4/3 cameras have focus bracketing but I don't find it all that easy to use.
In particular, you have a choice of bracket steps on a scale of 1 to 8, (on a range of small to large) but picking the right step for your application is a matter of trial and error and can take some time to work out. I get better results using a focussing rail, but maybe I'm just impatient.
There looks to be a very useful program marketed by Helicon, where the camera (Canon or Nikon only) is tethered and you can select the nearest and furthest focus points, and the software works out how many steps you need for your lens combination and remotely controls your camera. The snag is, you still need a Stacking Program to combine the resulting images.
I'd be interested to hear if anyone has tried this Helicon Remote tethered shooting program and what the results are like.
I use Affinity for my stacking so I don't need the expensive Helicon program, although Helicon seems to be regarded as one of the best.
Free stacking programs include Zerene Stacker, CombineZP and Picolay, none of which I have tried.
On1 Photo RAW 2020 claims to focus stack, but I've never had any decent results from it.

I tried Zerene Stacker also, but it is only a time limited trial version - very easy to use and good results
 
Isn’t it used quite a lot in product photography to make sure everything is picked up and totally sharp? Seen it used in jewellery and watch product images a fair amount.
Yes
 
On1 Photoraw 2020 has it built in too.
 
On1 Photoraw 2020 has it built in too.
I've attempted stacking in On1 and it's rubbish.
Although On1 is my primary raw developer, I export the images it creates and stack them in Affinity Photo.
On1 needs a lot more work before it can compete.
 
Is photoshop the only way to do this, or are there other tools out there? In particular any free ones!
I've used 'Combine ZM' & it's later variant 'Combine ZP', both of which were free, easy to use & quite effective. i have to say I preferred the first name (sounding like Combines em)
Sadly they're windows only so can't be used on my Linux machine.
 
Last edited:
Isn’t it used quite a lot in product photography to make sure everything is picked up and totally sharp? Seen it used in jewellery and watch product images a fair amount.
It's a valid technique for many types of close-up photography, where you have limited depth of field.
 
I've attempted stacking in On1 and it's rubbish.
Although On1 is my primary raw developer, I export the images it creates and stack them in Affinity Photo.
On1 needs a lot more work before it can compete.

Interesting - must give it a try.
 
Isn’t it used quite a lot in product photography to make sure everything is picked up and totally sharp? Seen it used in jewellery and watch product images a fair amount.
It's a valid technique for many types of close-up photography, where you have limited depth of field.

Of course its a valid technique, but having shot lots of watches and jewellery, I've never really found it necessary or had complaints that things are not in focus. As long as you use the right camera, right lens and the right fstop, with the right lighting then you'll absolute minimise your reliance on such a technique.

and its way better, quicker and eliminates any potential issues just to shoot it right in the camera in the first place.

You spend a whole day or week shooting jewellery you'll soon learn not to give yourself extra steps.
 
Of course its a valid technique, but having shot lots of watches and jewellery, I've never really found it necessary or had complaints that things are not in focus. As long as you use the right camera, right lens and the right fstop, with the right lighting then you'll absolute minimise your reliance on such a technique.

and its way better, quicker and eliminates any potential issues just to shoot it right in the camera in the first place.

You spend a whole day or week shooting jewellery you'll soon learn not to give yourself extra steps.
Of course, the alternative is to use a tilt/shift lens, where you can control the plane of focus for close-up work.
 
I have long tried doing focus stacks for landscapes at longer focal lengths (70mm +) where some sort of foreground is included. In these scenarios even f/16 won't help, particularly on high MP body.
Focus stacking for landscape is a lot less demanding than for close-up or Macro work. For landscape you have an inherently greater depth of field and do not need anything like as many shots to stack than in Macro, where you may have a depth of field measured in mm (or less.)
Typical dslr lenses show focus breathing. I.e. View changes on refocusing. That is the first major problem. Photoshop auto-alight mostly fixes that. Auto-blend is the next logical step but I find it very buggy and predictable as it will try and use bits from random places and will include some out of focus parts. It's unusable. So you go back to auto-align stage and blend manually bit by bit. Everything is great when the transitions are gradual.
What do you do when the areas overlap, say a tree or another foreground object is extending deep into background areas, and both are very out of focus in the respective shots? The out-of-focus bits tend to be larger than in-focus equivalents.... more shots simply won't help here.
I was concerned about the change in image size when I tried using a focussing rail. which physically moves the entire camera/lens assembly.
From what I can see, all the serious Macro photographers seem to use a focussing rail, rather than relying on lens adjustment.
Rest assured that all the stacking programs I have tried (although I don't use Photoshop) will cope with changes in image size caused by camera movement.
So far I have tried movements of up to 2cm (which close-up, can produce a significant change in image size) to see if Affinity can cope, and it works just fine with the size change, which really impressed me. I currently use Affinity for all my image stacks.
With this in mind, I don't think that "Focus Breathing" when shifting focus, is anything you need to worry about, since the software can cope with it.

From what I've read, Helicon seems to be regarded as the best focus stacking software, but it is rather expensive to own.

As for incorporating different elements in landscape, I would have thought that, providing you have all the individual parts in focus, you should be able to stack them, although my experiments in landscape stacking have been a simple "Foreground" + "Background" (+ sometimes "Mid Ground") stack comprising only two or three images.
 
It's often worthwhile with a classic landscape but some special foreground interest such as rocks, flowers.
I rarely bother though.
 
I do macro and closeup and focus stacking is handy for some subjects that I can’t get in focus with one shot
Because I often shoot freehand it’s difficult to get frames that align properly so I have found that it’s best to stack by hand
 
Focus stacking for landscape is a lot less demanding than for close-up or Macro work. For landscape you have an inherently greater depth of field and do not need anything like as many shots to stack than in Macro, where you may have a depth of field measured in mm (or less.)

I was concerned about the change in image size when I tried using a focussing rail. which physically moves the entire camera/lens assembly.
From what I can see, all the serious Macro photographers seem to use a focussing rail, rather than relying on lens adjustment.
Rest assured that all the stacking programs I have tried (although I don't use Photoshop) will cope with changes in image size caused by camera movement.
So far I have tried movements of up to 2cm (which close-up, can produce a significant change in image size) to see if Affinity can cope, and it works just fine with the size change, which really impressed me. I currently use Affinity for all my image stacks.
With this in mind, I don't think that "Focus Breathing" when shifting focus, is anything you need to worry about, since the software can cope with it.

From what I've read, Helicon seems to be regarded as the best focus stacking software, but it is rather expensive to own.

As for incorporating different elements in landscape, I would have thought that, providing you have all the individual parts in focus, you should be able to stack them, although my experiments in landscape stacking have been a simple "Foreground" + "Background" (+ sometimes "Mid Ground") stack comprising only two or three images.

I never tried macro stacking. How do you for example untangle the insect wing over wing overlap when shot from a side? I imagine a big bonus is that your macro product shot doesn't move at all so at least all things stay in place.

Landscapes sounds easy at first and it only requires 2 or 3 shots until you get to like 400mm where you may need lots more. The real problem is like I mentioned there is stuff from close foreground overlapping with distant background and the images are just so different in these parts. Furthermore, stuff like this tends to move completely eliminating overlapping in some sections. Your only alternative becomes liberal application of healing brush. This is why I prefer not to do them where possible, but it comes to it a few times a year. Anything with foreground over 50mm is a must. On 50MP even f/18 won't help you much.

I guess TS-E would solve most DOF problems, except those deep protrusion / overlap cases.

Hopefully this is a matter that will be picked up by AI solutions shortly. There is zero art in just getting things in focus. Let us focus on the rest of the story instead. Edit: OK maybe not so soon considering Adobe HDR merge can't deal even with the slightest movement involving contrasty areas. Everything needs to be closely inspected and fixed by hand sampling from a single frame.
 
Last edited:
I never tried macro stacking. How do you for example untangle the insect wing over wing overlap when shot from a side? I imagine a big bonus is that your macro product shot doesn't move at all so at least all things stay in place.

Landscapes sounds easy at first and it only requires 2 or 3 shots until you get to like 400mm where you may need lots more. The real problem is like I mentioned there is stuff from close foreground overlapping with distant background and the images are just so different in these parts. Furthermore, stuff like this tends to move completely eliminating overlapping in some sections. Your only alternative becomes liberal application of healing brush. This is why I prefer not to do them where possible, but it comes to it a few times a year. Anything with foreground over 50mm is a must. On 50MP even f/18 won't help you much.

I guess TS-E would solve most DOF problems, except those deep protrusion / overlap cases.

Hopefully this is a matter that will be picked up by AI solutions shortly. There is zero art in just getting things in focus. Let us focus on the rest of the story instead. Edit: OK maybe not so soon considering Adobe HDR merge can't deal even with the slightest movement involving contrasty areas. Everything needs to be closely inspected and fixed by hand sampling from a single frame.
Tilt shift is much more restrictive than focus stacking. Tilting the lens only changes the plane of focus, if you tile the lens to focus on foreground flowers as well as the horizon higher in the image the more distant bits between the flowers will still be out of focus and indeed the clouds may be too close for the very top of the image. Stacking software will handle this sort of shot with no problem at all frequently without any need for intervention.

If you want the angled edge of your products box to be pin sharp with the remainder of the image drifting gently out of focus to de-emphasize it then tilt is the ideal tool, but if you want everything sharp on a static subject you can't beat focus stacking.
 
This years lockdown restricted my access to the parks I use for bird photography so I revisited my macro enthusiasm which has waned over the years. I dug out an ancient Velbon focus rail of mine but I found it "clunky" to use so investigated focus rails in general. After a disaster with a Sunwayfoto rail which although not cheap was simply unable to maintain focus in a straight line, the worm drive (if that's the correct term) was poorly engineered.
I bit the bullet and bought a Novoflex rail, a superb piece of engineering and faultless in use.

The next step was deciding on software, I had previously used Photoshop which threw up too many artefacts to be useful so I tried Affinity Photo which came highly recommended and was ridiculously cheap on a time limited offer. This was easy to use but slow and also threw up artefacts like excessive haloing which took time to edit out.

I then tried the trial version of Zerene which I then bought, It's very easy to use and quite intuitive and also cheaper than Helicon! I'm happy with my results with Zerene, the editing facility to eliminate artefacts works well. The lens I use is the Sony 90mm F2.8 macro lens which is ridiculously sharp and exhibits a fair amount of focus breathing which needs careful attention. I use a Sony APSC body, initially the A6000 and latterly the A6500 together with Meike extension tubes and a Raynox DCR-250 to get really close.
I haven't ventured into the world of extreme macro using microscope objectives, I think perhaps madness lies there!
Just my experiences, nothing earth shattering.....
 
I never tried macro stacking. How do you for example untangle the insect wing over wing overlap when shot from a side? I imagine a big bonus is that your macro product shot doesn't move at all so at least all things stay in place.

I’ve never managed to find a way around this issue of overlap in insect wings what I tend to do is try to increase the amount in focus instead of trying to get the whole insect in focus , so for portrait type shots get the head, eyes and thorax in focus and gently fade the rest to out of focus
I haven’t found software that works properly with what I do hand held frames which aren’t exactly aligned so I stack by hand in photoshop
 
Back
Top