Is there software that helps with artistic lens design?
Is there software that helps with artistic lens design?
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.)
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.
I was looking at https://github.com/quartiq/rayopt (found on HN) earlier. (Check out 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.
(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