NikonD850 focus stacking - I need a math solution

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

leander
Posts: 68
Joined: Sun Jun 19, 2011 8:39 pm
Location: USA

NikonD850 focus stacking - I need a math solution

Post by leander »

I'm using the Nikon D850 in camera focus stacking feature with the Nikon 105mm macro lens. Nikon has yet to describe how the step distances are calculated so I created a look-up table but it is based on interpretive DOF using a mm ruler (I was shooting a ruler for days). Better than nothing but not very quantitative. I'm most interested in "in the field" automated focus stacking. Here is my current workflow:
o find something to shoot
o frame it and decide what f-stop to use
o check magnification ratio in window of 105mm macro
o consult look up table and for that mag find step value and SET IN CAMERA
o estimate what DOF you want and consult table SET # FRAMES IN CAMERA
o push "GO" and watch the green light flash and hope the wind stays down
o it's done when the mirror slaps back

Perhaps a more precise method might be to have a math-based look up table for different magnifications and f-stops to find the individual frame DOF. Then test the D850 with a very fine stage micrometer standard to see what each step value produces for DOF? The step distances should all fall with the general range of 1.3mm - 0.1mm.

Or....is there a better more precise way to calculate the D850 step values for macro/close-up work?

All I've seen on the internet is "set the step value to 5 - that seems to work pretty well."

Steve S
Posts: 84
Joined: Fri May 10, 2013 1:52 pm
Location: Southern Arizona, USA

Post by Steve S »

I see no one has replied. I've found essentially nothing on the web to bookmark/crib about this. There are so many variables, lens focal length, magnification/subject distance, aperture, photographer's tolerance for slight variations in sharpness, What have I forgotten?

Nikon has left the details entirely undocumented and presumably will continue to do so.

I dimly recall Jim Kasson discovered that some changes in step size have no effect whatever on step distance.

I also dimly recall that no one seems to have found step sizes beyond 5 to give tolerable results. If so, why, the world wonders, did Nikon provide them? Almost all the recommendations I've seen ranged from 2-5.

You, Leander, seem to be the bleeding edge. Care to share what you've found?

You, other D850 owners, are you using this capability in practice? How?

Lou Jost
Posts: 5945
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

As a big fan of this kind of focus bracketing, I'm also very curious about the D850 implementation. I am puzzled by the concerns expressed above. I currently use the Olympus implementation. In that implementation, there is no need to figure out anything. The Olympus step size, and also probably the Nikon step size, is automatically calculated to take into account focal length and lens magnification. I always use the lowest step size unless I have some reason not to. I don't pre-plan the stopping point either. I just always have the camera set to a very high number of steps and I watch the images progress on the LCD until everything I care about is fuzzy, and then I press the shutter button to end the process. (I don't know if Nikon shows the images as it takes them; I would hope so.) No calculations are necessary and I have never had a bad stack that was the camera's fault.

With the Nikon, Jim Kasson has proven that the minimum step size of the D850 is not quite small enough, so I can't imagine why anyone would use a higher step size. So if the Nikon implementation works like the Oly one, just relax, forget about the numbers, and enjoy it!

leander
Posts: 68
Joined: Sun Jun 19, 2011 8:39 pm
Location: USA

Post by leander »

Okay, Steve.
Here is a summary spreadsheet I created after shooting a ruler. As you can see the optimal step size I found for different magnifications and f-stops ranged from 1-6.The second picture shows how I did my calculations and the third picture shows my ruler setup.

Again, I used the D850 and the 105mm macro. There is some subjectivity when viewing the ruler images to establish exactly how much is in focus. It's better than nothing and it has resulted in a cheat sheet that seems to work quite well in the field for different magnifications and f-stops. I just figure there is a more precise method to make the calculations. Let me know if you have any questions about the spreadsheet.
Bruce


Image
Image
Image

Steve S
Posts: 84
Joined: Fri May 10, 2013 1:52 pm
Location: Southern Arizona, USA

Post by Steve S »

Thanks, Leander. Ring-focusing at 1:1 is a challenging area and maybe something of a special case; anyhow, the step overlap seems quite insensitive to set step size. At lower magnifications you seem to feel step size 1 is pretty much required. Is that a fair summary?

I've tried to use DMap with "Focus Shift Shooting" as a convenient way to evaluate curvature of field at infinity, and found step size 1 to be inadequate (commented to that effect on Kasson's blog); on the other hand I've made experimental stacks of a bookcase viewed obliquely at ~1m and seen no definite focus banding at 4, but hopeless banding at 7.

Lou, the Olympus displays images as it progresses? Way cool! The Nikon stays black through the whole sequence. At the end of the sequence you can look at the last image and if it's short, restart, that's the best you can do. As to why not just use step size 1, I can only plead impatience. Sometimes en plein air one just wants to get the deed done as fast as possible.

I gather from the web that the Oly also takes aperture into account in determining step size, and that the manufacturer documentation is no better than that of Nikon.

leander
Posts: 68
Joined: Sun Jun 19, 2011 8:39 pm
Location: USA

Post by leander »

Well, Steve. I can't figure the logic behind the data I generated. I thought once I had the data in hand I would see some logic or a pattern and hopefully build a curve so I could fit any f-stop and magnification.

The approach I used was to look at 1:1, 1:2, 1:3 and 1:4 then try different f-stops and then cycle through the D850 step values to try to see a pattern. I shot 94 different tests so in the summary spreadsheet you are not seeing the step values that didn't work - either the steps were too wide and created banding or they got so narrow it just wasted shots to get DOF. I narrowed it down to the step values that worked the best for the different magnifications and f-stops.

Generally, the higher the magnification 1:1 and 1.44:1 the step values that worked the best were higher (5 and 6). At the lower magnifications are lower (1 and 2). So yes, you are right, for magnifications of 1:4 and 1:3 step values of 1 or 2 worked the best.

The D850 can control the lens step distance pretty well. I tested it down to steps that were only 0.18mm. It might even go more precise - I didn't test that specifically. I do now that Control My Nikon can control the 200mm macro down to 50 microns! My shortest step distance using CMN and the 105mm macro was 0.10mm or 100 microns.

Lou Jost
Posts: 5945
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Steve, it is too bad that the Nikon doesn't present the images in the LCD as they are taken. That is a very helpful feature. Maybe the processor can't keep up with displaying such large images fast enough. But even the basic Olympus cameras can do it, and it works smoothly, looks like a video as someone pulls the focus.

Post Reply Previous topicNext topic