I have several objects in a scene. I have a plane that is the closest object to the camera, and I want it to mask out one object while leaving the other object alone. I was using the mask transparency until I came to this problem. Any help? If it makes a difference, the objects are all animated
You can do this with Render Layers using the Layer Mask option.
In my example below I've created 3 objects, a plane, a monkey, and a cube. The plane is in front of both. The plane is on Layer 1, the monkey on Layer 2 and the Cube on Layer 3. There is a Render Layer set up for each object. The crucial part is that the Render Layer for the monkey has Layer 2 enabled, and also Mask Layer 1 enabled, which makes the plane mask out the monkey on this layer.
You can see in the rendered layers in the top panel, that the monkey layer is masked out, and that the cube is not masked out.