# Viewing background through alpha channel of foreground object

I have set up two planes, one in front of another, and I want to see the back plane through the alpha channel of the front plane. In the node editor I use the render results as input to a key node so that the green screen is turned into alpha, but it appears that it's only transparent to the plane itself. Have I reached the limits of Blender?!! Is there a way to do this? (see screen shot).

## 2 Answers

If you want the planes to be in 3D space, then you could try using a material like this on the plane with the green screen:

This mixes between a transparent shader and a emission shader based on the difference between the the second color input of the mix node and the pixels in the image. Pixels which are within a .07 tolerance of the green color in the mix node will be transparent, other pixels will be opaque.

• This solution is working! The green isn't keying out properly, but where it is, the background plane is showing through like I wanted. Is there a way to add a garbage matte? Thanks! P – papabrewsky Oct 27 '14 at 5:47
• @papabrewsky You may have to tweak the tolerance (the second input on the greater than node) Basically the mix node is mixing between the transparent shader and the emission shade based on a map of values between 0 and 1. You can put a custom image/matte there and it should work okay. See blender.stackexchange.com/q/10595/599 – gandalf3 Oct 27 '14 at 6:17

There are a couple ways you could do this.

One way would be to use images in the compositor instead of planes, or use separate renderlayers if you still want to use planes.

Replace the green with alpha, then use an alpha over node to combine it with the background image: