Us object to mask objects behind but not in front

I’m trying to figure out a way to make an LCD screen mask out the objects behind it and be render an alpha channel, but preserve the objects in front of it, specifically preserving the glare that’s on the transparent glass in front of the LCD, but mask out the back of the screen that the LCD is in. Then I can have others that don’t do 3D easily use After Effects to put the content on the screen by overlaying the rendered screen with an alpha channel where the LCD is.

Would you use ID Mask for this, or is there a way to do it without nodes? Any help would be appreciated.

You might be able to do it using multiple render layers.

There’s a little trick I use for various things. First make a copy of your scene. Now, in the copy, give your screen a shadeless white material, and give everything else a shadeless black material, including any background. Now render, and you have your alpha channel / selection mask. And if you want to do extensive post processing of the whole pic, you can use other shadeless materials, in blue and green and yellow, etc., then, in photoshop, you can select by rgb value.

I suppose rendering separate layers/objects may just be the way to go. I will though investigate more down the road and if I find an easier way to do it I’ll let y’all know. Thanks for the input.