You can turn on the z depth channel in the render global options. If you save out to RLA or even tif it should save the z information in the file. I have not yet got this to work in After effects but it does work well in shake