How to use a mesh to reveal an object

How can you use an object to mask out objects in blender? As in, a cube perhaps that hides a circle, and then the cube is animated to reveal the circle.

I want this cube to act like an eraser almost; Any part of the mesh it encapsulates needs to disappear, however the remaining portion of the mesh that is not "subtracted" should remain visible. Of course I want to be able to specify a specific mesh that the mask effects.

Also a way to fill in the gaps in the mesh that effect would create automatically would be needed in many instances.

Is this possible? If so, is there another way to achieve this?

Here is the link to the model.
I want the cube to be invisible, and as it rises I want it to reveal the sphere, which is also invisible while it is inside of the cube.

• @NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ I can. Some people seemed to suggest that, but I am pretty much a noob at blender and have no idea how to composite. Give me a moment please, I will get a link up there. Also, I am using cycles. – CAA14 Aug 23 '16 at 1:06
• @NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ It is uploaded. – CAA14 Aug 23 '16 at 1:13
• – user1853 Aug 23 '16 at 5:08
• I have edited the question to better show the OP's original intent, as they wanted more of a slice than a mask effect. (information from Dropbox comments: dropbox.com/s/j7ujlr2np71esql/revealSphere.blend?dl=0) – VRM Aug 23 '16 at 15:26

This is fairly straight-forward, there are two things you need to do:

1. Make the cube subtract from the sphere, and
2. Make the cube invisible to the camera so it doesn't render

First, select the sphere and add a Boolean Modifier to it, setting it to difference and making sure the "Object" option is set to the cube.

Now go ahead and set the maximum draw type for the cube to Wire in the object settings.

You should get a result like this:

Scroll down a little farther and under Cycles Settings un-check all the check-boxes.

When you render you should have a result like this:

• Thank you so much! This takes care of what I needed. I cannot believe I didn't think of this but this will work splendidly. – CAA14 Aug 23 '16 at 15:47
• Another option for hiding the cube is to put it on a layer that is not part of the final render. – Mutant Bob Aug 23 '16 at 20:56
• Indeed, however I prefer to keep empties and objects that are causing an effect to remain on the same layer that effect is caused on, just keeps things more organized. One could also use ALT+H, does the same things really. – VRM Aug 23 '16 at 21:10
• Or for example click the "camera" icon next to Cube in Outliner ;). – Jan Matys Sep 27 '18 at 23:07

If you only work in Cycles and need an object that hides all Objects behind it... you could use a Hideout Material on it.

• But won't that just leave a huge gap of pure alpha in the render? Also, I want this mesh to hide a specific object – CAA14 Aug 23 '16 at 0:38
• yeah that would leave a pure alpha in the render... – Stillnotstatic Aug 23 '16 at 0:46
• i think instead... you could give the object you want to hide a material that is mixed with a transparent bdsf and control the mix with an animated color ramp for example... or render that object in another render pass and hide or reveal the object in compositing. – Stillnotstatic Aug 23 '16 at 0:50
• Perhaps there is a more elegant way idk... but that's how i would do it. – Stillnotstatic Aug 23 '16 at 0:51