9
$\begingroup$

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.

$\endgroup$
5

1 Answer 1

14
$\begingroup$

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

$\endgroup$
2
  • $\begingroup$ I see how you think :) I will try out your suggestion. $\endgroup$ Oct 25, 2013 at 15:44
  • $\begingroup$ The interface is very different today, and I can't even find the render layers or id mask nodes? Is this still possible? I'm trying to cut some hair using a cube... blender.stackexchange.com/questions/209038/… $\endgroup$
    – powerbuoy
    Jan 23, 2021 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .