Focus stacking technique using Adobe Photoshop CS5

While I working on a new articles from the shots we have done in 2011, I’d like to re-post the full article form my guest post for (great educational source for beginners). The material is really interesting, and I want to have it on my blog as well.

This is how we use focus stacking (focus bracketing) technique in our product photography.

focus stacking final image tutorial

Focus stacking the final image

We use this technique once a while, mostly for a critical product shots, where closed aperture or tilt-shift lens does not provide enough DOF and/or details. For this tutorial, I have photographed a silver bracelet, positioned at about 45 degree from a camera focusing plane and then used Photoshop CS5 to compose a final all-in-focus image.

First, the lighting setup. even though it is not related to the focus stacking technique, I think it will be cool if I explain it here.

Because the bright bracelet has black cast on some of its pieces, I wanted to make sure it will be correctly shown on the final image. I also wanted to use soft, even lighting (Tiffany-like, take a look at their silver pieces), yet to show the rough texture of the bracelet surface.

The lighting setup:

To get desired effect I’ve used two foam boards to hide the bracelet from direct light hit from a strobes: First board, white matte reflector is on the left (it is white on the other side) and the second one (to the right) is 50% gray.

First light, WL X-1600 (1) through 20 degree honeycomb grid was creating a spot on the right side reflector and on the table right in front of the bracelet.
Positioned at given angle, some parts of the bracelet was reflecting that light spot from the board, while the rest were reflecting gray board. Also, light from that spot on a grey board was reflected by the opposite white  reflector, producing even and smooth lighting on our object.

Second light, AB-800 (2) through strip box was  highlight the background, adding a soft reflected lights from that side.
None of the light sources were hitting bracelet directly.

Now, the focus stacking technique:

The idea is similar to a HDR photography, but instead of exposure bracketing, we do a focus shift: for each shot we move camera to cover another piece of the object, merging images in one during the post-production.

The correct way to change a focusing point is to change a distance between the camera and our subject by moving the camera: lens focusing point should not be changed (later I’ll tell you why). So, some sort of macro focusing rails (I use Manfrotto 454 Micrometric Positioning Sliding Plate) helps a lot; without it it will be problematic to move the camera in that direction. Obviously, we shoot completely manual: manual exposure, manual focus.

Why not to simply re-focus the lens? Re-focusing lens will work, but there is some drawbacks of this method, below are my thoughts:

When we re-focus the lens it will slightly change a perspective and bokeh will be changed as well, while moving the camera does not change anything except the focusing point. Think about this: when lens focus gets adjusted, some of the internal elements of the lens being moved relatively to each other and aperture blades, right? This inevitably (depending from a particular lens design) change bokeh and perspective, as the distance between the lens front element and a focusing point will be changed (meaning we’ll change a focusing distance).

Instead, by moving the whole thing (camera and lens) we guaranteed moving only focusing plane through our subject, while the focusing distance remains unchanged.

Some of you may think that refocusing the lens does not change the size of the image, but this is not true.
Re-focusing the lens will change the image size as well. Try it yourself on some macro object and you’ll see how image gets enlarged when you will re-focus from the closest to farthest point on the subject. If we re-focus lens we move internal elements in it: it works the similar way as we’ll move the whole lens, meaning object size will change.

So, yes, when we move the camera, image size gets changed. But the focus stacking software handles this very well. When I need to have my subject as close as possible, I often start shooting focusing from a closest (to a camera) part of the subject, moving to a farthest. Inevitably object gets enlarged so at the end of the sequence the front (closest, out of focus) part of it does not fit frame anymore. Photoshop ( I believe any other stacking program) does handle this very well, stacking the whole thing correctly: It simply use only focused part of the image, stitching only areas that are in a focus. So, the whole sequence of “usable” areas will have exactly the same proportions, as the distance between lens and focusing plane (focusing distance) will be the same, right?

This means the size of the focused part of the object will be always the same, and software won’t have any trouble stitching it together.

I’ve used F11 aperture for the shoot: this is right in the middle of “sweet spot” for the lens I’ve used, Canon 180mm F3.5L macro. Here is why:

As we all know, DOF gets increased when we closing aperture (larger number on F stop value). However, every lens loses contrast and amount of visible details (linear resolution) when aperture gets closed: diffraction starts playing a big role when light travels through a pinhole lens…
Each lens has it’s own “usable” range (you have to “master” your lens to found it), but even most expensive ones does not do a good job at it’s maximum F-stop number. You can see examples of how image gets changed when we go from F8 to F16, than F22 and f32 on my another article, where I’ve compared Hasselbald H4D-50 and Canon 1Ds MkIII.

I did total of 12 shots for the bracelet: by doing a little bit more then needed, overlapping focused area on each shot, we got that extra amount details on the final, merged image. Photoshop does great job of pulling all the usable information from each shot and combining it on one final super-image:-)
Those extra shots does not cost me much time, but the end result… that amount of details you can’t get even with 50+ megapixel medium format camera image done in one shoot.

100% crop of the left end of the bracelet:

product photographer focus stacking lesson 100 crop example left part

100% crop of the right end:

photigy focus stacking tutorial: 100% crop example right

100% crop of the center:

Focus stacking how-to 100% crop example center of the image

The rest is on the video:


Lighting, light modifiers and accessories:

Exposure specification: shutter speed 1/250 sec, F18, ISO 100

If you are serious about learning more, check out my e-books and e-tuts made for professionals:

Free Studio Product Photography Course

free tabletop photography course-glass
  • Find out what equipment you'll need to start in product photography
  • Understand how to use the most effective techniques is studio lighting
  • Learn how to photograph and retouch glass subject

Enter your email and I'll send you this course:

Thank you, your signup was successful. We just sent you a confirmation email, please click on a link inside.
Given email is already subscribed, thank you!
Please provide a valid email address
Opps. Something went wrong. Any idea what it could be?


About The Author: Alex Koloskov

The lighting magician, owner of AKELstudio, Inc.

You may also like to read:

77 comments to Focus stacking technique using Adobe Photoshop CS5

  • wallace wong

    hi, Alxe,

    I’m using Nikon D600,and I try to take photo with Lightroom 4 using Tethered Capture function. But Lightroom doesn’t recognize my camera,so do I need some sort of software to make it work?


  • Frank Secchi

    Hi Alex.
    Do you utilize focus stacking on all ring shots? I am curious because in my first serious attempts at shooting a ring with a 100mm macro I soon realized that I could not get the entire ring in focus unless the camera was a very long distance from the subject.

    • Frank,
      Not always. Now what I shoot with hasselblad Optics, I can get pretty much of the whole ring in a focus at F41 and have decent contrast and details. So I leave focus stacking only for quality shots (like Ads, etc)

  • Alex,
    Great videos, easy explanations and your photos are great. I’ve used focus stacking before but you really made me understand how and why it works. Moving the camera!! that makes all the difference. I watched another one of your videos about lighting the diamond ring and was wondering how you held the ring in place? Maybe I should ask this question in that section, but I just wanted to say thank you for all your help.

  • Peter Phillips

    Thanks again for your tutorial Alex, and thanks also for mentioning that re-focusing the lens will work well enough in most situations if you don’t have macro rails.

    I only realized the problem with being out of plane with my tripod moves AFTER I had processed the images. I feel I might have been a bit lucky that auto-blend worked so well in Photoshop.

  • Such a great article which his technique once a while, mostly for a critical product shots, where closed aperture or tilt-shift lens does not provide enough DOF and/or details. In deed photographed a silver bracelet, positioned at about 45 degree from a camera focusing plane and then used Photoshop CS5 to compose a final all-in-focus image. Thanks for sharing this image and idea.

  • Peter Phillips

    A really great tutorial Alex. I have just added a post to Google+ detailing my success using your detailed instructions on technique (

    Thanks very much for all of your sharing – you and your wife are a great, inspirational team!

    (A large version of my image is available on Google+)


    • Peter,
      Cool shot, thank you for sharing. I’ve read how you created it (by moving tripod, etc) – this was quite a desperate attempt to shoot without focusing rails with the great outcome. BTW, you might just re-focus the lens, if no focusing rails in use. In most situations it will work well.

  • Russell Kilgore

    Great video Alex. I am still a little confused though. Is the camera in manual focus mode? Once you make your initial focus on the closest part of the subject, there’s no need to change the focus again right? Please help.


  • Man thank you very much for your posts, they are very nice done, professionally done. btw… usually people charge money for giving a way such information… even more… they do not teach you nothing but in the same time they charge you for their “workshops”… You have the best workshops which I saw and you do it for free… that is time and money invested in that… how that pays you back? Which is the “motor” which leads you?

    • Victor,
      Before you can charge good money for workshops and books you need to be known first. Nobody will pay a dime to “just a guy who makes good photos”.
      Sharing is my way to become visible and to make my name recognizable. In addition, it is very mentally and emotionally rewarding to see how my free stuff helps people:-) The motor? My passion in photography.

  • Mur

    Hello Alex. Wonderful explanation. I am learning very much with your classes. Thank you very much.

  • Damen Stephens

    Don’t forget two things though – the change in magnification during focussing you describe applies to internal focus lenses (which must shorten their focal length when focussed closer as they cannot increase the physical length of the lens), not to all lens designs. Also do not forget the role that Effective Aperture plays when close focussing (it is effective aperture which determines diffraction, not actual aperture). In this instance if you set f11 on your lens, dependent upon how close you focussed, the effective aperture may be f22 or even f32 – well outside of the “sweet spot” of the lens you mention (and well limited by diffraction).

  • Paul

    I’ll take that as a NO then.

  • Thanks Alex, I used my DIY macro rail and Sigma 50MM macro lens.
    In 3 steps I came to this result:

  • There are amazing focus stacks of macro work over at the photomacrogaphy forum It’s what got me into focus stacking to see that kind of detail on things. though, I use a different program Z-combine I think is what it’s called, to do the stacking for me. Maybe clean up halos in photoshop.

  • Paul

    Hello Alex…Can this focus stacking be done on Photoshop CS4 extended? I have done photomerge for Panorama.

  • Hugh

    Thanks for all the time and help you have put into this subject (stacking). After wasting a lot of time, and I do mean a lot, I am now on the right track.
    Thanks for your tips and time.


  • Mike F

    This is fabulous work Alex. It is also extremely generous of you to put in the time and effort to share such valuable advanced techniques in such detail.
    Very much appreciated.

  • StefanosL.

    Excellent work! Very informative video and post. Thank you.


    this is the one i will order next week,
    something else, if i wanna use my 180mm macro in canon eos1d markIII body where should i put the plate? on the body of the camera or on the lens? because if i put it on the lens there is a difference on the height

    • Lefty,
      I have connector on a camera’s body, I like it this way. If you put it on the lens, it will give you more balance, especially with long lens like 180mm macro. You decide what is the best for you:-)

  • Hi Alex,
    Today i’ve got my Manfrotto 454 rails but i thing i need something extra as well because my eos 1d mark III with the 180 mm macro doesn’t feet all by it self.
    can you please tell my what is the missing part?
    Thank you so much

  • Edgars

    Добрый день
    просмртрел ваше видео по поводу стекинга.Я когда загружаю фотки Photomerge и ставлю галочку Aвто -он загружает как панораму.Что я делаю не правельно.С не терпением жду ответа.
    с уважением

  • sabrina

    Hi Alex,
    Thank you so much for taking the time to share your experiences with us. I am sure everyone benefit from it, especially me.

    I have a question on the “Manfrotto 454 Micrometric Positioning Sliding Plate” in relation to “change a distance between the camera and the subject by moving the camera”. I am guessing that you are moving your camera back and forth on the rail to make different parts of subject focused, correct? Would it looks different if it was moving left and right? Sorry if this question seem out of place.

    • Sabrina,
      Yes, this is exactly correct. Focusing point gets changed without re-adjusting focus on the lens when you move camera. Usually it is not back and forth, but one direction: you focus on the closest part of the subject, and then move camera (by sliding on rails) towards subject, composing image every time you move on a DOF distance.
      You can use rails to move camera side to side, but this won’t be a focus stacking, more like an image stitching: used to make larger then camera sensor size image.
      Thank you!

  • Sergey

    Отлично, спасибо! Всё в одном месте ;)

  • Sergey

    Привет. Подскажите, а в постобработке, при сборке финального результата склеиваете изображения при помощи масок? Или есть более хитрый способ? Спасибо.

  • Tom

    I really enjoyed this tutorial. I decided to give macro/focus stacking a try! here are my results. I did this by manually advancing the focus but I had so much enjoyment from the process I ordered an inexpensive focus rail. Thanks for all you do on the blog Alex, you’re very generous!


    • Tom

      - Here’s one more…


    • Tom,
      Well done, you’ve got it!
      I was shooting a lot of jewelry recently, and my Manfrotto macro rails seems to be too rough: hard to get a smooth movement, especially if object is really small. Going to buy some more serious one.
      Thanks for sharing images, they are look great.

  • Vu Duc Thao

    Dear Alex,
    Thank you very much for your helps. I will try it again :)

    Here is the Pearl images that I took 37 photos and sticked them together with out Blurry in Photoshop. All parts of this photo are in sharpen – It just take me 30 minutes to get done in Photoshop.


    I though you are right, may be the photos I sent to you, some parts are overexpose, so the software can’t fix them. I will try it again and show to you Alex.

    Thank you for all Alex,
    Vu Duc Thao

  • Vu Duc Thao

    Alex, I sent email to you already.
    Thank a lot

    Vu Duc Thao

    • Vu,
      I’ve played with your stacking sequence and here are my thoughts:
      1. you are making too many shots. for the ring you send me 5-6 shot would be quite enough to get it done.
      2. I was not able to get correctly stacked image by using photoshop and helicon focus software. Tried the full sequence and only 6 frames -result the same. In some cases I was getting message from a stacking program saying that images can’t be aligned at all. It looks like you’ve got either: camera shake which cause subject to be moved slightly or/and brightness was changes during the sequence (this is what I’ve seen on some of the images). Any of this can cause the software to fail to stitching it correctly.

      Also, I think the biggest issue with blurred top of the ring came from overexposure of that spot. Try to shoot it right and it will work.
      Hope this will help, good luck!

  • Vu Duc Thao

    Dear Alex,
    Thank you for your help.
    All photos I uploaded at link:

    I use the focusing rail to took all those photos. I am not sure may be my Tripod have a problem. But, Can you check those photos for me Alex. I still don’t understand why!!!

    Thank you very much Alex

    Vu Duc Thao

  • Vu Duc Thao

    Dear Alex,

    I have a question about Focus Bracking that you did. I had just done 1 Couple ring with 15 seperation photos, every photos are very Sharp. But when I do Focus Bracking as your way, On the adge of its get Blurry. Do you know why? How can I fix it?

    Link to the photo:

    Many thank Alex,
    Vu Duc Thao

    • Vu,
      I may be wrong , as to be sure I would have to see all the sequence in hi-res, but it looks like you have a part of your ring overexposed, which caused Photoshop to stitch it somehow incorrectly.
      Also, how did you move the focus: by re-focusing lens or moving the camera? if camera was moved, what rails you’ve used? The manfrotto I’ve used in not very precise, and it may affect the stitching quality…

  • Mahmood

    Thanks Alex,
    I tried the usefull light techneque in this vedio i like it so much it realy gives a 3 dimentional look to the jewelry am shooting but it worked on plane jewelry i mean jewelry without gemstones or diamond, when i shoot diamond jewelry the luster of the stones was too much and some stoned looked black….
    what do you advise me to use ???
    i am using 2 small soft boxes with light tent and controling my light ratio or one soft box with reflectors that is helping me to creat some shadows.
    i would realy appriciate it alot if you will advise
    Thanks again

  • mahmood

    Thank you Alex very usefull materials, could we use a tiltsheft lense to get every thing in focus , or focus stacking better ?

    • Mahmood,
      TS lens (or TS adapter like I’ve made) will work, but not as good (“good” means here deeper DOF) as focus stacking: with TS you can tilt a focusing plane, but actual DOF will be reduced. This always happens when you tilt a lens.
      Sometimes this is a good thing, and you can same post-production time shooting with TS lens. When TS is not enough, Focus stacking will help for sure:-)

  • Very good Alex! Too bad I didn’t read this three days ago before I shot a couple hundreds of inside-out earrings with the inside, naturally, out of focus. The final photos are small so a lot of sharpening was of some rescue but the result is still so-so and I can see that on the face of the client.

    • Thank you, Saul, glad you found it useful.
      However, i doubt if it will work well for hundreds of the pieces: it might be too much of a trouble to process each. Tilt-shift adapter may help better: Cambo X2-pro or DIY view-camera based system I build a while ago.

      • Alex,
        it works like a dream. I have set a couple of action in Photoshop to automate the process and rarely need more than 3 photos for a stack so it goes pretty fast and with very little attendance from my side.
        How about using a GiGaPan EPiC Pro? I’ve just discovered its existence while reading a last year issue of the American Photo magazine. Have you or anyone you know used it? I wonder.

        • Saul,
          Yeah, PS action will help here. I have not seen these devises before, sounds like a nice machines. Do they actually do a focus stacking, or just a panorama?
          I do not use use focus stacking often, so manual controls is for me:)

          Thank you!
          P.S How do you know Russian?

        • @Alex,
          I am from Lithuania. Since we are debris of the former USSR, practically all my friends are Russians here in LA. Throw in Armenians, Central Asians, Ukrainians… There are areas people in LA people wouldn’t even attempt English when they try to strike a conversation with you.
          I haven’t seen any of these devices either. I assume, to the camera, everything is a panorama, be it a jewelry piece or a landscape. I wrote the company today asking to lend me one for a test. If they won’t agree, I might buy the smaller one anyway, it’s just around $200. My main concern is speed, how fast it moves. Also, if it’s guided by autofocus, it would be pretty useless in jewelry, I suppose.

  • Very useful tutorial. I still don’t quite get how Photoshop shows only the focused selections from each layer of the blend. I’ll have to have a go myself! Thank you.

  • Kevin

    Hi Alex,
    Since you are using this technique, do you still use your Tilt/Shift system?

  • Martin

    Hello Alex.
    Very informative tutorial. I have one question concerning the macro focusing rails you have used, it seems that the control is very smooth and accurate, i am interested in purchasing one of those, which brand is yours? and where can i get it?


  • Thanks for giving the tutorial on focus stacking. I don’t have a micro adjusting rail so I tried re-focusing instead. It turns out OK: Of course, it’s no where as clear as your samples. Not pro quality for sure. But I think re-focusing can work for amateur stuffs. The rail would be nice to have and it seems reasonably price. Of course a good macro/micro lens would also help.

    • Tung,
      Very well done, thanks for sharing. Adjusting the lens focus will work as well (as we see on your example). Honestly, I do not feel any difference between focusing rails and focus adjustment technique… There may be some, especially if we have some propped background, but for basic stuff our eye won’t see the difference.

  • Salman

    Hi Alex

    I have read your article there, one thing i want to know that if somebody wants to shoot in raw then how to do focus stacking along with post processing in light room of more than 3-4 images.

    • Salman,
      On the video tutorial you’ve seen I shot RAW stitching 12 images using adobe bridge and Photoshop. I hope it will be quite clear how to stitch RAW of more then 3-4 images in the Bridge + Photoshop. Speaking of Lightroom, I do not know is it possible to use it for sticking images, have not seen such functionality in it.
      My guess that there is no way you can do it in Lightroom.


  • Hi Alex, thanks for your great tutorial! BTW I am waiting on Einstein to become available. I was thinking to get 4 or 5 units. I feel i grew out of alien bees.
    I am really looking forward to your review. I have their zeus pack 2500. But the bloody thing blew up 2 weeks ago scaring the hell out of me and clients. I think condenser got overloaded…

    • Sasha,
      Thank you:-)
      I’ve ordered 2 Einsteins to test them: one around April, one June. I was never thinking that back-order will last that long:-) The good thing that I’ve got Einstein 640 V2, which should be better then the original one. I really hope Einstein will work as they advertised: otherwise, I am almost ready to get used ProFoto 7a with 3 heads for ~$3K. The old WL and AB units does not work well with PCB CyberCommander, which is really frustrating…
      Will see:-)

      • @Alex Koloskov, I hear ya. It’s not a bad deal for proFoto. I rent them occasionally when there is budget. They are nice packs. But they come with price tag and are expensive to fix… Once you have one pack you’ll need another and for color consistency you would want to use all pro-photo heads.So on a long run you are looking at probably 2 -3 packs and 5-7 heads…. I was so pissed off at AB the other day I was shooting my daughter jumping and and AB would not freeze the action. I did many takes with no luck. Camera was on tripod at 250/sec with AB 1600 set to 1/4 of the power. tried a few different setting combos with no luck. Very noticeable motion blur… did you experience that with AB? – I know you shoot a lot of splashes and stuff…

        • Sasha, you are right.
          Once I’ll bite a piece of another brand, I’d have to switch completely: lights, modifiers, etc. It is still about $4K to replace all my AB and WL with Einsteins, but it still will be less expensive then to go with profoto. I only hope PCB stuff will be reliable enough.

          As for high speed and old PCB lighting, they are useless for action shots. I’ve never have motion blur during people photography though: your daughter must be a really fast jumper:-) The splash image done with AB looks terrible:

          I’ve done my test with Einstein, hope tomorrow will release it:-)

  • I read your post over there. A very interesting read about a subject I didn’t really know much about. To be honest I didn’t know you could do like that.

    And on top of that, at first I couldn’t figure how it’d make any difference and then I remembered how some of my pictures is more focused on some parts then other, even at the focused area so to say. So I suppose that has something to do with it?

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>