9

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.

Max Kielland
  • 1,040
  • 5
  • 12
  • 22
  • Related: http://blender.stackexchange.com/q/3092/599 – gandalf3 Oct 26 '13 at 00:57
  • You could give it a Holdout material, this will make the object render as transparency. – gandalf3 Nov 07 '13 at 21:21
  • @gandalf3 You should probably make this an answer ;) – Bojidar Marinov Jan 22 '17 at 16:13
  • The project is on ice so I haven't tried it yet. I don't know if it solved my problem. – Max Kielland Jan 25 '17 at 19:06
  • Searching the manual I found the following manual entries: https://docs.blender.org/manual/en/2.92/compositing/types/converter/id_mask.html https://docs.blender.org/manual/en/2.92/render/layers/passes.html The explanation of ID Masks together with the list of passes and the information that you need to use cycles as renderer should bring you in a position where you are able to set everything up as explained. – bhloodyy Jun 10 '21 at 23:23

1 Answers1

14

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

Michal
  • 610
  • 5
  • 13
  • I see how you think :) I will try out your suggestion. – Max Kielland Oct 25 '13 at 15:44
  • 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... https://blender.stackexchange.com/questions/209038/cut-hair-particles-using-boolean-modifier – powerbuoy Jan 23 '21 at 15:44