Animating the Z-Depth

Hi

I am trying to animate the Z-Depth so that it can be taken into After Effects and used with Frischluft Lenscare to create Dof.

Having turned on the VRay Z-Depth render element and set the Z-depth min and max in the Render elements tab it gives me control over the depth but I can’t animate it. What is the best way to go about this ?

Thanks

N

You don’t need to animate it at all. Take the z-depth pass into after effects and animate the DOF there.

-Colin

What if I want to focus on something 5 metres away (for arguments sake) then pull back to focus on an item 2 metres away. Would I not have to animate the z-depth to achieve this effect ?

no, the animation is done in after effects completely. Once AE has the depth information, it can do the focusing/animated effects. I’ve used Lenscare myself and it’s awesome. Just load the zdepth into a layer underneath your image, and point lenscare to it (other options include alphas etc). You are overcomplicating things :wink: AE can do this with just the image and the zdepth pass.

Within lenscare you can animate the focus object, the depth of field and a myriad of other things.

I’d love to see your tests when you’re done!

-Colin

I’m still a bit confused so, below is a single Zdepth image. Can this one image really cover such a large focal area in Lenscare ?

well for post work, i think the best zdepth you can have is one where there is no clamped whites and black. The post software can ‘manipulate’ the zdepth to achieve what you need from it. But if you have clamped whites and blacks, then it doesn’t know what to do with those areas

So whats the best way to go about this? Untick ‘Clamp zdepth’ ?

possibly. whatever works really.

Yeah, output a floating point z-depth and either animate in that plugin if you can or keyframe the levels to control which bits you currently use.

So, save the Zdepth image as a .exr file ?

What you want in a zdepth image is the a wide range of value from white to black (Hopefully in 16-bit minimum floating point).

z-depth min : 0’0"
z-depth max: however far away your farthest object from the camera is, just experiment, till you get alot of value.

Don’t clamp whites or blacks and render in min 16-bit floating point (I had problems with lenscare and a 32-bit image)

The lenscare plugin will produce the best results with the suggestions above.

.exr is just fine.

Is this a better gradation of tones ? Also, with clamp zdepth turned off I get this strange alaised line at the top.

yes that tonal variation is better and will produce better results, the problem comes in when you have AE interpolate the mid-gray values because you don’t have enough of them.

You could turn down the max depth a bit in this pass seeing as it extends well beyond the last box.

Not sure about the line, I would paint it out myself in PS.

-Colin

surely just animate the focus point ???

^? Yes you can animate the focal point and adjust the “aperature” in lenscare.