In my scene, I needed to hide a group of elements from the camera, so I hid them behind a simple plane with a holdout shader and as expected, the objects were invisible to the camera.
But here is the interesting part, later the client asked for some modifications and one of them required the scene to be seen behind a glass. So naturally I added the glass element - it was an automatic door - and to my surprise found a strange black square out of nowhere. Analyzing my scene I finally found that the problem was in the combination of the holdout material and the glass shader.
So the holdout shader works fine when seen directly throw the camera, but if I add a glass element between the camera and the holdout, then the holdout element becomes visible as black to the camera.
I tried switching off the transmission property on the cycles settings of the object but the result was that the holdout element became invisible to the camera BUT it stops hiding the elements behind it.
I finally resolved it in practical or artistic ways, like moving the objects away from the field of view or just changing the perspective of the camera. But the problem remained.
To clarify I attach some pics and a blend file to test the effect. BLEND FILE: you will see two views of camera. Switch one of them to renderview and play in the outliner, hiding or showing the elements to see what I mean.
Apparently I can't post more than two links so I had to put everything into a RAR to share only one link.
To clarify let's see what you will find on the pics:
We have a simple cube: H01.JPG
We want to hide it so we add a plane with holdout material: H02.JPG
The cube becomes invisible to the camera. Now let's add a glass object in front of them to see what happen: H03.JPG
Houston! Now the holdout element, which was supposed to be invisible is visible to the camera and looks black as the night!
- Let's try to turn off the transmission property of the holdout element to see what happen...: H04.JPG
As you can see the holdout element becomes invisible to the camera through the glass but is not a holdout element anymore! Now we can see the cube...!!!
IMAGES + BLENDFILE:
Any idea is welcome!