Well I just learned how to do it in Fusion using a separate z file maya .iff............
connect z info to foreground of channel boolean tool. leave boolean operation to "copy" go to the auxiliary channels tab and check on the "enable extra channels" box. On the "to z buffer" dropdown list choose "z buffer fg". On the color channels tab just make sure you have the "to red" "to green" "to blue" "to alpha" set to "do nothing".
connect the image you want to apply depth effects to the background input of the channel boolean tool you just set up. you can now connect a depth tool to the channel boolean tool and then color pick the far and near planes of your z from your screen and mess with your z scale on the depth tool to get the effect you want. make sure you use the picker on the proper areas or you wont get the depth tool to do anything or you might get a very sharp z effect (which kinda looks like the image is getting sliced depending on the depth you choose.
thats it. you will prob get ugly anti aliasing on teh edges of ur images cus z depth info is not antialiased. thats when you need to use z coverage option which helps soften your edges. im inthe process of figuring out how to get z coverage info from mental ray which i read its possible but its not through a nice user friendly interface but through writing code or something. blah..
o about z comping in after effects. I tried it once and got it to work using an .rla format from maya. the problem i saw in getting it to work is that you had to be very delicate with the values you put on the far and near planes or it would not work. try to really slowly pull the sliders from one end to the other and hopefulyl ull find where the values are at. also with AE you will get aliased edges in ur z and i dont know how you can fix it in AE. well hope this helped somehow happy comping.
d