How to get rid of defocus node artifacts? When compositing my render with an alpha over node to be able to edit my background and my foreground separately, if I use a defocus node to give my image some DOF, I always run into those weird artifacts that happen at the transition between the &quot;in focus&quot; zone and the &quot;out of focus&quot; one.
Anyone knows how to get rid of that? I'll attach my color ramped mist pass and the result.

The mist pass:

The result with artifacts:
For best quality with the Defocus node, uncheck the &quot;Preview&quot; radio button.This will calculate slower, but give much better results.
Also, if you use the Depth buffer, the Defocus node can automatically use the Focus Distance of the active camera in the selected scene to calculate the blur.
See Blender's manual.