Render separate "back part" and "front part" so I can place something in between in other program? Imagine a spinning rings like the animation in this page http://en.wikipedia.org/wiki/Gimbal_lock

If I planned to have my 2D character floating at the center and apply some crazy effects with After Effects, since that program is not a 3D program, I must render the scene as a sequence of images to further process it in After Effects.

To place something in-between I think I should have 2 set of images which is in the front and back of specified Z value. My character will be at that Z so when some part of the ring spin over it will occlude the character correctly. Is there any way to separate rendering into 2 parts like this? (Or any better way?)
A common technique in 3D is to render a Z-Depth pass. With this Z depth used as a mask in your favorite compositing app you can place any object at any depth (you threshold the mask to desired value with levels).

The advantage of this is that you have the freedom to change the Z-position of your 2D objects in postproduction. Exporting a Z-Depth pass is also often faster than rendering multiple times.

You can create Z-Depth pass with custom material, mist pass or remapping the Z pass values:

How can I get a Depth of field render pass?

Compositing fog destroys PNG alpha in Images as Planes when using Cycles

Here is how to use such pass in After Effects:

Video Copilot Explosive training (At 35 mins)

He mixes 3D debris and objects with 2D explosions through Z-depth mask.