2
$\begingroup$

How can I get the Z Pass from an animation to After Effects?

The normalize node is only usable for Stills, so that's not it.

The map value node seems to sort of work, but I find it pretty tricky to setup, and I would love to find a solution that can be setup within a few clicks. Also, it would be great if the focus point can be controlled by an object(empty) this would normally be the focus object in the Depth of field panel, but I cant get it to work with the Map value node.

In our company we use AE for compositing, otherwise i would just use Blender.

Also, the Mist pass works great, also the way you setup the limits. fortunately there is no way to turn of the Anti-aliasing.

$\endgroup$
5
  • 1
    $\begingroup$ You can output the 32-bit Z-depth plane to an EXR image, if AfterEffects can handle that. $\endgroup$
    – Xtremity
    Apr 4, 2016 at 13:22
  • $\begingroup$ I've tried using both the normal EXR and Multi-Layer EXR. But i cant get any visual information from them in AE. perhaps there is a trick to this i'm not aware of? $\endgroup$
    – Joel
    Apr 4, 2016 at 13:43
  • $\begingroup$ The information isn't visual - it's the distance in Blender Units from the camera to the object. I've no idea how AE makes use of this information. $\endgroup$
    – Xtremity
    Apr 4, 2016 at 14:26
  • 1
    $\begingroup$ What do you mean by "The normalize node is only usable for stills"? $\endgroup$ Apr 4, 2016 at 15:45
  • $\begingroup$ You need to work in 32bit depth in AfterEffects to use floating point zdepth hdr images. AE can utilize your hardware much much better for compositing work than Blender can and is much richer in tools to do so, no wonders your company uses AE. $\endgroup$ Apr 4, 2016 at 17:10

1 Answer 1

6
$\begingroup$

Most Images are encoded form 0 (black) to 1 (white).

The Z pass, being the distance from the camera to every given pixel, will contain values larger than 1, that's why it can't be enclosed in a regular image format. OpenEXR will contain the information perfectly, not only preserving the correct values but keeping it linear.

You are right in that the Z pass information cannot be visualized unless is normalized, ie. converting the lower and higher values to 0 and 1 respectively, and remapping everything in between. But the Z pass was not designed to be visualized...

So do yourself a favor and DO NOT MAP THE Z PASS INFORMATION using a Map Value node or Normalize node in order to save it as a "visual" representation, you'll end up distorting, compressing and ultimately loosing the accuracy of the Z-Depth information.

Instead, bring the Z pass intact into After Effects in a 32bit linear container (OpenEXR or OpenEXR multilayer). Make sure you enable the Z Buffer.

enter image description here

How do you set up your scene in After Effects to use the Z pass for 3D channels? The use of the Z pass might vary depending on what you are intending to do with it.

If you must use it as visual information you could use the 3D EXtractoR and assign the color channels to use the Z information and set black and white points:

enter image description here

For more info on how to use Z depth... please ask in a site devoted to After Effects...

Now, dealing with the second part of your question, on how to exprot the focus point. You can set up an empty to track focus in blender. Then you'd need to export the blender scene using this plugin: https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Adobe_After_Effects. That will create a .jsx script that can be run in After Effects. The script will create a 3D composition with a camera and Null Objcts that correspond with the origin of the objects on the blender scene. You would then need to create some expression in After Effects to use null object that corresponds to the empty on the blender scene, and have the null control the focus point in the After Effects composition.... again, something to ask somewhere else...

More information on OpenEXR here: http://www.openexr.com/TechnicalIntroduction.pdf

$\endgroup$
3
  • $\begingroup$ This is a great answer for Natron and Fusion use, too... same concepts, slightly different implementation... $\endgroup$
    – rcgauer
    Apr 5, 2016 at 20:57
  • $\begingroup$ @rcgauer it's acutally easier on those apps, since there is no need to normalize or turn the Z pass into any kind of grayscale. Natron, Nuke, Fusion, MambaFX, etc will be able to work with the Z information directly. No need to dirstort it by "visualizing" it. $\endgroup$
    – user1853
    Apr 5, 2016 at 22:47
  • 1
    $\begingroup$ Yeah sorry.... my compliment added confusion. That was the point I was echoing: no need to make viz.... $\endgroup$
    – rcgauer
    Apr 6, 2016 at 17:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .