WIP! My 2nd OpenSCAD file ever! Expect a lot of changes to happen.
This attempts to create a hood for any lens out there. Well, at least one I can get my hands on.
There are three hood types you can choose from.
1) Petal hood. It has cut outs made around the barrel of the hood.
2) Barrel hood. No cutouts.
3) Cine / cheapo matte box. It will project out a box beyond the confines of the barrel.
There are various lens manufacturer bayonets listed. I'll be adding more as time goes, but the Canon one works pretty well so it's time to publish.
0) Friction fit. The universal one.
1) Canon. This one works pretty well. At least it did with my 24-70mm F2.8L, 17-40mm F4L, and 17-85mm IS USM.
2) Sigma. I'm still messing with this one.
3) Nikon. TBD. I haven't measured and tested it with the lens I have.
The formula used for Angle Of View (AOV) is
Unfortunately, lenses and optics are filled with mystical unicorns and are incomprehensible to me.
So, I added in a way to move the AOV generated features in the Fudge Factor tab.
The one that "should" get the most use is the Bayonet_Hood_Distance. On my Canon 17-40mm F4, -41.5 looked really promising. On my Sigma 70-200mm F2.8, it was more like -150.
The Angle_of_view_Fudge value is there for you to play with. However, a 0 value is probably just fine as the problem isn't so much the shape of the feature, but how big the feature is. Not sure that makes sense... Again, voodoo.
My random babblings consolidated here.
Before you do anything, print out just the bayonet and make sure that part fits your lens. There's no point in printing out this big monster hood and it not even fitting. To do that, simply select a hood length of 0, and a Bayonet_Hood_Distance of 0. If that doesn't fit, then proceed onto the specs for the relevant bayonet.
Once the bayonet fits, go and dig up a picture of the hood you want to make. That'll give you a good idea of what your custom version should look like. You'll obviously not get a mirror image, but it'll give you an idea of what values you should select.
Again, this is like black magic, so you should print a test or two to make sure you aren't vignetting and/or the hood is visible in the image.
Be aware that just because you can't see the hood in your viewfinder, it doesn't mean you won't see it in the final image. Read more about that here luminous-landscape.com
For APS-C/cropped sensor users, this is where things get interesting. I shoot with both Full Frame and Cropped Sensor bodies. Hoods for Full Frame lenses are made for Full Frame bodies. But, now you can make a hood that covers your Full Frame Lens much better on your Cropped Sensor body. Design up the hood like you're going to do so for a Full Frame body, and then enter the crop factor. Boom, custom hood just for you.
Why do I keep saying black magic? Read more about it at www.pointsinfocus.com Rambling follows. The focal length is the distance from the sensor to the center of an "Infinitely thin" lens. But my Canon 17-40mm F4 is 85mm long. That doesn't mean that the inflection point of the image is at the front element. Nor does it mean that it's at the rear element. It's wherever the lens designers put it. Which only they would know... And it shifts if the lens breathes when focusing... black magic... I crudely measured mine out using a drafting square and a ruler and found the inflection point was somewhere around 40mm or so. But 40mm is larger than 17mm... brain hurts.
It probably goes without saying, but you'll want to use a very opaque filament when you go for your final print.
- It's probably a good idea to flock in the interior surfaces with felt flocking material if you're super serious. However, these days even the Canon L lens hoods aren't all felt flocked.