How to use an object as a mask? I have a 4 point plane (quadratic) that I would like to use as a mask when rendering.I need this so the mask will be transformed correctly when I move the camera. This plane is covering the area I would like to mask.

I was thinking to maybe render a mask scene and feed that into the final scene as a mask. But since Blender now has masks, it would be easier if we could convert a mesh into a mask.

**EDIT
I'm using Blender 2.68a with Cycles.
You can do this using the Object ID and a ID mask node.  

Select the object you want to use as a mask, and under the object tab in the properties set the Pass Index unequal 0 (I used 1, but if you have more then one mask give each one a different number)



Now, head over to the RenderLayers tab and check the Object ID pass



Re-render your image and head over to the node editor. There attach a ID Mask node to the IndexOB socket. Use the node's output as a factor for a mix node (See screenshot)



Here I used a test image, but you can use one from any source you want.