Mirrors are not handled correctly for depth of field simulation

When I have a camera with limited depth of field that is looking at a mirror at an angle, the sharpness of the image appears to be dictated by the distance of the cameras focal plane to the mirror, rather than the actual optical distance to the object.
I am using ISAAC sim 2022.2.1. This used to work correctly in 2021.2.1. Am I just missing a setting somewhere for this or is it a bug.
See the image for illustration.

What I would expect:
Setting the camera focal distance to dist(O,A) + dist(A,B): blue in focus, rest out of focus
Setting the camera focal distance to dist(O,A) + dist(A,C): red in focus, rest out of focus
Setting the camera focal distance to dist(O,A) + dist(A,D): black in focus, rest out of focus
Setting the camera focal distance to dist(O,A): all out of focus

What happens:
Setting the camera focal distance to dist(O,A): all IN focus
All other settings: out of focus.

Here is another illustration:
image

I think what may be happening is that first, the objects are projected onto the mirror without accounting for optical path (for purposes of depth of field simulation), and then the mirror is viewed as an image, leading to different optical paths for the different objects due to the between camera and mirror.

Hi Patrick,

I’m sorry, the question is not completely clear. I understand that you are trying to model the RGB camera image, with the focus distance / fStep parameters.

  1. It’d be good to establish that in the simplified setup (without the mirror), you are getting the expected results.
  2. When the mirror is added, technically the results shouldn’t change, as the RTX / ray-tracing rendered should approximate that correctly. If not, I’d suggest rendering it with path-tracing, to see if we’d be getting it as a baseline.

Since this scene is relatively difficult to reproduce, it’d be good, if you could attach the sample scene to the question. This should allow us to check the scene (and pass it to the RTX / rendering team).

I am getting the correct result without a mirror.
In no_mirror, I have set up a camera with focal distance 300 units at 300 units distance to a line of small cubes. Their front face is in focus, as expected.

In mirror, I have set up a mirror at a 45 degree angle 300 units away from the camera. 300 units away from the mirror, I have set up the same line of cubes. With a focal distance of 600 units. all of them should be in focus, however, none are.
When I set the focal distance to 300 units in this scenario, the central cube only is in focus.

I hope this helps you to reproduce this bug.
no_mirror.usd (7.4 KB)
mirror.usd (9.4 KB)


Hi @patrickogf

Thank you very much for prepraring the sample scenes to reproduce. It was really helpful for us to look into the issue you reported.

Please see the attached images, I opened mirror.usd and rendered, one with RTX-Real-Time, the other with RTX-Interactive.

As you can see, we can get expected result in RTX-Interactive (Path-Tracing). Would it be possible to use RTX-Interactive as a workaround for you now? Btw, currently it’s not possible to get the same/closer result with RTX-Real-Time.

The dev team aware of this issue now, and will look into how we can improve in the future.