Cycles: Rendering Depth Pass Only (Z Depth, Depth of Field Pass)

Hi, first post ever. I did not see this answered anywhere else.

I rendered out an animation (about 2 hours) and forgot to turn on my depth pass in render layers. I’m using GPU rendering.

To avoid re-rendering everything again, I am trying to find out if I can only render out the Depth Pass without having to re-render the combined pass again. I want to do the DOF in post in After Effects. I just can’t find out how to only render out a Z Depth Pass without having to wait for the combined pass to recalculate every frame.

Any Suggestions?

You can’t exactly re-render just the z-pass, as it’s not calculated as a separate step. It’s just created from extra data during the full render. With that said, if all you need is the z-pass you can re-render with something like 10 samples and all light path lengths set to 0. Technically it’s still a full render, but you’re skipping a bunch of steps and it should go much, much faster.

1 sample is enough, the Z-buffer is only written in the first sample anyways.
For even more speed, add a black diffuse material as a material override in the Render Layer tab.