How to focus stack in Photoshop
Get incredible depth of field in a few easy steps - Scroll down page for focus stacking video tutorial.
I’ve had a lot of members asking me what focus stacking is, when to use it and how to focus stack images in Photoshop. Here you’ll find the answers to all those questions and learn how, using Photoshop, you can get the whole of your image sharp in just a few simple steps.
Sometimes, regardless of what camera settings you use, it can be difficult to get the entirety of an image in focus. This is when a technique called focus stacking, which helps create an image that is sharp all the way through, can be especially useful.
Focus stacking is a technique where you layer a series of images, each with a different focus point, and blend them together using Photoshop. By identifying areas of each image that are in focus, Photoshop allows you to create an image that is completely sharp.
It can be particularly helpful when shooting macro subjects (such as Jewellery photography), when working at such close proximity and at such high magnification simply does not allow you to get adequate depth of field. You can apply focus stacking whether you’re photographing landscapes or macros, though I most commonly use it for product photography.
The Photographic Process
You don’t need any fancy equipment for focus stacking, although using a tripod is essential to avoid camera shake and inadvertently moving the image. You could also use a shutter release cable to avoid moving the camera, or your camera’s self timer if it has one. I use Hasselblad’s Phocus software to trigger the camera, a feature that Lightroom and Capture One also offer if you’re shooting tethered.
To focus stack an image is relatively straightforward. Once you’ve composed and lit your shot and you’re happy with how everything is looking, the first step is to take a series of images with different focus points. To do this you need to switch your camera to manual focus mode and adjust the focus gradually for each shot.
Determine closest and furthest focus point and determine series of focus points in between in consecutive order.
Shooting in manual focus will give you much greater control over your focus and will ensure you get everything sharp. Start at the closest focal point and with each successive image, shift the focus slightly until you’ve worked through from the foreground to the background.
Don’t rush this process or change your focus too quickly; you want to make small, precise adjustments to ensure that every point of the image is in focus in at least one of the images.
How to focus stack images in Photoshop
Focus stacking images requires a great deal of processing power, so it’s important you do what you can to help speed things up. One useful tip is to do any raw processing you can before importing the images into Photoshop. For the rings photograph, I cropped out a lot of the surrounding white space, which reduced the file size and helped speed up the process.
Once your initial processing is done, the next stage is to load the selected images in Photoshop. To do this, simply open the images as you would normally. Once all the images are open, we can start to align them and begin the process of focus stacking.
There are often different ways to do the same thing in Photoshop, and this is no different. There are two ways you can layer and align the opened images. Both methods do the same thing, it’s simply up to you which one you prefer.
1. Using scripts
Once you’ve opened your images, go to File - Scripts - Load Files into Stack. This will open the Load Layers dialogue box, where you should select ‘Files’ from the dropdown menu and click ‘Add Open Files’. Then check the ‘Attempt to Automatically Align Source Images’ box. This will resolve any differences in scale and layer all your images on top of each other.
This is an important step as differences in scale will have occurred as a result of changing the focal point of the lens (this is inevitable, regardless of the quality of your lens). In order to complete the focus stack, correctly aligning your images is essential. If you miss this step, each image would be a slightly different size and it would be impossible to get a good final result.
The second way to layer all your images into Photoshop is to use the Photomerge feature. To do this, open all your images, go to File - Automate - Photomerge. This will open the Photomerge dialogue box. Make sure the layout is set to ‘Auto’ before you click ‘Add Open Files’. Then check the ‘Blend Images Together’ box before selecting ‘OK’.
Now that all the images are aligned the next step is to blend the aligned layers together. To do this select all your layers (click on the top layer, hold ‘Shift’ and click on the bottom layer) and go to Edit - Auto-Blend Layers to open the Auto-Blend Layers dialogue box.
Here, select ‘Stack Images’ and ‘Seamless Tones and Colors’. Once you’ve clicked OK, Photoshop will start blending the layers together by creating layer masks of the areas that are in focus in each image. This process may take some time (which is why it’s important to reduce the file size if you can).
After the process has completed you’ll notice that each of your images now has a layer mask applied to it. Photoshop automatically detects the sharpest area in each shot and creates layer masks to reveal only these parts of each image. The final result is usually a blended image that is perfectly sharp from front to back. Should you identify an area that you want to improve, you can go in and manually adjust the layer masks to suit.
Depending on which version of Photoshop you’re using, a new merged layer may have been created for you already. If not, you can create a new layer from the blended images by selecting all the layers and pressing Command - Option - Shift - E (for Mac) or Ctrl - Alt - Shift - E (for PC). This will create a merged copy of all the visible layers.
Next I’d suggest saving your image. A useful tip here is to save two separate files — one layered file and one flattened TIFF file. If the file is over 4GB you will have to save the layered file as a PSB (large document format). By keeping a copy of the layered images, you’re able to go back and easily make changes to the original focus stack, should you need to.
Having followed the steps above, you’ll see how easy it is to focus stack an image. In just five steps you can have an image that is sharp all the way through. I’ve summarized these steps here:
- Select your images for the focus stack
- Open your files in Photoshop and align images (using Scripts or Photomerge)
- Blend layers together using Auto-Blend Images function
- Save your files
- Start retouching
If you have any questions about this process, feel free to leave a comment below or on one of the relevant classes.
If you’re looking to improve your Photoshop skills, take a look at our extensive range of Photoshop classes, where I cover everything from the very basics to some of the more advanced techniques. We also offer something for those looking to go to the next level — professional retoucher Viktor Fejes joins me to show you how to edit like a pro.