depth pass, alpha problem

a little while ago i did some animations with where i had a depth pass but i ran into a problem that the depth passes didn’t regonize alpha channels. the purple thing is just an image on a plane. what i’m wondering is if there is a way to get the depth pass to recognise the alpha channel

here’s my node set up for my depth pass. a normalise node then an invert node. i normally hook these up to file output nodes so i can use in after effects.

Not directly. This has been discussed numerous times on a few forums, and the summary is that z-depth can’t be anti-aliased (each pixel must represent an exact depth, and can’t be a combination of two). So the edge of an alpha channel, which is anti-aliased, presents a problem.

A workaround involves using alpha channels to “cut out” the depth matte. The best example I know of is here: