3 ms·
So most lens design software I've seen is optimized for a "scientific instrument" workflow - optimizing for sharpness across spectrum and angle. Is there softw
by Scene_Cast2 5y ago
So most lens design software I've seen is optimized for a "scientific instrument" workflow - optimizing for sharpness across spectrum and angle.
Is there software that helps with artistic lens design?
- paulmd 5y ago"perfect" optical performance is something that you can mathematically express, while whether an abberation is "pleasing" depends on the person and the scene it's used on. There is no mathematical formula that says a Petzval portrait looks nice and many people would say they don't. I think the three easiest factors in a "pleasing" image are spherical abberation, apodization, and field curvature. Spherical abberation is what makes a soft-focus lens soft, and a slight amount of spherical abberation is responsible for the famous "Leica glow". People generally find at least a small amount of this abberation to be pleasing. "Bokeh" is the rendering of the out-of-focus areas of an image, and it's the combination of a number of optical factors. Highlights in the bokeh area will take on the shape of the aperture. Crudely, if you cut a dick shaped hole in a piece of paper, then tape it over your lens, you will have dick-shaped highlights. Apodization basically is the idea that if instead of a hard aperture, you use a neutral-density filter that gets darker at the edges, then your bokeh won't have hard edges, it'll have a gradient. STF lenses use a separate aperture with one of these gradient filters to alter the edges of the bokeh so it's smooth. Other abberations also manifest in the bokeh - uncorrected sagittal field curvature will result in the "swirlies" of a Petzval lens, and spherical abberation likely helps smooth out the bokeh a bit as well. if your software gives you metrics for these optical abberations... that would be a good place to start. tbh someone else mentioned Lytro and this is something they would have been good at. Take an "accurate" lightfield image and you could reproject it as if it had come through a different (not accurate) lens. From what I know the resolution on Lytros was never that great, but maybe you could do something similar with a custom Reshade filter in video games, change the rendering characteristics of a game in accordance with the optical characteristics of some lens. Perhaps raytracing might be useful to model the exact optical behavior of the rays inside the lens in realtime... (what software are you using btw? anything available for free / at a semi reasonable cost? I've always thought it would be interesting to try single-point-turning custom elements and building my own custom lenses... completely absurd idea but neat to think about.)
- ryandamm 5y agoRe: Lytro, I gave them that precise advice back in ~2008, and I believe they had already talked about it. Nearly 10 years later, their cinema camera boasted 'lens emulation' but I'm not personally convinced it emulated bokeh digitally, despite the whizz-bang stage demos. Sadly, you need to have significantly higher light field resolution to do an 'acceptable' job of approximating lens aberrations, and in the end it probably wouldn't look better than a 2D filter approximating it. Nonetheless I like the idea.
- Scene_Cast2 5y agoHey, thanks for the info. I was looking at https://github.com/quartiq/rayopt https://github.com/quartiq/rayopt (found on HN) earlier. (Check out https://github.com/quartiq/rayopt-notebooks https://github.com/quartiq/rayopt-notebooks for examples.) I've also tinkered a bit with Lytro files; they have maybe 8 "angle" samples per "pixel" - not quite enough to do much. My idea was to try to use something like a privacy filter (blocks some angles of light) inside a lens for the purpose of having a nonlinear bokeh falloff. One of the issues with using something like F1.2 for a portrait is that while the background will be nice and blurry, so will the ear and the nose if you focus on the eyes. But if you're able to set up a "smart aperture" that filters out rays that are just out of focus, and keep the ones that are either perfectly in focus or way out of focus, you'd get a really blurry background while keeping the depth of field workable.
- paulmd 5y agoif you just want to achieve non-linear falloff (that's apodization) then all you need to do is the graduated-density filter I mentioned, with darker edges and a clear center. In principle you could probably expose a negative or laser-print a transparency to your specifications. (laser-printing a negative for direct contact printing is kind of a fun process in general!) the idea of using a polarizing filter (privacy filter) is kind of an interesting one, can't really picture in my head whether or not that would work. I think the answer might be that yes it would probably change the bokeh, but it might also result in uneven illumination across the image or weird color shifts? it would be neat to see what happens though. possibly also of interest: https://en.wikipedia.org/wiki/Photon_sieve https://en.wikipedia.org/wiki/Photon_sieve