why does my z-depth pass have jagged edges?

Does anyone know why my Z-depth pass looks like this? The edges are all jagged. (I’ve zoomed up to make it easier to spot).

It’s making my attempts at DoF look terrible. Is there some option i need to enable to get my z-depth pass to be anti aliased like my beauty pass? I hope this question isn’t too retarted.

-thanks a bunch

i really have no idea whats going on, it might be your graphics card? if not try blurring it before you apply it to the DOF


If you want to be accurate, Z-depth values should never be anti-aliased. That would cause the boundaries of foreground objects to appear to be halfway between the foreground and background. However, you could use a blur node to smooth these out - you might get acceptable results.

A much better solution though, would be to use Full Sample Anti-aliasing (http://www.blender.org/development/release-logs/blender-246/rendering-features/). This is a bit like rendering every pass at a higher resolution, performing all compositing, etc. then scaling the resulting image back down. It should get rid of the artefacts in your finished image.

that sounds really interesting rawpigeon. I thought it was simpler than that. I would have thought if my z-depth pass had the same edges as my beauty pass it would have worked.

I suppose I could kind of do what you said manually by rendering all my stuff at higher resolution and unantialiased, then after the final comp is done to down sample (which would probably result in smooth edges). I will try in the future.

That’s how it’s done with most 3D programs.

Z-depth values can’t be anti-aliased because they necessarily must represent one pixel’s position on the screen. Their color represents that pixel’s depth from the camera.


If you’re doing everything in Blender with compositing nodes, you can just enable Full Sample Anti-aliasing (FSA) and all of this will be done for you :slight_smile:

I see what your saying Rambobaby.

oh, haha excellent deal. So I’ve done some digging (actually found this on a comment from rambo baby from a while ago) because there is nothing on FSA in the wiki, and apparently I just press shift+R over my final composite node? I don’t quite understand how to enable this feature. Also, if I plan on using FSA will I want to disable OSA when I render?

On the output tab (F10) enable the “Save Buffers” button. The “FullSample” button will then appear. Enable it also.