Layers and compositing

Hi all,

Okay, the problem I have been experiencing is a problem with layers and with the nodes. To start here is a picture of a my nodes:

The problem I am having is that when I want to add a object into my scene on a separate layer (explained at bottom), the object ends up looking like this:

However, this is not what I want at all. I want it to look like this:

You cant tell from the pictures, but the reason that I have put the two objects (the grassy plane on one and the cube) on separate layers is because I am using nodes to adjust the brightness of the grassy plane, (See node picture) however, I do not want this effect to affect the cube and this is why they are on separate layers. When I separate them to different planes though, they end up looking like the picture in the middle, which is not what I want at all. I have also tried using the mix node, but that does not help either. Any suggestions?

You probably need to select the grassy-plane to be a “Z-mask” layer on the cube.

http://www.blender.org/development/release-logs/blender-246/rendering-features/