If you’re familiar with Cinema 4D I’m sure you are aware of the Matte Object setting in the Compositing Tag. Comes in handy for compositing purposes. Especially when objects start criss crossing over each other and using mattes starts to get hairy. Basically, the object renders fully opaque with an alpha value of zero and cuts a hole where the object would have appeared. I use it all the time and recently I found myself looking for the option in Houdini. Well, it couldn’t be easier.
Matte Shading Option
If you were to look for “Matte Object”, you won’t find it. However, you’re close. In Houdini the functionality is called Matte Shading and it’s found in the Render tab of the Geometry node at the object level. Just turn it on and you are on your way to glory.
So imagine I have this contrived image of the now infamous pig head and his toy companions. I have a few ribbons swooshing across the front. What I want to do is cut out the middle ribbon. Notice the full alpha values.
You may be thinking “Well, why don’t you just render out an “object buffer“ or a matte for it?” We could but that would totally ruin this #QuickTip. Plus, it’s just an extra trick in your arsenal.
So if I go ahead and turn on the Matte Shading option for the middle ribbon object, I get the same functionality as the Matte Object in Cinema 4D.
Now, as you can see, I am able to cut right through the geometry behind it. Remember, it’s at the object level so if you need to grab specific geometry from within other geo objects, use the Object Merge operator to pull in the geometry.
There might be other ways to accomplish the same through the render properties and VEX shaders for more complex setups since this is actually using the “matte” shader, but I haven’t experimented that far. This simple option worked nicely and as expected for what I needed.