Cat's Eye / Petzval bokeh effect

Hi there,

I was wondering if it was possible to create a cat’s eye bokeh like this one

But there isn’t many ways to approach it in Cycles, so I ended modeling the elements of a Petzval lens. I think I managed to get it correct (quite easily actually, just following a patent), I’m getting nice distortion looking through that lens, but I’m unfortunately not getting any cat’s eye shape (not even talking about the bokeh sharpe edge).

I know there are many scientists here, so if you have any idea how to achieve this, I am super interested! :slight_smile:

Attachments




I continued my tests adding the lens casing and the lens hood, also playing with refraction indexes, but no luck so far.

To model this effect you should first try to find out, what causes it. Personally I would guess that the cookie cutter effect on bokeh rings is due to the outer edge of lens case partially obscuring light from some main lens element. The more towards the edge of image plane, the more it obscures and bokeh rings have more incut.

I agree, that’s why I’m continuing modeling the lens. The good thing with the Petzval is that it is a pretty simple lens. I’ll switch to LuxRender also to make sure that I’m getting more accurate light dispersion.
I wish I had that petzval lens to actually try to recreate a photo from it, for instance I don’t know how to approach the blender camera focal length, as it renders through another lens, except but just eye balling it.

Another thing I will try is to replicate it in compositing.

mike pan’s tut for custom bokeh

Blender Cycles custom bokeh tutorial from Mateusz Waluś (5 years ago)

with some Lens Distortion in post… could help

Thanks burnin, I know this technique already, and this is not enough to create a Cat’s Eye effect. Vray has a setting for that (optical vignetting), but I still feel like it’s not there. It distorts the bokeh but doesn’t give this sharp cat’s eye shape.
I have an idea of how to do it in post, but I’d like to avoid 2d DOF at all cost :slight_smile:

There was a patch which adds the ability to use a custom shape for bokeh:
https://developer.blender.org/D1691
Unfortunately it was not implemented.

That’s sad indeed. Still not enough to create a cat’s eye bokeh anyway, I want to get the real deal :smiley:

Lens distortion node under the compositor? Not sure of the exact setting, so it’ll take some playing with. If not that, changing camera to panoramic also gives some fisheye options.

By the way the ref pic looks like it’s just bokeh + a rather strong barrel distortion. I’m not sure if there’s much more to it.