Need some help with light paths

So I got this scene going: (background is alpha)



It’s a scene for a minecraft intro. I’ve got a plane with glass material which is representing a scanner. All objects have duplicates in this scene. One has a wireframe modifier and this material:


The other duplicate has the following material:


Resulting that the plane acts as a x-ray scanner. But there is one thing that annoys me. Is there a way to have the plane not rendered when its background is alpha. I mean something like this (this was photoshopped):

Thanks in advance

Hi,

Do you need to do it in the material?
Because you could use two render layers and the compositor to mask over the extra parts of the plane you do not want to see

First move the x-ray plane to another layer
Create a render layer that uses all the layers to create the image you have now
Create a render layer without the layer containing the x-ray plane
In the compositor use the render layer without the x-ray plane to ‘set alpha’ of the render layer with the x-ray plane
Essentially overwriting the part of the x-ray plane you do not want to see with a 100% alpha channel

e.g.


Hope this helps

Martin