2
$\begingroup$

I'm trying to get DOF in Compositing from an OpenEXR image with Combined/Alpha/Mist passes. This is the combined pass:

enter image description here

I can get DOF by a defocus node using the Mist pass (after a ColorRamp to define better), but I can't set which part of the image is focused and unfocused. (I want the character with the knife to be focused, and not the other character).

enter image description here

If I invert the Mist image I can achieve this but the borders aren't unfocused:

enter image description here

Is there any better way to achieve this? FYI I have an alpha passenter image description here

Thank you!

$\endgroup$
0
$\begingroup$

You can try inserting an add node between the mist pass and the color ramp, to "offset" the focused value. Tweaking the values, positive or negative, you should be able to set the knife pixels as focused and the rest unfocused. If you can post an image of your mist pass i can be more accurate on the answer.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.