Page MenuHome

DEFOCUS NODE: Perfectly parallel mesh plane will corrupt defocus
Closed, ArchivedPublic

Description

Summary: When attempting to use the Defocus Node, a plane place perfectly parallel to the focus plane will cause the node to not properly blur objects. This results in polygons instead of blurs.

Reproduction: 1) Place a mesh plane perfectly in front of the camera such that is lays parallel to the focus plane. 2) Create several cubes or like objects at varying distances between the plane and the camera. 3) Composite the scene through a defocus node and set the F-Stop to a low value such as 2.8. Note how, upon render, there will be polygonal shapes instead of proper blur.

Version: SVN 31523

Platform: Linux amd64 (Ubuntu 10.04)

Event Timeline

It should be noted that if you locate the plane that is perfectly parallel to the camera on a different layer and use the Scene Layers to avoid the offending plane, the blur returns properly.

Please attach a .blend file to demonstrate the problem?

Can't reproduce. Fixed? Blend file?

Win 7 64bit
Blender 2.53.1 r31595 32bit selfbuild


> Please attach a .blend file to demonstrate the problem?

Done. I've also attached a JPG sample to show the bright minds precisely the issue. I spoke with Matt Ebb briefly about it. It was only through a tip from Reyn Martinez that I was able to concretely identify it as being an issue with perfectly parallel planes. Reyn's experiment pushes the plane over slightly and apparently _only_ the objects that are above the Z order of the plane are affected.

The camera rests at Z 1 and the mesh plane at Z 0.

It should be noted that the focus plane is set to be precisely upon the mesh plane that the camera is looking at, Z 1.

All three cubes, small, medium, and large, are out of focus between the camera and the plane between Z 0 and Z 1.

Further testing reveals that if the plane shifts even microscopically off of the focus plane set via the limits, the node behaves appropriately.

Only when the limits are perfectly set to the plane in question does the node break.

confirmed, assigning to brecht.

Set the Threshold parameter to zero to solve this. This options avoids bleeding of out of focus objects onto in focus objects, which helps fix artifacts in certain cases. Since putting the plane there puts it exactly in focus, that's what happens here. Not a bug as far as I can see.

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Archived.Nov 26 2010, 2:56 AM

This was tested with Threshold set to 0.

Tested again as of today's SVN.

The issue is that the blur is, for some reason, not being applied correctly. The objects are _not_ being subject to the defocus node in a proper fashion.

What appears to be happening is that the defocus node is slightly defocusing the objects, but their distant Platonic forms are still appearing.

Have a peek at the new JPG and you will see exactly what the issue is.

Again, even _slightly_ twiddling the perfectly aligned plane's rotation or the camera seems to have everything behave properly.

Attached issue.jpg that further shows the issue here.

Note how the three cubes are in front of the perfectly aligned plane.

They should be subject to the depth of field defocus and yet mysteriously get a strange glowing blur applied.

I wouldn't say that slight movement fixes it, moving it from 0 to 1 gradually makes the blurring come back.

The problem of the "glowing blur" is because it doesn't have enough information to resolve things properly, the same issue exists with vector blur. If you want good results, separate things into foreground/background layers.

Sorry to keep beating on this Brecht, but I had it happen again with a simple 2D shape running at an angle to lens.

I can't help but think something is busted here.

Screenshot and Blender file attached.

Note how, for whatever reason, it looks like a standard non-defocused render with a slightly blurred image laid over top. Very odd.

Fantastic work on the multi-core support, whoever did it.

Ugh.

Didn't set the limits in the camera, my bad.

That said, it looks identical to the plane bug issue.