It is AMAZING how often people ask me about this. I wrote a tutorial way back in 2010 about how to use Z-Depth passes in Fusion. To this day it still gets a lot of traffic. However, that tutorial is somewhat out of date and seems to be causing more confusion than clarity. So here is an updated tutorial. If you are really unsure about Z-Depth passes I would recommend you go and read the old one here and then come back to this one as I am not going to explain the basic aspects in this tutorial. I will also explain how to use a Z-Depth pass that is stored in a EXR file which I did not do in the last tutorial. So here goes. First off make sure you render something to an EXR that will have the Z-Depth pass embedded in it. This is not difficult to do, I am max guy so below is a screenshot of the 3dsmax exr save dialog showing my setup. The main things to look out for here are the "Automatically Add/Remove Render Elements" checkbox and the G-Buffer channels at the bottom, both of which are outlined in green. If you have a render element that is creating Z-Depth pass then it will be automatically embedded. For instance if you are rendering with V-Ray and you have a "VRayZdepth" pass in the element list you probably do not need the G-Buffer Z-Depth channel. I as habit always save a few G-Buffer channels as a 'just in case'. Often I will get handed a file that has had Z-Depth element added to it but the ranges have not been correctly setup, in this case it can be handy to have G-Buffer passes.
Hopefully by this point you have a render to take into Fusion. So lets get to it, this is super simple.
- Create a "Loader" (LD on the toolbar) and load up your render.
- Go to "Tools" panel and click on the "Format" tab.
- Expand the "Channels" flyout.
- Go all the way down to "Z".
- In the drop down list for "Z" select your Z-Depth pass. This will depend on what you have named your render element. In my case, I select "VRayZDepth.R" (In 99% of instances you can select either the red, green or blue (.r, .g, .b) as they will all be the same.
- Now if you click in the viewer press "Z" on the keyboard you should be able to see your Z-Depth pass. If you screen is all white or it is hard to see hit the normalise button so you see it properly.
- Now you can add either a Depth Blur or a Fog node. They will automatically see the Z-Depth information.
- Adjust the settings on either your depth blur node or your fog node.
- Done, easy.
That's it. If you are unclear of anything above you can follow that same procedure in the images below which might make it a bit clearer.
[gallery columns="4" link="file" ids="1090,1091,1092,1093,1094,1095,1096,1097,1098,1099"]
I hope that helps everyone. I might do a video if I get time, along with my workflow for using Frichluft Lenscare which is what I normally use to create any DOF effects. If you have any other questions leave a comment and I will try to get back to you.