I posted this elsewhere but did not get an answer so far. Maybe here somebody will know an answer. So, apologies for the cut/paste.
Maybe V-Ray matte or Primary Visibility are not the answer. So far I tried Primary Visibility, Hold Out, and V-Ray Matte options but none seem to give the desired effect. See pictures attached.
Let's say I want to render a scene with a tree. It's a dense poly tree, it takes a while. I am rendering these passes:
- The tree needs to be invisible in diffuse, but I need to see the objects in front of- and behind it (V-Ray Matte cuts to background, so I cannot see what is behind the tree).
- Also visible in rawLight, but still cast shadows, and still see the rawLight of the stuff behind it (same as above).
So far this is achievable with Primary Visibility off.
But I also need it to appear in multiMatte. With Primary Visibility off, it disappears from the multimatte/ID, which is fair enough. V-Ray matte works, but as above it doesn't work with the rest of the scene. Is there a way to make this work?
So far I am using render layers to separate the scene - one layer for everything (beauty, diffuse, rawLight...), and one layer just for the matte.
This works but doubles my render time (V-Ray will sample my geometry even with a surfaceShader material).
The scene itself goes from 1 minute to 2 minutes in render time per frame, but over 200 frames it adds up. I need to render it a lot back and forth to test lighting setups, so it kinda matters. But anyway it just seems like such an obvious thing I want to know if it's possible.
Example (instead of tree please meet mr cube):