DOF in reflections

Is it possible or ever going to possible to achieve this affect: a far away object is blurry through DOF in a focused reflection?
I am currently working on a render where I actually want to focus on the sky that is reflected on a car. In real life the car would be blurry and the sky sharp - one could also change focus and make the sky blurry and the car in focus.
As I understand it, right now Vray would can only focus on the reflective object and the reflections will be in focus too…

It depends on if you are doing DOF in the render or in post. If you’re rendering DOF, this effect is absolutely possible. Just set your DOF target point distant enough past your “mirror” so that the far away object is in focus.

DOF is raytraced so the reflections should be out of focus according to their apparent distance from the lens.

Id try the effect in somthing more obvious than clouds. Put a checker map in the domelight and start the tests from there?

Good call! Will do so !Thanks !

So the math behind it is the distance between your camera and the surface you’re aiming at, then add on the distance between the surface and the thing it’s reflecting. So say you’re aiming your camera at a mirror which is 20 metres in front and you want a sharp reflection of an object that’s 100 metres in front of the mirror, it’s 20 + 120 metres = 120 metres for your focus distance and you’ll be sharp.

As for your example, some parts of the checker are sharp, some are soft because of the above equation. All if the bits of the checker being reflected are closer or farther away from your car - the middle bit might be 400 metres away and sharp but the top parts of the checker are further - say 420 metres away and the bottom ones are closer - say 380 metres away so they’ll get a bit more blurry. Focus is only razer sharp at one specific distance from the camera, softer in front and behind that so the only way to get things sharper overall is change your aperture to something higher and less soft overall!

Sure, makes sense and I’m aware, but I think I never experienced that in real life, not as strong as this at least. Usually landscape and objects which are far away are in focus if you put your lens to the furthest point (infinite) or just in front of that. The clouds aren’t that far away from each compared to objects closer to the camera . Probably it has something to do with the dome being around 400m away and not like in real life 1000-4000m (at least for the clouds)…

I am also curious about what is the focus distance that V-Ray calculates between the domelight and the camera. One thing I noticed in regards to blurriness, it seems the DOF calculations start off as blurry and then have to resolve the image to sharp - thus it’s not starting out sharp like when you have DOF turned off, but instead has to calculate back to sharp. Wondering if this may be the reason the reflection isn’t perfectly clear.

The dome light is assumed to be infinitely far away (i.e. it’s equivalent to environment background).

Best regards,
Vlado

From my current testing it doesn’t seem to be. At the max distance it was blurry, but sharp at around 300m…

I figured that would the logical answer, but like Manuel, I am also finding it is blurry with a large distance used for the focal point.

<shrug> It as accurate though. If you put an actual sphere that is sufficiently far away, it will look the same.

Best regards,
Vlado

Well, not really. Here’s a quick test with DOF and 10km focal point distance, and DOF turned off. Doesn’t seem to matter, I tried 250M, 600M, they all give me about the same blurriness.



dof-CHECKERx.zip (185 KB)

I don’t have Blender :slight_smile: If you post a .vrscene file, I will be able to look at it.

Best regards,
Vlado

Sure, see attached.
scene.zip (518 KB)

Any news on this? I still find our findings strange…

As Vlado mentioned V-Ray indeed calculates the result accurately.
The confusion comes from the fact that for curvature objects the length of the reflections rays is not the same, and even though the difference is not so much for such large distances blurring effect is much more prominent than the regular case.
Here is a quick example of my test. I have a cubic and spherical object with roughly the same size, note that the sphere is scaled down to match the cube-depth:


Rendering without DOF gives this result:

When DOF is enabled and camera focus is set on the background object which is another sphere the result is:

Note that while the box-object stays the same (except the edges) spherical object is is much more blurred - this is because it’s reflection rays are not parallel like the box ones but scattered.
This influence the refraction rays distance and hence the blurring.

Here is the scene if one would like to play around it.
http://ftp.chaosgroup.com/support/scenes/dof\_infinite\_reflections.max

Why would you scale the sphere to the same depth? doesnt give that a different result?
Also: why would the length of the reflection rays be different? is that realistic? seems odd to me…

Svetlozar, could you comment on that, please? I’m still confused.

edited as i was Off topic.