As an alternative to using AE's 3D layers (which, alas, have no depth), you can import data from most popular 3D modeling and animation programs, such as Maya, 3D Studio Max, Softimage, Lightwave, Electric Image and Cinema4D.
In the 3D software, you'll have to export your scene as a PIC, RLA, RPF or EI. When you do so, make sure you enable options to save additional pixel information besides just red, green, blue and alpha. For instance, if your 3D app saves information about how far each pixel is away from the camera in Z-space, After Effects will be able to interpret that data.
For most of these image formats, the extra data is saved directly in the image files. The exceptions are Softimage's PIC files and Electric Image's EI files, which store the 3D data in additional files, ZPIC files for Softimage and EIZ files for Electric Image.
After Effects can still read this data. Don't import the ZPIC and EIZ files into After Effects. Instead place these files in the same folders as their associated PIC or EI files, and only import the PIC or EI into After Effects.