Mirrors and Camera Focus (Iray)
surody
Posts: 261
Let's say I have a person in front of a mirror with like 1 meter distance. When I set the camera to focus on the mirror, the person is blurred because the mirror image shown in the mirror is displayed with the focus outside the mirror. Usually you would expect that if the mirror is focused nothing should be blurred what's shown on the mirror. Is this some Iray issue?

Comments
Check the camera you are rendering through hasn't got DOF set.
If you want the mirrored image to be in focus, try adding 1 m to the focal distance.
I want the mirror in focus and the character in front of it blurred (out of focus). This would just result in having everything in focus and I don't want that.
I WANT to render with DOF
As far as I know, it would result in having the person in the mirror sharp, the mirror slightly blurred and the person in front of the mirror even more blurred. If you want the mirror in focus, place the focal point where the mirror is. ( in which case the mirrored image, as well as the person in front, will appear blurred)
I'd have to test this in some controlled way, but I have a feeling what you're dealing with is an issue with how Iray calculates the distance to an object for DOF. It sounds to me that it is using the total distance that the light ray traveled from the object to the camera. Not just the distance from the reflected light in the mirror. Obviously a real camera doesn't care about how far the light has traveled, DOF is only determined from the last surface the light bounced from to the camera's sensor.
I have some ideas on how to test this, but will have to wait until I get home to prove or disprove my theory.
I would be very interested in the test results of a real camera. My logic tells me it should work the same way. I don’t own a camera, but if I don’t wear glasses it’s not like I can suddenly see things sharp, no matter which distance, just because I‘m looking in a mirror close by :)
anyway, regarding iray @Sven Dullah and @JonnyRay are right, it takes the total amount of travelled light distance. This is quite easy to calculate in the mirror case, but gets really tough if you try focusing an underwater scene with refraction :)
Here’s an iray example I did a while ago if you’re interested:
https://www.daz3d.com/forums/discussion/comment/3997001/#Comment_3997001
That's exactly how a camera works in real life. If you focus a mirror, everything on the mirror is sharp. And apparently Iray can't do that, which is quite annoying.
Found a real camera example in a photography forum. So apparently it works the same way as I expected physics to be working :)
https://photography-on-the.net/forum/showthread.php?t=1029175
No, that's not true at all. A mirror is not like a monitor, it doesn't have an "image" on it at all: light bounces off the mirror and continues onto the objects reflected in that mirror. Iray is processing the mirror correctly.
To focus on the reflection in a mirror, you need to look at how the light travels. Think of the mirror the same as you would a window.
Person standing 6' from a mirror.
0------|
To focus on the reflected image of the person you need to treat it like you are focusing on a person 6' past the mirror
0------|------0
The light does not stop at a mirror it just redirects the light.
I...am amazed that this works. maybe I'm dumb but my mind is blown right now. Especially since I could never figure out how to get this to work properly before, But now I can! Thank you!
Thank you a lot! This should fix my problem! :)