Bokeh control

I’m trying to generate bokeh content for compositing in Photoshop. I’ve tried several techniques using cycles and narrow depth of field on the camera… Have tried shaped objects (particles near the camera with large camera aperture). Diffraction planes close to camera, and several other techniques, but not getting what I’m really looking for.

I’m assuming there is no way to add a texture to the camera itself? The patters that I’m looking for in real bokeh are a product of the lens fabrication and physics of course, but there is no way to simulate that in the Blender camera as far as I can tell. Any ideas for bokeh simulation is appreciated. I would also like to introduce chromatic dispersion into the camera, but that’s another story.

This is an example of what I am looking for.

Note the repetitive pattern seen in each of the bokeh lights.

somethign like this? –

example blend file here –

Yes, that’s beginning to get there, and thanks for the example file; that’s certainly one of the techniques I’ve tried.

I think what it really requires is some base level modifications of the blender camera allowing more adjusting/distortion of the incoming light – as if there was a real lens with physical characteristics.

Unfortunately I don’t have the required programing skills. I don’t think it would be overly difficult modifications though. My first idea was the addition of a texture to the camera that could introduce patterned diffraction but that had a ‘focus’ adjustment so that you could dial in how much it would be affected by the depth of field. Light caustics in the lens can appear to be in-focus, especially seen in older lenses. Being a photographer, what I’ve really been trying to simulate is more realistic lens distortions, or at least finer control.

You can see some of my mixed Blender artwork here:

Here’s another example, from a Zeiss lens I think.

The add-on below can be helpful to you:

Thanks Fatesailor! I will check that out…

from the reference images that you post I think you can try something with the node editor,
There is a bokeh blur node that can take an image as the bokeh pattern.
I think it will be a bit too much with the second picture, but the first one seems doable.
There is also in input -> Bokeh image, that can generate bokeh pattern, you’ll need to tweak them if you want a more realistic result, but that can be a good start.

I’ll cheat and try to take a bokeh pattern form a picture.