# How to create Bokeh circles?

How can I render bokeh circles?

Nothing I do seems to work.

I tried using an empty as the focus point for a cube, with some point lamps in the background with about 2000 strength, but it doesn't work. It just makes everything blurry.

I also raised the blades to 4/5/6/12, and it doesn't make a difference.

I'm using Blender 2.74.

## 2 Answers

Lamps are not visible to the camera directly, and hence cannot directly make pretty bokeh shapes. To make a directly visible light source, you'll want to use a mesh light.

To do this, add an emission shader to a mesh object:

And now you should be able to get some bokeh:

# Creating the bokeh object:

For creating a sharp bokeh, a small and bright object is ideal (here I used an emission strength of 20):

click images for better quality

For creating a blurry bokeh, use a larger object (here I used an emission strength of 1):

The size of the bokeh depends on the size of the aperture and the distance from the camera to the object.

# Adjusting the camera

It sounds like you have set up the camera already, but for completeness here are some settings to keep in mind:

Set the aperture size to be fairly large in order to get a shallow depth of field. When setting the aperture size directly in terms of it's radius in BU, larger values mean a larger aperture. A value of 1 is really big (1 BU = 1 meter), you'll likely want something not much bigger than .1.

You can also set the aperture size in terms of f-stops, in which case smaller values mean a larger aperture. This is mainly useful when you have a particular look you want to replicate (e.g. from a photograph), or if you're just more familiar with f-numbers.

The number of Blades in the aperture controls the number of sides on the bokeh. Values below three will make the bokeh circular. The Rotation setting rotates the aperture. This is useful for making the bokeh less straight and perfect looking.

For example, with 7 blades an little rotation:

Setting the Ratio to a value besides 1 will stretch the bokeh, simulating an anamorphic lens:

And of course you'll want to set the Focus. I usually set an empty as the focus object:

But you can also set the Distance by clicking in the 3D view:

1. Press E while hovering over the slider.
2. Click ( LMB) on the surface you want to focus on.

# The viewport

The Viewport F-stop is used to set the size of the viewport aperture for approximating DoF real-time in the viewport. Note that this approximation is only active while in camera view (Numpad 0) with Depth of Field enabled in 3D view > Properties (N) > Shading:

One thing you might have noticed, is that the cycles aperture and the viewport aperture give very different results.

This is because the viewport DOF is not as accurate as the cycles DOF.

To solve this issue, in Blender 2.75, there will be a new high quality checkbox for the viewport, that gives a more accurate approximation of dof.

When enabled using the same settings, it looks like this

• viewport apertures give pretty different results [...] - in 2.75 there is a new 'high quality' checkbox which solves this issue. – p2or Jun 23 '15 at 13:40
• @poor I just added that. – TARDIS Maker Jun 23 '15 at 16:40
• @TARDISMaker Thanks for the addition, thats great news :D – gandalf3 Jun 23 '15 at 17:24
• how did you multiply all the bokeh objects, did you use a particular system? – MicroMachine Oct 19 '16 at 5:34
• @fabriced Just a particle system. The planes visible above the scene are configured to "rain" emissive Suzannes – gandalf3 Oct 19 '16 at 15:18

Your issue, is that you're trying to get bokeh circles using point lights. Point lights don't directly appear in the render, but appear indirectly because they cast light onto other objects. This means that they won't produce bokeh.

Instead, you should set it up using small, bright, objects. I like to use icospheres.

Here's an example I put together to help you understand how bokeh can be achieved in Blender.

To achieve this result, I created a scene with a camera and an empty assigned to be the focus point and I set the radius to .5.

You can also play around with the blades setting. Usually you want circular bokeh, but sometimes it's better to have hexagonal, octogonal, etc. shaped bokeh.

Then I created an icosphere and gave it a bright emission material.

I then duplicated it across the scene to give a more interesting effect.

• Also play around with the blades parameter to get polygonal bokeh shapes. – Samir Rahamtalla Jun 23 '15 at 7:20
• Since you bring it up, I'll add it. – TARDIS Maker Jun 23 '15 at 7:25