Depth of field (Defocus-Filter) on particles without background

Hey guys,

i have got some particles and what i wanna do is applying a depth of field to this particles. So i chose a point in the middle of the mesh as my focus and set up the nodes like this:


But what i get is this:


The middle which should be in focus is blurred out, too.
It seems like the halos doesn’t influence the Z-buffer. Can i somehow change this, so that the halos are recognized in the Z-buffer? I tested it with those particles rendered as objects and it works well then, but it takes ages to render it like that.

Hopefully somebody can help me :slight_smile:

greetz Sphere :wink:

Unless things have changed since I last tried (on 2.4, so it’s possible) I believe that “halo” materials do not provide z values when rendered — and as such, your z values are being pulled from the background. Without the plane, everything is defaulting to max distance.

Would it be possible to use icospheres or some other simple shape as your particles?

Thx for replying, of course, you’re right. You just answered when i edited my text :smiley: . Seems like i really have to use some spheres or whatever, although i’m quite unsatisfied with it due to the long rendertime (we are talking about 250000 particles^^).

It dosn’t workl like that you have to use in camera depth of field! :smiley:

Errm I do use the depth of field in the camera settings with the focus in the middle of the object. But the problem is that those halos appear to not provide Z-values like picano said.

Particles aren’t affected by z depth sadly. Only solution would be fake focus that is a blur based on a gradient map. You need to fake the z value into the blur node.