Problem with depth of field effect

I was trying to recreate an issue I saw in someone else’s render when a separate issue popped up, as you can see in the attached render.

I can tell what’s happening - the difference between the two Z values is throwing off the defocus node. Is there a way to fix it, though?


I have noticed this as well. I just assumed it is another broken thing in Blender.

Encountered and noted by me as well, I think I can understand generally why it’s having the problem, but do not see a way to easily fix the issue, and haven’t yet needed the effect badly enough to spend very much time testing a work around for it myself. I would love to hear a work around or fix if anybody knows one though.

I have an idea that might work for a reimplementation of the defocus node, but as my programming skills are very limited, I wouldn’t be able to rewrite it myself.

Basically, my idea involves applying the defocus effect in passes, starting from the “back” and working toward the “front”. This way, if it encounters an out of focus object in the foreground, the defocus can bleed over into the in-focus elements which the effect has already been applied to.

Just an idea, though. I don’t know enough about how Blender or its node system work to be able to judge if it would even work the way I’m thinking it would.

First off, I’m by no means a programmer, so this is all conjecture and made up terms in the areas I lack formal knowledge, I ask that those who know better forgive and/or correct me.

I believe that nodes do not have access to the actual render time sequence of things and so are really just a bunch of post production filters. With that being so, the problem isn’t that foreground objects can’t bleed over farther back ones, but the exact opposite is the problem. Meaning that the background object isn’t rendered enough to show behind the foreground when that is blurred.
I suppose the best/only way to work around this would be to render the background objects on a separate layer so they get rendered more completely, and then composting the blurred foreground on top of that.

anyways, that’s the problem as I understand it, and the workaround I thought of, but I as I said, I haven’t tested to see if that composite trick would be easily pulled off.

Haven’t read all the replies, sorry… have you already tried to change the threshold?

Buy everything at wholesale price only over USD50(wholesale price total).www.karrylady.com