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
-
2$\begingroup$ Can you post the .blend file? Are you doing the masking in the compositor? $\endgroup$– Todd McIntoshCommented Jun 7, 2015 at 0:48
-
1$\begingroup$ related: blender.stackexchange.com/questions/23287/… ? $\endgroup$– p2orCommented Jun 7, 2015 at 8:54
-
1$\begingroup$ Or this one, you can use object index or material index to get just the part you want masked. $\endgroup$– samblerCommented Jun 7, 2015 at 11:07
2 Answers
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.
-
1$\begingroup$ Perfect! Thats exactly what I'm looking for! $\endgroup$ Commented Jun 8, 2015 at 20:23
-
$\begingroup$ But how does one render all the layers at once? $\endgroup$ Commented Jul 31, 2016 at 3:41
-
$\begingroup$ If you've set up the Render Layers as in the screenshot, and they are all checked, they will all get rendered as separate layers when you hit the render button. $\endgroup$ Commented Jul 31, 2016 at 7:18
- Consider animating restrict render. As in View Visible, Select, Camera Render
-
$\begingroup$ I do actually use that a bit, but in this case I'm looking for something that lets me mask out a part of an object, instead of just the whole object $\endgroup$ Commented Jun 8, 2015 at 20:23