Motorized bellows

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

nathanm
Posts: 222
Joined: Thu Jun 02, 2016 8:13 pm
Location: Bellevue, WA
Contact:

Post by nathanm »

The goal is to have a sequence of frames that cover the subject in a distance range, such that each point in the range is within the DOF of at least one frame (and some overlap). That gives a sequence of points in subject space to focus. That is what is needed to stack.

That is why I calculated the step size in subject space. For each of the focus points found that way you can find the corresponding image side position. That is the set of steps to move the back of the bellows.

I don't see how I could get a smaller number of steps calculating from the image side alone, unless it reduced the overlap.

Because the image side and subject side are nonlinearly related, a big step on one side is a small step on the other. But that doesn't matter for taking the picture.

It appears that variable step size is the big win. Changing the aperture is a nice optimization but it would require a separate stepper motor to change aperture. Set ups to motorize the aperture for manual lenses exist for doing time lapse, stop motion animation and the like. A program like Helicon Remote that works with lens through the autofocus motors could do this directly for a something like the Canon 100mm macro.

However even in the really deep scenario above the aperture changing buys less than a factor of two in a situation where the variable step size buys 50X. There would be more value in the aperture if we could really stop the lens down, but diffraction and modern sensor sizes prevents that.

I hope I have done the calculations correctly, so I am interested if anyone sees a problem!
nathanm

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

OK, I do not think there is anything wrong with choosing image side or subject side using QLWE method, I think it is the choice of choosing an minimum step size that makes a big difference.

I think if we chop up the curve into many small segments and choose the right minimum constrained by QLWE formula WITHIN that segment, then add up the results, the difference between image side and subject side is probably very small. And in fact this chopping IS how variable size step is done for both sides -- grouping data optimally according to physics, QLWE formula


However, picking a minimum constant step size for the entire range ignoring the curvature, it is probably better to choose a curve with less curvature (ie the blue line -- image side). As shown by Rik, there is only a factor of 2x for constant step size vs variable step size.

So the choice of picking the right curve to find a minimum constant step size is NOT governed by physics (ie QLWE), rather it is subjective choice.

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

nathanm wrote:I am interested if anyone sees a problem!
Yes, I do see a problem. It seems that you have switched gears from fixed size steps in rear to fixed size steps in front, but have not fully realized the implications of that change in strategy.

What I'm struggling to understand is why you don't see the same problem (yet), and by implication, what I might say to help you see it.

Clearly the math is not working, so let me try something completely different: plain English that concentrates on the concepts.

I will use the word "crazy", at the risk of sounding impolite but hoping that word helps to solve the problem.

Here's the problem:
There are sane ways to choose steps, and there are crazy ways to choose steps.
For a stack covering 0.01X to 1X, using constant step size on the subject side is a crazy choice.

The crazy numbers that you're getting appear to be computed correctly, and what they show is that the choice is crazy.

Now, let me recap how I think we got here.

You started off by proposing to automate rear bellows extension. You noted that there is an issue with nonlinear step size, and I replied that I thought the nonlinearity was less of an issue than it might seem at first.

At http://www.photomacrography.net/forum/v ... 636#192636, I analyzed a stack that is 1X in the front, with depth equal to width, and concluded that the penalty was only around 15% to 25% for using fixed size steps in rear bellows extension, versus steps that were varied optimally to match the change in effective aperture.

After that, at http://www.photomacrography.net/forum/v ... 779#192779, you introduced an example from 0.01X to 1X, in which you reported calculating that it would take 111,112 constant size steps, versus only 832 optimal steps.

Your method of calculation was not spelled out, and the number seemed crazy to me, so I replied by describing how I would work the same problem, a stack from 0.01X to 1X.

I worked three cases, each time using a sane method to choose steps based on rear bellows extension. Those sane methods were 1) constant step size at lens setting f/4.5; 2) optimally varying step size at lens setting f/4.5; and 3) constant step size while varying the lens setting to maintain effective f/9. My conclusion was that fixed step size in rear extension was within 2X of optimally varying step size.

Now, in your later replies, it has become clear that your huge numbers result from choosing to use fixed step size on the subject side.

This is the part I'm struggling to understand. Again, it seems that you have switched gears from fixed size steps in rear to fixed size steps in front, without fully realizing the effects of that change. Re-reading some of the earlier posts, I wonder if maybe you're stuck thinking that equal steps in front and equal steps in back are somehow equivalent, when in fact those strategies usually give very different patterns of steps for a deep stack.

Anyway, to state my point again, to me it is completely clear that trying to go from 1X to 0.01X with fixed size steps on the subject side is crazy.

Let me go back to math to make one more attempt. Please consider the most distant step in your example, the one of size 0.1782 mm ending at distance 10100 mm. Using the basic formula 1/f = 1/o + 1/i, plugging in f=100 mm, with o = 10100 mm and o=10100-0.1782 mm, we find that the corresponding rear extensions i differ by only 0.0178 microns!

This is a pointlessly tiny step size, several thousand times too small on both the front and the back, and that problem is caused by the (crazy) choice to use fixed size steps on the subject side, instead of fixed size steps on the rear bellows side.

I imagine that if you were to assemble the setup and try to run the experiment, the device would immediately club you over the head about this aspect. But in lieu of a physical experiment, perhaps this discussion and calculation will make the point.

To summarize... In the range of ~0X to 1X, using constant steps in rear extension is sane (and is within 2X of optimal), but using constant size steps on the subject side is crazy.

Does this help?

--Rik

Edit: 6/25/2016 2:25 pm PDT, to clarify wording.

nathanm
Posts: 222
Joined: Thu Jun 02, 2016 8:13 pm
Location: Bellevue, WA
Contact:

Post by nathanm »

I have figured out what the issue is - will post soon, I am making some graphs...
nathanm

nathanm
Posts: 222
Joined: Thu Jun 02, 2016 8:13 pm
Location: Bellevue, WA
Contact:

"

Post by nathanm »

Here is my best current understanding - I did make a mistake in the interpretation of the calculation. However it is not quite the case that it is about moving the front or moving the back.

Here is a very schematic picture of the setup - assuming that the sensor, the lens and the subject are all on the x-axis

Image

Suppose that in all cases we use a 100 mm lens set at f/4.5. The starting position will have the lens at x = 201, the sensor at x = 1, and the subject at x = 401 - all in mm.

This is made to simulate Canon 100 macro at f/4.5 focused at magnification m = 1 on the nearest end of the subject, but via the thin lens approximation.

We then need to calculate a sequence of frames that have DOF which tile the subject (with 25% overlap) from x = 401 mm to x = 10301 mm, at which point the lens will be at m = 0.01.

We can move the lens, or the sensor, or both.

Here is what happens if keep the lens fixed and move the sensor (i.e. the case of moving the back of the bellows).

Image

it takes 1470 steps to get there. The plot shows the position of each element throughout the stack. Where it says subject, the subject is not moving but the point at which the lens is focused for each frame does move and that is what is shown.

This uses variable size steps. We can plot the variable size steps.

Image

If we want to use a constant step size, we need to choose the smallest of the variable steps, which occurs for the lowest magnification, which is 0.033 mm. Using steps of that size we get the version of moving the sensor, but with constant size steps.

Image

It takes 2995 steps to make the stack. This compares to 1470 steps with variable step size. So with this example the ratio of fixed to variable step size is a factor of 2.04.

What if instead we move the lens and keep the sensor fixed? This is what happens if we put the camera on a tripod and focus the Canon 100 macro lens normally - what Rik has called "by ring" on the Zerene web site and in posts on the forum. Here is that case.

Image

It takes fewer steps! We will see why below. But it may cause more stacking artifacts because the position of the lens changes enough during the stack relative to the out of focus portions of the subject that it could be an issue.

Instead we could move the camera and the lens together - this is the "crazy" case that Rik comments on - it is also the case called "by rail", because it is what you get with a Stackshot or other motorized stage. in this case the magnification stays constant at m = 1 and we move the camera and lens together, maintaining their relative separation.

Image

This approach works well for high magnification (i.e. what occurs with Mitutoyo or other microscope objectives) and shallow stacks, but it is crazy for a ~9 meter deep subject. The end result is a kind of orthographic projection, because the magnification is constant.

My mistake in previous posts was that I used the wrong step size for the constant step size so accidentally was doing this case.

How come there are so many different possible step sizes? The reason is the magnification profile of each case is quite different. Here is that plot.

Image

Each of these has a different number of steps because they shoot frames with different magnification and thus different DOF.

These cases are not the only ones - one could move both the lens and the sensor, i.e. putting the motorized bellows on a rail. It is not clear there is practical benefit in doing that, but it makes the point that there is nothing sacred about the cases shown here.

As I mentioned in previous posts, any time there is a large range of magnifications in a picture there is a kind of perspective distortion (also called wide angle distortion). Each of the magnification profiles will have a different perspective and thus give a different picture. That's especially true of the by rail case that has constant magnification, but it is also true for the others cases - even though the beginning and ending positions are the same magnification, the frames in the middle are not at the same magnification.

That can be seen in this plot that shows the magnification at each position on the subject within the range of the stack.

Image

The gap between the by ring curve and the move back (i.e. sensor) curves would be seen as different degrees of perspective distortion.

I hope this clears up the discrepancy. I made several mistakes in previous plots, and I apologize for that. But, once again I think this is right. Which it may not be so please chime in.

This says that in this case there is a 2X difference between constant steps and variable steps. There would be a further variation if non-constant aperture were used - which would take it down to 832 steps.

Stacking by ring with variable aperture is likely even less, but I have not calculated it. Allowing variable aperture and variable step size would be a good feature for programs that capture stacks by directly controlling the autofocus motors (as with Helicon Remote, Camranger and others).

Moving the lens (i.e. by ring) is not by itself crazy, it is moving the lens and sensor together (which is not crazy for shallow subjects).
nathanm

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

nathanm wrote:I hope this clears up the discrepancy.
This looks much better. I can reproduce your numbers to within a couple of percent, a difference that is easily explained by slight differences in exactly how the steps are computed. I think the structure of your calculations is correct now.

However, there are a couple of aspects I want to talk more about, in hopes that it will help you in thinking about these systems.

The first issue is almost a matter of interpretation. It looks like you're still thinking in terms of DOF as a function of magnification. I used to do that, but now I find it more comfortable to think of DOF as a function of effective aperture, using just the wave optics formula. The reason I find this more comfortable is that it seems simpler -- nothing to worry about except how wide the cone of light is.

For example, you've noted by calculation that the focusing method of "fix sensor, move lens" allows fewer steps than "fix lens, move sensor".

I agree with the prediction, which you explain in terms of the magnification profiles being different. But that explanation leaves me wondering: could I just enlarge the captured images somehow and retain the advantages of fewer frames while preserving everything else?

In contrast, I would explain the potential for fewer frames by noting that as the lens moves away from the subject, the effective aperture on the subject side gets smaller. It's that shrinking of the aperture that allows fewer steps.

But shrinking the effective aperture inevitably means more diffraction and less resolution, so the answer to the "could I" question is clearly "no". Once we've decided to fix the lens aperture and focus by a method that places the lens farther away from the subject, then we've committed to resolving less detail. No amount of magnification by any means will bring that back. Using a finer sensor won't help, and there's nothing we could do with relay optics between the aperture and the sensor. This limitation is immediately apparent by thinking about the effective aperture and its role in wave optics, but it's effectively hidden by any other model I know.

One other aspect, more practical in nature, is raised by this bit:
This is made to simulate Canon 100 macro at f/4.5 focused at magnification m = 1 on the nearest end of the subject, but via the thin lens approximation.
The model that you've used strikes me as completely appropriate to the problem that you originally proposed, where you would be mounting a fixed focal length lens on a bellows.

But I think it's not a very good simulation of any Canon 100 macro lens that focuses from infinity to 1:1 by turning a ring. The reason is that turning the ring on those lenses accomplishes a lot of its function by doing things like shortening the focal length of the lens, rather than by keeping the focal length constant and adding extension. This matters because it significantly alters what the aperture does as you change focus by turning the ring.

In your model, starting at the 1:1 position, moving focus away from the camera by 1 mm requires moving the lens toward the camera by more than 9.5 mm. It's that rapid retreat of the lens when focusing a little farther than 1:1 that causes the effective aperture to shrink so quickly. (In your graphs, it's also that same rapid retreat of the lens that causes the magnification of "by ring" to fall so quickly below the two "Back" curves -- two ways of looking at the same effect.)

In contrast, looking into the front of my Canon 100mm f/2.8L IS USM lens, what I see is that the entrance pupil moves away from the camera (toward the subject) as focus is pushed farther out. This is the opposite direction of movement from what your model prediction, and it's never an auspicious beginning when a model starts out with the wrong sign.

Above, you wrote that
What if instead we move the lens and keep the sensor fixed? This is what happens if we put the camera on a tripod and focus the Canon 100 macro lens normally - what Rik has called "by ring" on the Zerene web site and in posts on the forum.
This is not correct, and I hope you can now see the problem too. What you've modeled is not at all what happens "if we put the camera on a tripod and focus the Canon 100 macro lens normally". What you've said would be correct if the lens in question had fixed focal length and focused entirely by extension, but it doesn't.

The table at the top of http://zerenesystems.com/cms/stacker/do ... versusrail paints a pretty broad picture about how each focusing method behaves in the various magnification regimes. But notice that "Bellows front" drops from "Good" at low magnification to "Awful!" just past 1:1, while "Lens Ring (AF motor)" stays Excellent through that entire range. That high rating for Lens Ring reflects my experience with actual lenses, which tend to behave pretty nicely even around 1:1 while most bellows setups emphatically do not.

By the way, bellows front is particularly bad if you rashly try to go across 1:1, because it just doesn't do that at all. If you start below 1:1, then increasing extension makes the magnification rise while focus moves toward the camera. But exactly at 1:1 the direction of focus movement reverses, so that continuing to increase extension then moves focus away from the camera. If actually done, that would result in re-scanning the same depths you did a little bit earlier, but at higher magnification. Awful! A few minutes' experience prompts most people to try something different.

I hope this helps...

--Rik

nathanm
Posts: 222
Joined: Thu Jun 02, 2016 8:13 pm
Location: Bellevue, WA
Contact:

Post by nathanm »

The reason that I said "simulate" the Canon 100mm macro is precisely because I know that my calculation is not exact for that lens. Since that is an advanced design with internal focusing, the thin lens formula is not going to fully capture what it does.

As the topic of the thread says, the real reason that I am doing the calculation is for putting a lens on a bellows where I really do move the entire lens independently of the sensor. I thought that an example based on the 90mm M-Componon would be less generally interesting to other people on the thread.

The Canon 65mm MPE lens is, however, pretty similar to a lens on a bellows.

I am traveling next week but should be assembling the motorized bellows soon after that.

In addition to macro lenses, I am making adapters to mount some lenses from medium format cameras with long flange distances - such as Mamiya RZ67 and Fuji GX680, because in those cases I should be able to focus to infinity even with the bellows system. So I will try some deep subjects.
nathanm

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

nathanm wrote:The Canon 65mm MPE lens is, however, pretty similar to a lens on a bellows.
Well, sort of, but with an interesting twist.

Using a lens on bellows, starting at 1X, as you increase the bellows extension the focus point moves outward, very slowly at first and then with increasing speed until the rate of advance becomes almost as fast as the front of the bellows.

But with the MP-E 65, starting at 1X, as you turn the ring the lens gets longer but the focus point moves inward. It continues moving inward, more and more slowly, until someplace around 1.5:1 the focus movement gets very slow, stops, and then reverses. Beyond that point, the MP-E 65 does act pretty much like a lens on bellows, but in that range of 1X to 1.5X, the simple bellows model predicts the wrong direction of focus movement. Standards vary, but I'd be reluctant to even call that a useful approximation.

In the case of the MP-E 65, it turns out that there is a fairly accurate simple model: just think of the MP-E 65 as being a roughly 1.5X teleconverter mounted at the camera, followed by a roughly 45 mm lens on variable extension. To get the system specification of 1X-5X, the front section is run at roughly 0.7X-3.5X, and then the teleconverter multiplies that up to the full 1X-5X.

Getting back to the issue of "focus by ring", the MP-E could stack OK by ring for short stacks at magnifications well away from 1.5X, where that reversal problem happens. But around 1.5X, it runs into the same problem that simple bellows have at 1X: very little change in focus versus magnification, and with the possibility of reversal.

That behavior would be accurately predicted by the model of teleconverter+bellows, but not bellows alone. It's just another example of choosing a model that is as simple as possible, but not simpler.

Anyway, getting back to your motorized bellows, I'm looking forward to a report on the beast. Now that we have the step size thing thrashed out, I'm expecting great results.

--Rik

nathanm
Posts: 222
Joined: Thu Jun 02, 2016 8:13 pm
Location: Bellevue, WA
Contact:

Post by nathanm »

Well, here it is!

I am still fiddling with it, but here are some initial pictures

The backbone of the system is a ThorLabs breadboard on which I have mounted a ThorLabs 66mm optical rail.

I took a Cambo view camera as the bellows. I can also swap in a modified Mamiya bellows the same way.

The camera is a PhaseOne XF, but one could use 35mm the same way.

Image

The rear standard of the Cambo is mounted on a stackshot. The front standard is fixed.

Image

Using a lensboard modified to take M39 x 1mm threads I can put in a variety of lenses. Above is a 45mm f/2.8 apo componon. I also modified a lens board to take lenses from the Fuji GX680. Here is the 125mm lens.

The reason to use these lenses is (a) I already own them since I used to shot with that camera in the film days, and (b) the back focus distance for the Fuji is long enough that I ought to be able to focus to infinity even on the bellows.

Image

I want to try some wide angle macro, so here is the Fujinon 50mm
Image

Here, a recessed lens board has been modified to take Mamiya RZ67 lenses. They have a flange distance of 105mm, so again I ought to be able to focus to infinity with this set up.

Image

Unfortunately I have spent so much time getting together (and have a bunch of small problems to attend to) that I don't have any photos taken with it yet.
nathanm

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

Post by Lou Jost »

What an impressive setup! I am eager to see photos from it. I think it would be especially interesting to see comparisons of rear-standard focusing vs focusing by ring vs focusing by rail, for magnifications between 1x and 5x for hairy subjects that often cause stacking artifacts.

nathanm
Posts: 222
Joined: Thu Jun 02, 2016 8:13 pm
Location: Bellevue, WA
Contact:

Post by nathanm »

Here is the version of the set up with Mamiya 645 bellows. The bellows are much more manageable size, but of course I can't use the Fuji GX680 or Mamiya RZ67 lenses.

This is the S-K 120mm f/4 lens, which is the macro lens made for the PhaseOne system.

Image

Here is a very different S-K lens, the 28mm f/2.8 m-componon

Image
nathanm

nathanm
Posts: 222
Joined: Thu Jun 02, 2016 8:13 pm
Location: Bellevue, WA
Contact:

Post by nathanm »

After assembling the system and testing it, I quickly ran into two problems.

First, the use of the view camera components was good in part, but it made the whole system a bit vibration prone, and I wasn't actually using the movements. So I rebuilt the system to lock it down more.

Here is the current configuration.

Image

The front standard of the view camera is now locked down firmly between two Thorlabs optical rails.

As before, the camera rides on a StackShot stage, but now the rear standard is simply supported on the camera rather than trying to cantilever the camera off of the standard.

The other problem that I ran into was bad stray light problems as discussed in this thread http://www.photomacrography.net/forum/v ... hp?t=31752, but I cured that problem with some 3D printed baffles.

Which is a lot of work, but now finally I get to take pictures with the system. When I do get something noteworthy, I will post about it...
nathanm

Sager
Posts: 52
Joined: Fri Jan 09, 2015 8:52 pm
Contact:

Post by Sager »

Not sure anyone wants to revive this post:
Thought I would chime in if anyone else is interested in this style of shooting. I've been shooting almost exclusively with the rear bellows technique for years on a custom setup.

I've never done any serious math I've just developed a feel for it and given the restricted range of magnifications and lenses I only make minor adjustments to get good results.

I typically use the rear-standard focusing for magnifications below 1X and occasionally slightly above 1X. The lenses I'm currently using: 120mm Apo-Digitar Macro 1X, 120mm V-mount Makro-Symmar 0.5X, 105mm Printing Nikkor and a recently acquired 105mm Apo-EL-Nikkor.

I prefer this method because I can frame the intended image based on the foreground, stop the lens down get a decent DOF preview. I will typically scan through the image a few times taking test shots and reviewing the image via live-view. I don't mind taking hundreds of images if I'm getting results.

If I have an issue with exposure latitude (usually because there is a portion of the subject I can't easily get light on) I will just bracket the exposure and then admittedly waste a bunch of time lining things up in Photoshop. If you've ever tried- two identical stacks of images at different exposures will stack slightly differently (I use Zerene). If I did this more often I'm sure I could automate a better way to do this by crunching through the HDRI portion before sending to Zerene. As it stands with the IQ150 Phase One raw files I rarely have underexposed bits that I can't revive in Capture One before processing from RAW to 16-bit tiff.

Here's a couple pic of my bellows setup and a wider shot for context (while I was shooting pieces of slag glass). I put arca-rail top and bottom so the whole setup is actually flips upside down so I can easily switch from focusing with the lens locked or move the entire assembly. These pics are about a year old, I've streamlined things a bit since then. I tend to make a whole new motion control apparatus every time I switch subjects.

Image
Image

nathanm
Posts: 222
Joined: Thu Jun 02, 2016 8:13 pm
Location: Bellevue, WA
Contact:

Post by nathanm »

Glad to see that I am not the only PhaseOne user!

My own motorized bellows set up is quite different now than the pictures above.

I have upgraded the stage, redone the frame. I no longer use the PhaseOne camera body - there is an electronic shutter feature in the back. This is great because it means no vibration.

Doing stacking and stitching has turned out very well for me.
nathanm

Sager
Posts: 52
Joined: Fri Jan 09, 2015 8:52 pm
Contact:

Post by Sager »

How do you like the S-K 120mm f/4 at 1x? I've been thinking of getting one but not sure if its peak performance will be in the range i'm interested in ~0.3-1X, at least compared to other lenses I own like the 85 MacroVaron, 105 ApoELNikkor (0.1-0.3X), 120 Apo-Digitar M, etc.

Have you used the S-K 120mm f/4 with the focus stacking feature on the XF? I'm mostly interested in the lens to speed up image capture in the studio and shoot focus stacks in the field.

Post Reply Previous topicNext topic