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.

  • $\begingroup$ Related: blender.stackexchange.com/q/3092/599 $\endgroup$ – gandalf3 Oct 26 '13 at 0:57
  • $\begingroup$ You could give it a Holdout material, this will make the object render as transparency. $\endgroup$ – gandalf3 Nov 7 '13 at 21:21
  • $\begingroup$ @gandalf3 You should probably make this an answer ;) $\endgroup$ – Bojidar Marinov Jan 22 '17 at 16:13
  • $\begingroup$ The project is on ice so I haven't tried it yet. I don't know if it solved my problem. $\endgroup$ – Max Kielland Jan 25 '17 at 19:06

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)

Object Tab

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

RenderLayers Tab

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)

Node Setup

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

Example Output

|improve this answer|||||
  • $\begingroup$ I see how you think :) I will try out your suggestion. $\endgroup$ – Max Kielland Oct 25 '13 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.