Mirrors and Camera Focus (Iray)

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

  • FishtalesFishtales Posts: 6,212

    Check the camera you are rendering through hasn't got DOF set.

  • Sven DullahSven Dullah Posts: 7,621
    surody said:

    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?

    If you want the mirrored image to be in focus, try adding 1 m to the focal distance.

  • surodysurody Posts: 261
    surody said:

    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?

    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.

  • surodysurody Posts: 261
    Fishtales said:

    Check the camera you are rendering through hasn't got DOF set.

    I WANT to render with DOF

  • Sven DullahSven Dullah Posts: 7,621
    edited August 2019
    surody said:
    surody said:

    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?

    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.

    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)

    Post edited by Sven Dullah on
  • JonnyRayJonnyRay Posts: 1,744

    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.

  • punkypunky Posts: 25

    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 :)

  • punkypunky Posts: 25

    Here’s an iray example I did a while ago if you’re interested:

    https://www.daz3d.com/forums/discussion/comment/3997001/#Comment_3997001

  • surodysurody Posts: 261
    punky said:

    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 :)

    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.

  • AlmightyQUESTAlmightyQUEST Posts: 2,006
    surody said:
    punky said:

    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 :)

    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.

    I'm... not sure that's true. You've tried this with a fairly shallow depth of field with a camera?
  • punkypunky Posts: 25

    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

  • rrwardrrward Posts: 556
    surody said:

    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.

    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.

  • JamesJABJamesJAB Posts: 1,766
    edited August 2019

    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.

    Post edited by JamesJAB on
  • zombietaggerungzombietaggerung Posts: 3,846
    edited August 2019
    JamesJAB said:

    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!

    scene setup.JPG
    1207 x 696 - 93K
    scene test.png
    1800 x 1200 - 2M
    Post edited by zombietaggerung on
  • surodysurody Posts: 261
    JamesJAB said:

    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.

    Thank you a lot! This should fix my problem! :)

Sign In or Register to comment.