Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Z depth AOV tied to camera focus?

Message 1 of 4
350 Views, 3 Replies

Z depth AOV tied to camera focus?

Perhaps I'm missing something obvious, but is there a way to have the Z depth AOV tied to the focus of the camera?

In a scene I'm working on the camera is following an object and that camera is moving closer and farther away from said object. When I bring that Z-depth AOV into AE to drive the Frischluft DOF effect I'm having to constantly keyframe the exposure of the EXR and the Focal Point in Frischluft (repeatedly selecting the depth to stay on my target object).

The native depth buffer in C4D recognizes the focus distance of the camera, which seems logical, more like how a real camera would work.

It would also be great if there was a way to crank the Z AOV result up or down as needed to compensate for the scale of your scene. I've often had to reproduce scenes which are very small in real life but that I will build 10x (or more) larger to make the scene easier to navigate. The resulting AOV is pure white. I then have to use the Exposure effect to produce the greyscale info I need for the depth map for Frischluft.

Thank you.

Shawn Marshall

Tags (2)
Labels (2)
Message 2 of 4
in reply to: shawn

Z is non-normalized, so if something is 100 units from the origin, you'll have the value 100 in R or G or B. Not sure if that's pure white.
Can you normalize an input texture in AE?

// Stephen Blair
// Arnold Renderer Support
Message 3 of 4

You can and should comp the Z and then feed that comp to the Frischluft plugin.

Lead Enviroment Artist @Axis Studios

Arnold Discord Server

Ciro Cardoso


Message 4 of 4
in reply to: shawn

Thanks for the replies. It sounds like the answer to my question is, "No, you cannot tie the Z-depth AOV to camera focus."

There are definitely situations where having a depth buffer that's independent of the camera focus would be beneficial, but it would be nice to have an option or workflow that makes it easier to follow focus in compositing. If you're shooting an actor with a real camera and he starts six feet away from the camera and walks up to one foot away from the lens the camera assistant would rack the focus to keep the actor in focus. To rack focus in Frischluft using the Arnold Z AOV I have to manually keyframe in the Focal Point by picking the spot on the image I want to be in focus. For whatever reason Frischluft doesn't let you keyframe that positional picker that selects the depth. If it did I could tie that to a 3D null. Maybe I need to pester Frischluft.

Stephen: I don't really know what normalize the input texture in AE means. That said, I don't get the sense that would help me follow focus on specific objects.

Ciro: Yes, I almost always precomp the 32-bit Z buffer (adjusting the exposure so I can see some depth) and feed that into Frischluft in the master comp.

(I can't get the username tagging function to work in Safari).


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators

Autodesk Design & Make Report