Much of photography offers creative ways to go beyond the limits of the laws of physics. One of these techniques is the stacking of focus.
Even wide-angle lenses in narrow apertures, a combination that gives you the greatest possible depth of field-May have both extreme foreground and extreme background in sharp focus. You can get close, but if, let's say, there is a fresh shell right in front of you and something interesting in the distance, one or both of them will be a little blurry. Just look at this picture.
Although it is not bad, the shell is less sharp than I would have liked while the castle of the island is sharp or as clean as possible with my configuration.
Here is a picture where I focused on the hull.
Although the web resolution is pretty much the same when you zoom in on the high resolution file, you can see that the shell is sharper – look at the rings around the shell as well as the little pebbles nearby to see it – while that the castle on the island is not.
This is where the focus stack comes into play. It's a technique that combines multiple images into a single composite image with a depth of field impossible to obtain in real life. Here I have stacked the two photos above.
Look closer, and the shell and the castle are sharp.
Pretty awesome, no? Let's see how to do it. I will demonstrate it with Photoshop, but you should be able to reproduce this technique in most good image writers.
When to use the focus stack
Stacking the focus is useful whenever you want a depth of field in your images that you can not get optically. This mainly happens when you are photographing landscapes with something that is happening both in the foreground and in the background, as in the example above, or when you're doing macro photography. The rest of the time, you do not need to stack the focus because your lenses and your camera give you a sufficient depth of field.
Shooting to stack the focus
Focusing starts with the camera. Make no mistake and no amount of Photoshop work will save your shot.
Once you have defined your final composition, lock your camera on a stable tripod and switch to manual exposure. You want there to be as little variation as possible between the two planes.
Then, switch the lens in manual focus mode. That's one of those situations where you will get the best results by doing things by hand. Activate the live view screen and zoom in to the maximum (normally 10 times) in the foreground. Turn the focus ring until it is as sharp as possible, then take your first picture.
Then use the live view screen to zoom in on everything in the background. Again, adjust your focus until it is sharp and take your picture.
Two frames are usually enough, but if you're working with larger openings or just want to be sure, you can take a third frame and focus somewhere in the middle.
Focus stack images in Post
If you do a lot of focus stacking or want to merge a dozen frames to get perfect macro shots, you should take a look at dedicated focus stacking software like Helicon. It is designed to work in extreme situations. On the other hand, if you want to extend the depth of field of your landscapes, you can probably use the editing editor you already use. I will show it with Photoshop. To follow, you need to know how the layer masks work. If this is not the case, consult our complete guide on layers and layer masks before continuing.
Open all the images you want to merge into a single document. To do this in Photoshop, select File> Scripts> Load Files to Stack. Click "Browse" and select the files. Select the checkbox "Attempt to automatically align the source images", which will solve the small tripod oscillations, then click "OK."
Since the differences between the two images are probably quite subtle, I recommend you zoom in to 100%, then rename your layers to make it easier to remember which ones are centered. I like to put the layer on which the background objects are focused, but that does not make much difference.
Select the top layer and go to Layer> Layer Mask> Reveal All.
Select the Brush tool (the keyboard shortcut is B) and make sure you have a nice, big, soft brush.
Select the mask and start painting in black on the slightly fuzzy areas of the frame. I've disabled the bottom layer to give you an idea of where I'm hiding.
Zoom in, switch between layers, and hide the elements so that everything goes well between the two frames. If you need it, you can use more advanced selection tools.
Once you are done, you must have seamlessly merged the two images into a single image with extended depth of field.
Focus stacking is probably not something you will need to use a lot, but it is a practical technique to know. Just make sure things are going well.