View Full Version : Compositing Depth of Field in After Effects

04 April 2009, 02:52 AM
I've been doing some Googling on this subject and I have found a few written tutorials on how to composite a Z Depth pass from Max with a render in order to create distance blur, but my attempts have been less than satisfactory.

I'm at a loss on how I'm truly supposed to be composting these passes to create the effect I'm looking for and how the effect (I've been using Lens Blur in AE) actually works. When I'm compile the passes I'll get a blur close and far from the camera while the center depth is clear.

So I have two questions;
How exactly is the Z Depth image 'read' by the computer (white=clear/close black=blue/far?)

How do I properly compile these passes in AE to create a distance blur?

Thanks for any assitance.

04 April 2009, 03:50 AM
Unless you are using a proper z-depth filter/effect, I believe that a compositing application just reads them as regular mattes, ie the whitest parts affect the filter the most, the blackest areas the least.

Keep in mind the z-depth matte will give different results for a blur vs a compound blur (iBlur in Shake).

With a straight blur the z-depth will just control where the blur amount will occur. With a compound type blue the z-depth will control the actual strength of the blur applied.

Also keep in mind that true z-depth passes as output by 3D apps are NOT anti-aliased (AFAIK). This is because each shade of grey represents a distance from the camera, so a pixel can't have two values (distances). You can often get decent fake z-depth passes using environment fog.

Best of luck with it.

ETA: Actually I think I covered this briefly on a video tutorial I did about compositing CG render passes that I mentioned in this thread:

I should put it up on soon as I need to find it on my PC which is not set up at the moment. Stay tuned!

CGTalk Moderation
04 April 2009, 03:50 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.