Louis du Mont covers a process for creating a custom bokeh for cycles.
Blur and focus are both essential elements to consider when rendering. Most 3D applications and render engines will let you create a bokeh effect, while some will even allow you to create a custom one. Check out this new tutorial from digital artist and animator Louis du Mont who shows how to create a custom bokeh effect in Blender 2.8.
Du Mont uses image transparency maps to create a custom bokeh shape which gives character to the elements that are not in focus. On a real-life camera, the form is a result of the aperture blades. We can simulate this in 3D renders by creating a custom shape for the virtual camera.
Any type of blur effect will lengthen render times, which is why there are lots of solutions out there that will allow you to create the effect in post/compositing. One of those tools is a free Fast Bokeh plugin for Adobe After Effects from Rowbyte.