PDA

View Full Version : DOF not affecting reflections?



sadkkf
04-22-2013, 04:44 PM
Really don't want to be a help vampire, but this is really frustrating me.

Why does my object blur nicely with DOF, but its reflection does not?

113810

JoePoe
04-22-2013, 04:50 PM
My guess would be because the ground reflecting the top of the X is in fact very close to the camera. The reflection IS blurring the further away you get. This is after all a camera lens effect. It's not as if you have a actual blurry X.

Lowering your F stop will most likely give you more of an effect on the ground as it gets closer to the camera (depending of course also on the FD.... they work together).

CourtJester
04-22-2013, 04:59 PM
Well that's interesting. Apparently they are still using Zdepth for figuring out DOF? This is physically inaccurate; when you look at a mirror, the DOF for the reflected objects should be a function of the total distance of both rays, from camera to surface and from surface to reflected object -- not of only the ray from camera to surface. (The curvature of the reflected surface can also affect this, but that's a more complicated and much less common case than sadkkf's scenario).

Ages ago, I constructed a "spinning camera" hack in 8.x that addressed this limitation, though I wouldn't recommend it for production use unless you have CPU cycles to burn.

sadkkf
04-22-2013, 05:03 PM
To be clear, I have a large ground plane that extends from beneath the camera to well off into the distance. The object is about 16 meters from the camera. I'm using the classic camera since it antialiases text better than the perspective.

My DOF settings:

distance: 5.46m
f-stop: .5
diaphragm sides: 0
diaphragm rot: 0

Still not sure what's up with this. Why would having a ground plane near the camera matter? The X is blurred further away from the X on the Y axis, but not close to it.

Oh, I should also mention I get exactly the same results with DOF as I do with the DOF Blur Image Filter (though the filter took about 2mins longer to render).

Having a go with the Digital Confusion filter now and need to walk the dog as it goes. :)

JoePoe
04-22-2013, 05:08 PM
As I look a little more closely.... Your FD seems to be right in the middle of the reflected X as it appears on the ground plane (seems as though the top (closest to camera) of the reflected X is also showing the start of a blur). Lowering F stop will only tighten up that sphere of influence. Instead, maybe, try bringing in the FD a lot first.

How about throwing in some reflection blur on the floor to augment the effect?

(was typing while you were posting. Your FD is consistent with what I said above. AND the very small f stop is giving you the relatively small "crisp" area.)

So, in other words, with those settings, what's 5.5m from the camera will be in focus, and that is exactly where the meat of the reflection is. Weather or not that is physically inaccurate as CourtJester says.....:confused: ... but the explanation sounded good. :)

JoePoe
04-22-2013, 05:26 PM
Camera 16m away.

FD= 1m
F-stop= 2
0
0

(No refection blur on floor)

sadkkf
04-22-2013, 05:44 PM
WTF?

Okay, where is the reflection blur option? What camera are you using JoePoe?

Oh...Reflection Blurring under Environment...mine's set to 0%

JoePoe
04-22-2013, 05:56 PM
Used classic like you (wanted to keep it as close to what you are working with as possible). That example did NOT use reflection blur.... just DOF by moving in the Focal Distance.

Here's the same render (I think I fattened the X up a bit) with 2% reflection blur added as the cherry on top.

Reflection blur is a surface attribute. In the old layers system its under the Environment tab. In Nodes it can be done all over the place..... direct plug into final surface or within various material settings etc.

Lightwolf
04-22-2013, 06:01 PM
Just a quick test here and it works. However, it has to be rendered in camera, no image filter shortcuts.

113813113814

Cheers,
Mike

JoePoe
04-22-2013, 06:02 PM
Ah, I see you found it.

Maybe reflection blur by itself is what you've been looking for!
I use RB to blur what I need blurred in objects/materials first (nothing in real life reflects perfectly), and DOF for the cool camera effect object blurring over distance.

sadkkf
04-22-2013, 06:04 PM
well, okay. Moving the FD helped me too. Dang. Really need to sit down with nodes once and for all.

Thanks tons!

Lightwolf
04-22-2013, 06:10 PM
Just to add to the info here... LW does indeed compute DoF correctly via reflections or refraction.

It is the total length of the ray to the visible surface that determines the amount of DoF (even if it isn't directly computed like that). And that can even give the odd effect of an out of focus reflective surface mirroring an item that is in focus.

Cheers,
Mike

JoePoe
04-22-2013, 06:15 PM
You're welcome.
I'm no photographer, and this helped me sort out DOF.... After this little video, I really don't have to hurt my head over "F-stop" again :)

http://www.youtube.com/watch?v=04JO3eAs5Js

- - - Updated - - -

Danke Lightwolf!!

sadkkf
04-22-2013, 06:16 PM
It is the total length of the ray to the visible surface that determines the amount of DoF (even if it isn't directly computed like that). And that can even give the odd effect of an out of focus reflective surface mirroring an item that is in focus.

Does this mean DOF is computed separately for reflections and objects?

@JoePoe...thanks for the link. It helps me too!

Lightwolf
04-22-2013, 06:18 PM
Any time... one more: To visualize the volume that is in focus... add a null and parent it to the camera at 0,0,0 (and no rotation) - then add the Depth of Field Custom Object to it.
That will visualise the volume that is in focus, depending on the camera DoF settings as well as the image resolution (which plays a part as well - the higher the image res, the less individual pixels will be in focus - be blurred by less than the size of a pixel).

Cheers,
Mike

Lightwolf
04-22-2013, 06:26 PM
Does this mean DOF is computed separately for reflections and objects?

No, much simpler. Essentially, the rays that go out per sample are rotated/aligned to focus on the sample plane. And that angle propagates through all subsequent calculations - reflection or refraction.
The interesting part is... the distance to the focal plane is only relevant when the initial direction (from the camera plane) is computed for a ray... everything beyond that is automatically traced just like any other ray in the raytracer. Even the total distance to the camera plays no part anymore.

Cheers,
Mike

Captain Obvious
04-23-2013, 01:47 AM
It's because you're using the Classic camera. The old render engine used by that camera does not support correct depth of field. Switch to a Perspective camera for correct depth of field.