This is a resubmitted question as my previous one was buried and forgotten.
I will describe this as simply as I can.
I have 1 cube and 2 icospheres in my scene. The cube is on layer 1. The isospheres are on layer 2. I have one icosphere in front of the cube and one behind it. However in my final render, the icosphere behind the cube appears in front of cube, as though it has x-ray checked.
I realize there are many things that would work here, but I am doing a very complicated animation and all of the quick fixes for this will not work. Masks, material and object indexes will not work. Alpha over is also out because in the animation, objects will be inside of other objects. Image 1 is a cube with two icospheres. The dark grey is the cube. The blue ones are the icospheres. The cube is on layer 1. The icospheres are on layer 2. I want to blur layer 2 and only layer 2. The blur does show up in image 1, but as you can see the left icosphere, which is behind the cube is visible. That is the problem. Image 3 is my node setup.
Here is the .blend file , https://blend-exchange.giantcowfilms.com/b/791/
Please help, Thanks