Compositing trouble with alpha mapped planes

Hi!

I have a scene that includes a building. The windows of the building are alpha mapped planes (in other words planes with a texture that has holes in it).

I would like to put a glowing plane (with a high emit value) inside the building to make it look like the windows are lit and glowing. I’m trying to achieve this in the compositor, but no matter what I do, I can’t get the render layer that has the emitting planes to show up behind the rest of the building.

My question in a nutshell is this:
Is it even possible to use zmask for alpha mapped planes, or will the zmask simply not recognize the transparent areas of those planes? In other words, can I use zmasks in compositor to put something behind a aplha mapped plane and have it show trough where the plane is transparent?

Use alphaover or a mix node instead :smiley: