johnnyoptic: DIY camera lens tutorial I probably should have called this "Confessions of an Obsessive Lens Maker," because I must admit that I've been more than preoccupied by making lenses. At some point soon I need to actually spend time taking photos. I have no formal training in optics and am far from an expert. However, I thought I'd produce this brain-dump in case it's any use to others who may be starting down the lens-making path. Why make lenses? My real reason is that I love to experiment and I love the challenge, but there's also a practical reason: I want to experiment with certain optical effects that are difficult or extremely expensive to do with commercial lenses: spherical aberration that causes the glow of monocle lenses; non-circular apertures (and I don't mean little hearts) to produce extreme bokeh effects; and my biggest goal, tilt-shift to swing the plane of focus for selective focus and DOF effects. First lens: single element, fixed aperture, fixed focus. Any lens that focuses light (a double convex, plano convex, or positive meniscus) and has a focal length that is at least as long as the flange-to-focal-plane distance for your camera (46.5 mm for my Nikon) can be used as a camera lens. Magnifying glasses, lenses from binoculars, reading glasses, are all potential camera lenses. I got most of my lenses from SurplusShed ( www.surplusshed.com/ ), where lenses typically cost $4.00 to $10.00. Since I wanted to play with a lens with a very fast focal ratio, I ordered a positive meniscus with an advertised focal length of 65 mm and a diameter of 47 mm (price: $6). This should theoretically produce a fast focal ratio of 65/47 or about f/ 1.4. As it turned out, SurplusShed's measurement of the focal length was a bit off. The actual focal length of this lens turned out to be about 45 mm. Interestingly, at a diameter of 47 mm, this lens exactly fits in my Nikon lens mount without falling into the camera. Even so, with a 45 mm focal length, it would not focus to infinity. The maximum focus distance was about 10 feet. On the plus side, a 45 mm focal length meant that this lens was theoretically faster than f/ 1.0. And so, I decided to call this lens the antipinhole. First results: optical aberrations. As I stated, with the lens resting in the lens mount, the focus was fixed at about 10 feet. The images were about a half a stop brighter than my Nikkor 50 mm at f/ 1.4 so I don't think I quite achieved f/ 1.0 but it was measurably faster than f/ 1.4. But the big surprise was low contrast and very large halos around any bright objects. And unlike what you might expect from a lens at about f/ 1.2, there is no thin plane of focus that snaps in. Instead, there seems to be a very broad area from about 7 feet to 14 feet that has nearly the same degree of focus. Of course, the low contrast, halos, and soft focus can all be put to good use as long as you are not looking for the crisp images produced by commercial lenses. All of the distortions I mentioned above can be largely explained by the spherical aberration in this lens. Parallel rays of light passing through the lens near the center come to focus as expected at the focal length. However, light rays passing through the lens toward the edge focus at a different distance. This can also be seen in the following photo. The center of the lens magnifies as expected, but notice what happens as you move outward. The field become increasingly blurry and lines that should be parallel are not even close (indicating pincushion distortion). Spherical aberration is the largest cause of distortion on this lens but it is not the only cause. Color fringing (noticeable as blue and/or red fringes at high contrast transitions between black and white) from chromatic aberration is also present, and is caused by the fact that for a lens like this the focal length for short wavelengths (blue) is different than for long wavelengths (red). Next lens: Using an achromat to address chromatic aberration. Chromatic aberration can be significantly reduced by using achromatic lenses, which are made by combining a convex lens made of crown glass with a concave lens made of flint glass. Fortunately, inexpensive achromats are readily available. In searching for a large diameter achromat with a focal length between 70 and 90 mm (to give me some buffer beyond the 46.5 mm flange-to-focal-plane distance so that I could insure infinity focus), I found one at (you guessed it) Surplus Shed with a focal length of 75 mm and a diameter of 53.5. This time the specs were correct as advertised. Once again, spherical aberration resulted in soft, "glowing" images when the lens was used wide open (f/ 1.5). As the lens was stopped down, the glow was reduced. Here's a shot at f/ 10. Mechanics: connection to the camera; adjustable focus; adjustable aperture. The mechanics, or plumbing, involved in making lenses tuned out to be every bit as challenging as the optics. Rather than attaching all my lens components together permanently, I opted for a reusable, interchangeable-parts approach. Fortunately, I already had a set of Nikon K rings. One side of the K2 ring mounts to the camera and the other side has a thread that fits 52 mm filters. This 52 mm thread is a convenient standard to use for quickly connecting multiple lenses, spacers, focusers, and diaphragms into a working lens (and then disassembling it for the next experiment). Here is my 75 mm lens along with some aperture rings. Note that the achromat was friction mounted (thanks to a layer of masking tape) to three 58 mm rings that were recycled from some junk filters. A 52 to 58 mm step up ring allows this lens to fit my 52 mm standard. (By the way, I've found two good sources for step-up/step-down rings and cheap filters to make lens mounts: CameraGear.com and KEH.com) Macro: easy for the DIY lens maker. Macro photography is one area where cheap homemade lenses can compete with expensive commercial ones. Generally, for macro photography, you don’t need or want fast lenses. I find I usually use f/ 16 or higher. Even a simple achromat stopped down to f/ 16 can be pretty sharp. Also, adjustable focus, though certainly nice to have, is not a necessity. Precise focus can be attained by adjusting the distance between the camera and the subject. Finally, extreme close up is not a problem. If you want to get closer, just add another spacer or extension tube. The same 75 mm achromat that produced such soft images wide open, produced this shot at f/ 32. Telephoto: also within reach. You may not be able to make a well-corrected 300 mm f/ 2.8 lens, but a decent telephoto lens in the 150 – 300 mm range is quite doable as long as you don't mind staying above f/ 8. Of course, if you consider aberration a "feature" rather than a defect, then single element lenses as fast as f/ 4 are no problem. Telephoto lenses absolutely need some kind of focuser, and an adjustable diaphragm is certainly a nice feature. Fortunately, building a simple lens with a focal length over 150 mm gives you lots of room between the lens and the mount for these items. I "recycled" a helical focuser from an old junk lens, and found an old iris diaphragm for $3 at a local surplus shop. I attached rings from junk filters to both of these so I could use them in my interchangeable system. I attached these items to a 191 mm achromat ($9 from SurplusShed) and I had a working lens. And the results of a quick lens test. Time for multiple element lenses. As much as I was enjoying my simple lenses, I wanted more. My next goal was a fast lens (f/ 2 or better) with a focal length of less than 100 mm, complete with a focuser and variable aperture. Such a lens could be used as the basis for a tilt-shift lens. It was time to investigate multi-element lenses. Starting with two positive lenses (double convex, plano convex, positive meniscus, or positive achromat), what focal length results from the combination? For example, what happens when two lenses with focal lengths of 60 mm are combined? The resulting combination has a focal length of approximately 30 mm or half the focal length of one lens. The general formula to compute the effective focal length of two lenses is: F = (f1 x f2) / (f1 + f2 - d) Another critical factor for DIY lens makers is the distance from the second lens to the focal plane. This is called the back focal length (BFL). If the BFL is too small, there won't be enough room for the diaphragm, focuser and flange-to-focal-plane distance. On the other hand, if the BFL is too large, the lens may be unmanageably long. The BFL is computed via: BFL = (f2 x (d - f1)) / (d - (f1 + f2)) A camera lens made from two positive lenses doesn't really give us a great advantage over a camera lens made from one positive lens. However, there is one small advantage: The space in between the lenses is a convenient place to put the diaphragm. If you work your calculations carefully, you can save a few precious mm of back focus distance. (By the way, some early lens designs such as the Rapid Rectilinear and the Orthoscopic Doublet were made from two positive achromats with a diaphragm in between.) Adding negative lens elements. The truly interesting thing about the equations above is that the values of f1 and f2 do not need to be positive. Combining a negative lens (double concave, plano concave, negative meniscus, or negative achromat) with a positive lens produces a combination with the focal length greater than the positive lens alone. For example: combining a 100 mm positive lens with a –120 mm negative lens with a distance between them of 60 mm produces: F = (100 x –120) / (100 + -120 – 60) F = 150 mm Note that the order of the lenses does not matter in determining the combined focal length. However, it gets much more interesting when we calculate the BFL. In this case the order matters a great deal. BFL (100, -120) = (-120 x (60 – 100)) / (60 – (100 + -120)) BFL (100, -120) = 60 mm BFL (-120, 100) = (100 x (60 – -120)) / (60 – (-120 + 100)) BFL (-120, 100) = 225 mm Hello! So either way we order the lenses we get a focal length of 150 mm, but if we put the positive lens first we get a back focus distance of 60 mm, and if we put the negative lens first we get a back focus distance of 225 mm. This could be quite handy. In fact the first case (positive then negative) is key to making telephoto lenses that are not unmanageably long, and the second case (negative then positive) is key to making short focal length lenses fit the flange-to-focal-plane distance. Armed with this information, it's time to play. With a goal of producing a lens of intermediate focal length (around 100 mm) with a BFL sufficient for a focuser and/or some tilt-shift device, I pieced together a three lens combination based on parts I had on hand. In this case, that meant a negative achromat (-500 mm), a positive achromat (191 mm), an iris diaphragm recycled from a very old Ilex #4 Syncro shutter, and another positive achromat (165 mm). I think Rube Goldberg would be proud. Shorter focal length lenses would have gotten me closer to my goal, however this combination tested out at about 135 mm. The diaphragm allowing me to go from about f/ 2 to f/ 20. The real fun was about to begin because this combination gave me enough room for a tilt-shift "bag" MacGyvered together from black felt, a body cap, a lens back-cap, hot glue and binder clips. It isn't pretty. Now the next challenge: shooting with it. I have a long way to go to master the use of the tilt-shift lens. The effect I am most interested in is the lens tilt that swings the plane of focus so it is no longer parallel to the front of the lens. One obvious result is the ability to take a scene with a number of objects all at equal distance from the camera and, by tilting the lens, place the focus on only one of them. This first test shot was my attempt to do just that. Another tilt effect that I hope to master is the ability to swing the plane of focus such that objects at different distances are sharp. In this shot, the focal plane intersects with a diagonal slice of the table with all other areas out of focus. Next steps: Metering, Autofocus, and Vibration Reduction. Well, maybe I'll leave these for another day. Please give me your feedback. I would very much appreciate any comments, questions, or corrections. There are additional photos of my DIY lenses and photos taken with my DIY lenses on my photostream. Comments or criticisms are always welcome. I hope this was helpful.