Volume is rendering through objects in foreground

I'm trying to recreate the planet with the asteroid belt from the force awakens,

but my renders come up like this.

Atmosphere and without respectively. You can see the asteroid belt that is behind the planet, and the asteroid belt messes with the atmosphere. does anyone know how to fix this?

Here's the blend

The belt geometry is criss-crossing itself (exaggerated here for demonstration purposes):

To fix, delete and one side and re-extrude, this time being sure that it does not self-intersect.

1. ↹ Tab into edit mode, ⌦ Delete
2. E to extrude, then drag the mouse around. If the extrusion does not already appear to be locked along the object's local Z axis (there should be a line indicating this), press Z twice. Then press 1 to extrude exactly one blender unit (or whatever value you desire), precisely along the blue line.

Another alternative is to use the solidify modifier.

Also note that your clipping settings are causing lots of artifacts in the viewport. Generally you want to keep the clipping range as small as you can. I found .1 . . . 1000 to work fairly well in this scene.

• I fully replaced the circle with a torus and gave it a volume scatter/absorbtion shader and the volume still goes through the foreground. I don't know what to do now. I just gave the torus a transparent shader and it does the strange shadow thing over the top of the planet seen in my second image – elmo274 May 1 '16 at 14:16
• @elmo274 Make sure the normals are facing in the right direction. Apply the scale (Ctrl A), then switch to edit mode, select all, and press Ctrl N. – gandalf3 May 1 '16 at 18:08
• That did help with the strange shadow thing seen in pic 2. But you can still see the ring through the planet. I fixed it since I just deleted the geometry behind the planet and aligned the edges with the edges of the planet. – elmo274 May 2 '16 at 2:31
• @elmo274 Hm.. I uploaded a version of .blend where the ring is occluded correctly, at least for me. Does it work on your end? – gandalf3 May 2 '16 at 3:00