[DUPLICATE] Depth of field image effect focus on transform broken ?

Hi everyone,

I got a strange issue with the Focus on Transform feature on the Depth Of Field Image Effect.

My camera is set as a child of an Empty for conveignance ( I got an animation to be played on multiple cameras, so all cameras are set to child of the Empty, and the Empty do the animation ). I want the camera with the Depth Of Field script to focus another Empty I’ve put somewhere in the scene. However, it doesn’t focus on the Transform position at all. If I want it to focus, let say, the origin ( 0, 0, 0 ), I need to put the Empty used for focus at ( 0, 0, 100 ). I still have not managed were I should put the Empty for focus to have the camera focusing at the right location.

I got the same problem in another scene. I need the camera to focus some objects at ( 0, 0, 10 ). Putting an Empty for focus here worked fine, until I switched the material of the object to the refractive glass one given in the standard assets. Then I had to put the Empty for focus at ( 0, 0, 25 ) to have the Depth Of Field focusing correctly.

It seems that the Focus on Transform works great for standard shader, but when you use a shader set to “Transparent” rendering or a refractive shader, the Focus on Transform doesn’t work as expected.

I hope someone have a solution, or at least have the same problem.

Thanks for reading me :slight_smile:

1 Like

How did not I have found that thread ? I’ve searched with the search toolbar. So well, nevermind about my post, I’ll check if there is a way to delete it, as it’s a duplicate from another thread. Thanks for your help :slight_smile:

It seems you already have your answer! :slight_smile:

I have to admit that the search toolbar isn’t that efficient…