How to focus stack in Photoshop

Get incredible depth of field in a few easy steps...

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.

You can learn more about focus stacking in numerous classes on our site, including our focus stack cosmetics shoot and rings jewellery photography class, but I'm also going to explain the key points here.

Image
LIVE PHOTOGRAPHY WORKSHOP

Focus Stacking

Now available to watch on replay

Karl demonstrates how to photograph a close up macro shot using focus stacking, explaining what focus stacking is, when and how to use it and how to get the best results.
Watch Class
Watch Class
Join Now
Product photography, diamond rings
Product photography, diamond rings.

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.

Image
PHOTOGRAPHY CLASS

Rings - Jewellery Photography

Jewellery photography on a white background

Learn how to overcome common challenges associated with jewellery photography, including controlling reflections and achieving sufficient depth of field.
Watch Class
Watch Class
Join Now
Product photography using focus stacking in Photoshop.
This watch product photograph was taken using focus stacking.

I cover how to focus stack an image in Photoshop and share a number of useful tips in these two product photography classes (How to Focus Stack and Zenith Watch Retouch 1), but you’ll find the essential steps to get a perfectly sharp image quickly and easily outlined below.

    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.

      Ring photography focus stack
      The first image in the focus stack, with the focus set to the front of the diamond ring.
      Ring photography focus stack
      The last image in the focus stack, with the focus at the base of the product.

      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.

        Product photography watch focus stack
        Shifting the focus for a watch product photograph focus stack.

        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.

          Crop image
          Crop your raw image to save processing power.

          Align images

          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.

            Align image using scripts
            To align multiple layers in Photoshop go to File - Scripts - Load Files into Stack.
            Photoshop load layers dialogue box.
            When the Load Layers dialogue box appears, select 'Add Open Files' and check 'Attempt to Automatically Align Source Images'.

            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.

              2. Photomerge

              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’.

                Photoshop automerge function
                To align multiple images using Photoshop's Photomerge function, go to File - Automate - Photomerge.
                Photoshop Photomerge
                Once the Photomerge dialogue box is open, set the layout to 'Auto', select 'Add Open Files' and check the 'Blend Images Together' box.

                Blend images

                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).

                  Photoshop Auto-Blend Layers
                  To blend the aligned layers together go to Edit - Auto-Blend Layers.
                  Photoshop Auto-Blend Layers
                  Select 'Stack Images' and 'Seamless Tone and Colors'.

                  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.

                    Photoshop layer masks created by auto-blend
                    Photoshop's Auto-Blend function creates layer masks of the sharpest area of each layer.

                    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.


                        Summary

                        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:

                          1. Select your images for the focus stack
                          2. Open your files in Photoshop and align images (using Scripts or Photomerge)
                          3. Blend layers together using Auto-Blend Images function
                          4. Save your files
                          5. Start retouching

                          If you have any questions about this process, feel free to leave a comment below or on one of the relevant classes.

                            © Visual Education. All rights reserved. No content on this page may be used or shared by third parties.

                            Recommended Articles

                            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.

                                Photoshop for photographers class
                                Photoshop for Photographers
                                Learn More
                                Advanced Photoshop for Photographers class
                                Advanced Photoshop for Photographers
                                Learn More

                                Leave a Comment