Save 40% On inPixio Photo Studio 12 - Now 29.99

Bokeh simulator and depth of field calculator

Bemko 7 3 Poland
18 Aug 2014 7:18PM
Hello everyone!
I know that there are many depth of field calculators available online, but nearly none of them offers background blur calculation. Actually, many people looking for a shallow DOF are in fact interested in getting strong background blur because it is the effect that gives our photos "that" look. There are some camera/lens simulators that allow to see the effects of different focal length/aperture combinations on real photos, but the range of parameters is rather limited. DOF calculators have also another drawback - they show just raw numbers. It is difficult to get an idea what frame will a 100mm lens produce on a full frame body at 3 meters subject distance. The DOF value of 15cm at f/2.8 is also not very helpful in determining the final image appearance.

Considering all these problems I created an interactive web page that is not only a depth of field calculator, but also a lens and background blur (bokeh) simulator. It can be found at: You can set any reasonable combination of sensor size, focal length, aperture and distance to the subject/background and see the resulting image with appropriate framing and background blur. Adding settings to a list allows to directly compare any number of combinations of parameters by simply switching between them.


In addition to standard DOF calculations it offers also:
- ability to choose different CoC (circle of confusion) depending on print/digital image size
- hyperfocal distance calculation
- diffraction effects calculation
- creating links to current settings to share with others through e-mail/forum/social network
- unique "lock frame" feature that allows you to see how the DOF and bokeh change when zooming, but with constant subject size

The simulator uses modern web technologies: HTML5, CSS3 and JavaScript with AngularJS framework, so you don't need any browser plugins to run it. You can even download an offline version of the application and run it directly from your hard drive. There is also a mobile version with interface better suited for small screens.

Hope you like my work. Any feedback, bug reports and sugesstions/ideas are very welcome.
Sooty_1 11 1.5k 221 United Kingdom
18 Aug 2014 11:47PM
The main shortcoming is that different lenses render out of focus detail differently.
It might give you an idea of what's in and out of focus, but as for the quality and rendering of the blur, it's too simplistic and couldn't hope to simulate the characteristics of the multitude of lenses, even those in common use. Plus, zooms can even change their rendering from one end of the zoom to the other as the relationships of the lens elements change.

Chris_L 8 5.5k United Kingdom
19 Aug 2014 4:34AM
I like the way the image changes as you drag the slider. Some of the SLR simulators do a reasonable job of this but don't preview the shot.

I think it's a great teaching tool.
Bemko 7 3 Poland
18 Sep 2014 7:26PM
I have released a new version of the simulator that introduces a very cool new feature. I have implemented a realistic simulation of different types of bokeh (lens blur simulation). The effect is really nice, quite close to reality as for a simulation. There are 10 types of bokeh available: from pleasant, soft blur, through typical disks to catadioptric lens effect + 5 polygonal diaphragms. Bellow you can see a small sample of the abilities of the algorithm. The first picture shows the old blur method (still used as default), the rest present the new function (cliking on the image shows bigger version).


Link to parameters from the image above.

The new algorithm is also more precise than the former way of bluring the image. Unfortunately processing requires longer calculations and it cannot work in real time. Instead, processing is done on demand or with a small delay after setting parametres in the auto mode. In order to activate this function you need to check the "Bokeh simulation" field located above the simulated image.

The second new feature, which is a minor addition, allows to lock the distance between the model and the background. It reflects a situation when the photographer is moving while the model is stationary.

I have also decided to get more social, so a facebook page is now available: [URL=][/URL] Like it and subscribe to get notified instantly about new features in the future!
mikehit 12 8.0k 13 United Kingdom
18 Sep 2014 8:02PM

Quote:There are 10 types of bokeh available:

Have you compared the outputs against actual lens design (for example a 6-blade diaphragm against your 6-blade simulation)? It would be interesting because bokeh is also influenced by the optics and two lenses with the same 6-blade diaphragm can have different bokeh.
But I would be interested to know if you like the 'pleasant' bokeh (whatever that is) how do you know relate that to lens choice?
Bemko 7 3 Poland
18 Sep 2014 9:02PM
I mainly based on this page when researching the topic: Of course there are more subtle differences among real lenses, but their effect would be negligible in a simulation. You probably noticed that for example the difference between good and neutral bokeh is not very obvious in a picture. When the lens is stopped down, the aberrations are weaker and as a result the differences start to dissapear even more. Additionally most contemporary lenses have rounded blades, so the polygonal diaphraghms just do not apply to them. That's why I decided on 5 main bokeh types + 5 diaphragms without further distinctions. They are enough to get the idea about the effects tah can be produced by different lenses.
Well, I suppose that lenses like the Nikkor 105 f/2 DC can come close to the "excellent" bokeh if used properly, but in fact it is just a theoretical, best possible bokeh at all.
Bemko 7 3 Poland
30 Apr 2015 8:27PM
Recent huge peak in visits caused by reddit, Peta Pixel and No Film School (28000 visits in one day!) has motivated me to work harded on the application. This resulted in a large update that has been published today.

The most important new feature is a full-fledged depth of field simulation on the model - it is not flat anymore, so also nose, ears and face are blurred according to the calculated depth of field. Close-up distortions are simulated as well. There are also some new models that now differ in height. Here you can see how it works:
Link to animated gif version
Other new features include list of cameras to choose from, DOF preview zoom, Video 16:9 mode, shorter links and more. Full list of improvements is provided in the changelog.

There is also a free Android version available for download in the Google Play store:

Sign In

You must be a member to leave a comment.

ePHOTOzine, the web's friendliest photography community.

Join For Free

Upload photos, chat with photographers, win prizes and much more.