Anamorphic Bokeh

Cycles allows for photo-realistic rendering. Part of the realism comes from the simulation of photography parameters, such as lens, aperture size, and depth of field. When simulating anamorphic lens, there is something Cycles still miss which is anamorphic bokeh.

Anamorphic Bokeh Perspective Test

Anamorphic Bokeh Perspective Test

Generally speaking “bokeh” is the shape we see from far away blurred light sources. It’s more evident in night shots. When working with anamorphic lens (or when simulating them in Cycles) it’s important to stretch the bokeh according to the simulated lens.

Anamorphic Bokeh Fisheye Test

Anamorphic Bokeh Fisheye Test

In a normal close up scene the effect is subtle but gives an extra cinematographic effect. Compare this test-render from the Gooseberry Open Movie. From top to bottom we have a fisheye render, a fisheye render with anamorphic bokeh of 2.0, and fisheye render with anamorphic bokeh of 3.0:

Frank Fisheye Regular Bokeh

Frank Fisheye Regular Bokeh

Frank Fisheye Anamorphic Bokeh 2.0

Frank Fisheye Anamorphic Bokeh 2.0

Frank Fisheye Anamorphic Bokeh 3.0

Frank Fisheye Anamorphic Bokeh 3.0

Too subtle? Click on the images for a zoom-up version or look closely at the animated comparison:

Anamorphic Bokeh Franck Test

Anamorphic Bokeh Frank Test

Another shot, now with 1.0 (normal bokeh), 2.0, 3.0 and 10.0.

Frank Bokeh 1.0 Fisheye

Frank Bokeh 1.0 Fisheye

Frank Anamorphic Bokeh 2.0 Fisheye

Frank Anamorphic Bokeh 2.0 Fisheye

Frank Anamorphic Bokeh 3.0 Fisheye

Frank Anamorphic Bokeh 3.0 Fisheye

Frank Anamorphic Bokeh 10.0 Fisheye

Frank Anamorphic Bokeh 10.0 Fisheye

In cinema we often see works done with bokeh 1.33, 1.5 or for old movies 2.0. Nothing stops us from simulating other values as we demonstrated here.

Frank Anamorphic Bokeh Fisheye - Animated

Frank Anamorphic Bokeh Fisheye – Animated

This feature is aimed at Blender 2.72, so stay tuned and prepare your night shots. A special thank you for Aldo Zang for the help with the math part of the patch. Test scenes and feature request by Mathieu Auvrey.

Cheers,
Dalai Felinto

Update: The patch is currently for review [here].

The Future of Overrides
This Summer’s Sculpt Mode Refactor
Geometry Nodes Workshop: October 2024
New Brush Thumbnails

18 comments
  1. I am bringing this back from the dead! I am confused on how to implement this in newer versions of blender like 2.9. I can change the ratio which technically squeezes the image correctly, but i do not see any of the beautiful radial bokeh thats happening in the 3.0 or 10.0 examples in my renders. How do i work with this method?

  2. Hi Dalai, you should add an update at the top saying this is now in Blender as “Ratio”. It took me a while to figure it out.
    Thanks for this awesome feature, let’s make Wall-E in Blender ! (because I think that’s the first time anamorphic bokeh was introduced)

  3. We could already thinking of other types of lenses instead of just the fisheye.
    http://www.eoshd.com/wp-content/uploads/2011/08/bokeh-filter.jpg

  4. Here there is an article about photography which explains what an anamorphic lens is. It helps me to understand this. Basically it changes the bokeh shape and gets a shallower depth of field.

    http://www.red.com/learn/red-101/anamorphic-lenses

    I think it is a great improvement.

  5. Great job! It’d be cool to see other types of lens simulation tools in the future, such as on lens grime using some input texture, bokeh diffraction, onion ring bokeh, etc.

  6. So strange

  7. I’ll definitely be keeping an eye on this. It’s been on my mind’s wishlist for a long time now.

    Cheers, Dalai.

    – Reyn

  8. I am still confused.

    What you are explaining must have something to do with computer graphics and the way Blender and such applications render optical distortion in a lens. Because I don’t get it. In the real world, optical distortion is not so much caused by the size of the sensor, or the film stock, but mostly is due the magnification qualities of the lens.

    What do you mean by a smaller lens? Do you you mean smaller a focal length?

    What do you mean by full frame fisheye?

    • Hi G. Cline, I hope I can clarify.

      What Dalai means is that on a real camera, a larger sensor makes the ‘fisheye’ (distortion) effect more visible. An 8mm fisheye lens on a 35mm full frame camera is 8mm, probably with heavy distortion and possibly without the projected image from the lens covering the entire frame of the camera. If you put that same lens on a APS-C camera, you would have the equivalent of 12mm focal length.

      The reason why typical fisheye distortion isnt overly visible in the sheep examples is that; the camera is more or less level with the horizon, the more up or down the more visible the distortion, the background doesnt have many straight lines for recognition of distortion, the only recognisable object in the picture (the sheep) is in the very center of frame where the least distortion is .

      Oh and @TOM TELOS , the anamorphic effect is very visible in the sheep renders in the way the blur towards the outside of the frame looks rotated.

  9. Now, when will we have a decent blur/bokeh filter node in the compositor…

    Maybe when we’ll have a decent Z-buffer.

    Otherwise great!

  10. Boy, is my grammar bad.

    What I meant by a harder focus is that background should be slightly blurry, not real blurry as you have it. I was wondering why it was so blurry.

    The other thing I forgot to mention is that fisheye lenses tend to cause quite of bit of optical distortion; in other words, the image starts to bend in on itself. I didn’t see any of that. But now that I realize you are using a focal length of 24mm, I don’t think there would be a lot of distortion. From what I understand, fisheye lenses are the wider angle lenses that run from 10mm to 6mm.

    • Ah alright, this background is a single HDR light probe for quick testing/lighting. That’s part of the reason you don’t have a more varied depth in the background.

      As for the fisheye (awesome) distortions they are more noticeable when the sensor is larger, or the lens is ‘smaller’. You can get the classic full circle fisheye, a fullframe fisheye or the example above which is a small fraction of a sensor fisheye. Two shots using the same equisolid fisheye lens will still differ considerably if you use different sensor sizes.

  11. The meaning of bokeh is well illustrated in the first two images,
    but in the sheep images, what I see is slight differences in depth-of-field blur:
    the higher the bokeh parameter, the less blur in the background.

    Personally, I prefer backgrounds in focus
    —camera simulations be damned—
    because I want the maximum amount of information into my conscience ,
    and (I think we can all agree), if you were at the scene,
    your eyes could perfectly well focus the background and take it all in!

  12. I’m liking it a lot, it will have tons of uses in vfx. How is it implemented? Is it just a setting in the camera properties?

    • It’s a setting just under the aperture blades. You can even animate it. I’ll post a patch to the tracker soon.

  13. I’m confused.

    Why is the background out of focus? If you are using a fisheye lens, which I assume is would be less than 8mm, and your t-stop outside is now less than 5.6, than why is the background out of focus? Even if it was out of focus, would it not the focus be a little harder?

    • Good point. This render is actually using a 24 mm fisheye lens, like those you can find at … I don’t know, nowhere? ;) Same goes for the anamorphic factor, the default is 1.0, the soft limits are 1.0 ~ 2.0. But the hard limits are from 0.1 to very high.

      It’s a matter of allowing for photo-realistic simulations while giving some artistic freedom to be used carefully. The anamorphic bokeh should be used with perspective cameras mostly, but Mathieu really likes the look of the fisheye lens, so I implemented it for that case as well.

      • It looks sweet. As a cinematographer by trade this would make for very interesting looks!

In order to prevent spam, comments are closed 7 days after the post is published.
Feel free to continue the conversation on the forums.