View Full Version : using zdepth info?

10 October 2003, 06:24 PM
Okay, with all the turorials out there, I have found no one who really explains compositing in layers or rendering in layers. The biggest problem is that no one tells you how to composite or render out zdepth info. They just make mention of it and then leave this gaping void to be filled by your ignorance (no offense to those tutorial writers, because the rest of their turorials did fine explaining the other elements of multi-pass rendering).

So here's my Q, how do I composite zdepth info in AfterEffects (non production bundle)? I'm using LW 7.5 on a MAC with OS X.2. I have a handy little plugin that renders out z-depth info in all the file formats LW can normally render out any image.

So 1) what file format do I use, and 2) how do I use it in AfterEffects to control my gaussian blur over an image?

Also, do iff and rla images in LW hold depth info? And what is the difference between Delux RLA in LW and RLA_24/32?


Triple G
10 October 2003, 07:01 PM
Originally posted by cesario1212
how do I composite zdepth info in AfterEffects (non production bundle)?

You don't. Z-buffer data is only handled in the Pro Bundle. :hmm:

10 October 2003, 07:30 PM
you can use the Compund Blur filter and tie it to the depth map....

it isn't perfect, but it does work.

also, check out Lenscare from:

it works very well.

Triple G
10 October 2003, 07:50 PM
Hmm...I hadn't seen those before. Thanks for the link, Poli! :)

10 October 2003, 01:53 AM
Hi Poli,

I downloaded the demo of Lenscare and I dun know how to use it despite the manual :blush: How do you use it? :shrug: Depth buffer and image in the same file? Different files? How to control the depth of focus?

10 October 2003, 04:52 AM
I ran across lens care during my searches about zdepth before I posted in this forum. It's looks interesting, but I want to fake dof without having to need a bunch of third party plugins. Thanks for the link, none-the-less.

I will let you know how compound blur works. Again, thanks for your help!


10 October 2003, 08:33 AM
Here's a real quick one using this technique below. 5 mins from wo to go including this post. Nothing too flash but this is only the second time I've opened AE :) I'm sure you can get better results for quickly simulating DOF by looking around a little more. All that I used was a normal RGB (beauty pass) render & saved a buffer export of the depth to a separate sequence. Hope this helps.

10 October 2003, 02:33 PM
Originally posted by dzogchen
Hi Poli,

I downloaded the demo of Lenscare and I dun know how to use it despite the manual :blush: How do you use it? :shrug: Depth buffer and image in the same file? Different files? How to control the depth of focus?

you'll need 2 separate files. your standard nice looking render, and the then your depth map. when you load the LensCare plugin, you point it to the depth map for your DOF effect.

Thanks Muad'dib, i had misplaced the link to that tutorial.:thumbsup:

10 October 2003, 10:29 PM
Check out this tute by Lee Stranahan:

Multipass Rendering Using the .PSD Format

10 October 2003, 12:47 AM
With some help from some other kind people like yourself and a little tweaking to their idea here is what I did.

I had one rendered image pass for the beauty pass. I duplicated the layer in AE. I then had to use the zdepth as a luma matte on top of a "solid" layer. The solid layer was then used as an adjustment layer on the main background image/beauty pass. I took the layer I was using as the foreground image and used zdepth as alpha for it. The foreground was then adjusted using the same dual layer technique as the background. I simply tweaked the levels for the zdepth to adjust how much each matte revealed for either the foreground or adjustment layers. Did that make sense?

Here is a sample of the final output.


10 October 2003, 01:01 AM
Howdy Poly ;)

No problemo mate - glad to be of some help every now & then.

Btw - a little tip if no one has noticed this already ... the depth pass from Export PSD seems to have different information in it that just the plain Render Buffer Export depth pass. Probably something to do with the 32 bit max slider next to it. I find that it (PSD) produces much better results than the other (RBE). Unless you want to tweek the latter in photoshop.


PSD Depth buffer

RBE Depth buffer

10 October 2003, 01:01 AM
Blurr applied in Photoshop with PSD layer

Blurr applied in Photoshop with RBE layer

Big difference as you can see ... :)

Triple G
10 October 2003, 01:47 AM
The problem I've always had with the technique of rendering a separate depth pass is that it really seems to only lend itself well to situations where you need things close to the camera (or very far away) in focus. It's difficult to have something at a middle-distance be in focus while having both the foreground and background blurred. In theory, you should be able to easily do this with AE Pro and an RLA/RPF file, but I always seem to get halos and weird artifacts around the edges of my objects. I don't know for sure if this is LW's fault or AE's, but I think it has something to do with LW not antialiasing the z-depth information. I've had some success limiting the appearance of the halos around out of focus objects in RLA files by using the depth pass as a luma matte on the RGB footage, but that's not perfect either, since it's kind of redundant rendering out a separate depth pass if you're already rendering to RLA/RPF in the first place. There's gotta be a better way... :hmm:

10 October 2003, 01:58 AM
Triple G, this is true, especially when you have an animation and want to keep your files small.

I'll keep the PSD option in mind for next time, Muab'dib, but how big are the files compared to rla or others?


10 October 2003, 03:54 AM
File difference is huge cesario1212 ...

At 640x480 - rla is 400 kb psd is 4 meg.

Then again the information you get from the PSD is very different as well. For single image work I'd go the PSD. For animation I'd have to compare what you could do with either of those before I could say which one is better. More information is always better than less tho so I'd consider convering the PSD to a different format tiff/tga - around 900 kb, then use that for your post process work. It's just hard to see what information is there in the RLA/RPF formats - anyone out there know how to visually see what gets saved into those extended format buffers ?

CGTalk Moderation
01 January 2006, 06:00 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.