View Full Version : Using an object as a stencil ???
06-25-2007, 01:33 PM
Is it possible to use an object as a stencil....so you can hide another object with it. I hope I'm making myself clear, just as in AfterFx where you can use one layer as a mask to hide another, or just part of another layer (depending on the shape).
Thanks in advance
All the best.
Lasse Kalhauge Kramer
06-26-2007, 07:43 AM
You could probably set up a pass where you render out an alpha pass of your stencil object, make the stencil object white everything else black. Then take this pass and read it into a maya file node, the maya file node can read in animations as well. Then project this pass from the camera somehow onto the object you want it to mask using it as the cutout.
Or if that whole project from the camera thing can't work. Just render out the stencil object pass, then render out another pass of just the object you want to clip with the stencil and then do it in post.
Other than that, I don't think you can.
06-26-2007, 12:59 PM
In 2d composting the question is what is in front and what is in the background, so we layer with masks. In 3d an opaque object will occlude the objects behind or within it, so this will happen automatically. for transparent objects turn off visible in refractions and use ray tracing, this will make the object disappear behind a transparent object. There is also 2 Mental Ray shaders that can do some very specific inclusion/exclusion based on different ray type, called raytype and ctrl_rays.
06-26-2007, 02:00 PM
May be what lasse74 needs is just geometry with Use Background shader assigned to it. When you put the Reflection Limit and the Shadow mask of this shader to 0, everything behind geometry shaded with it will simply not render. If you want to mask only certain object/s but not all that are behind, you have to use render layers or equivalent method.
06-26-2007, 06:19 PM
I think it all took me a little closer to my goal....
06-26-2007, 06:19 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.