How to hide a portion of a mesh that is blocked by another mesh on a nonrendered layer I was messing around with render layers and passes in cycles and was trying to render a layer where object1 was intersected by object2 however object2 was on a separate layer that was not being rendered; so instead of object1 being cut in half and the portions of object1 would not not be visible had all the layers been rendered remaining invisible, ( was hoping they would be transparent) they are visible.

Here is the image with all the layers rendered at once:

 

Here is the layer with only object1 rendered (note: it is reflecting objects from other layers but the objects themselves are not rendered):



You'll notice that the portion where the cube is in front of the glossy pain (object1) and more visibly where the glossy pain intersects the ground (in this case both the ground and the cube are object2) are rendered, however I wish to have theses arias of the glossy pain to be hidden so that this layer can be used in compositing. Is there a way to do that? I'm thinking something to do with the Light Path node in object1's texture but I can't figure it out. If this question doesn't make sense or you need clarification let me know.
You need to use the Exclude boxes for this. Go to Properties > Render Layers and make sure all the layers including the objects you do not want to have render on that layer are selected in the Exclude portion. This will basically do the same thing as hiding it, but for that render layer only.