My question is similar to this question: Can blender be used for simple optical modeling? . I apologize for asking a similar question but I don't have enough reputation to comment on the original question.

Like in the original question I would like to view a scene through a modeled lens. What I want to archive in the end is "real" out-of-focus blur (I am aware that one can play with the blur-nodes of the build-in blender cam, but I want to see the blur as generated by my specific lens)

As suggested by Liss' answer to the original question, I set up my scene using Luxrender as renderer as follows: (the answer contained guidelines, the specific details are my guesses of how to exactly set it up)

  • created a simple lens (intersecting two smooth UV-Spheres, luxrender material glass or glass2 with IOR=1.41)
  • created a translucent plane (alpha 0.01) to act as film

  • set blendercam to orthogonal and placed behind film

  • as a test-object to be viewed through the lens I set a cube with a checkerboard pattern (to detect blurry lines when out of focus)

However when rendering the cube (or film) at distances to the lens where the cube should clearly be out-of-focus I still get a pretty sharp image.

From what I had understood Luxrender is very physically accurate so that tracing rays through a lens should result in blur. Is this correct? And if so, what am I missing to achieve the blur?

  • $\begingroup$ Did you find a solution to this? $\endgroup$
    – avector
    Commented Nov 10, 2014 at 14:47

2 Answers 2


Blender Cycles is decent at rendering some optical effects.

This is an example of Total-Internal-Refraction simulation. This is done by placing a light source close to one end of some tubes set to a +IOR.

enter image description here Source File for Fiber Optics

This is an example of (heart) shaped bokeh by placing a cutout in front of the Blender camera. (There is no lens simulation)

enter image description here

Source File for Shaped Bokeh


My first approach would be to attempt to match the camera in blender. If your camera is part of the presets in blender I would try that first. If you need more accuracy have a look at this. It's a bit old so I'm not sure it will work still but worth a look.

If that approach doesn't work/isn't accurate enough I think you are missing out some parts that are vital in a physical camera that cause DOF (Depth of Field). Understand why DOF occurs in physical cameras in order to emulate it in blender, read this/google how camera lenses and apertures work. The main thing you are missing is the aperture.

There is a chance that the way LuxRender works won't cause this type of blur but I would have thought, as you do, that it should.

  • $\begingroup$ A.vector, thank you for your answer. However, I'm interested in the actual optical effects of my lens, not only in the perspective (your first link is about matching perspective to real world cameras and "it does not give Blender a complete optical lens simulation" ). Also, while aperture does influence the DOF, a larger aperture results in a shallower DOF --> no aperture ~= very large aperture -> objects at closer distances to focal plane are blurred. So a missing aperture can't be it. $\endgroup$
    – 129
    Commented Nov 4, 2014 at 8:17
  • $\begingroup$ @129 Good point, fair enough. $\endgroup$
    – avector
    Commented Nov 4, 2014 at 13:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .