Let's assume we have a cube and a sphere. from the camera angle, we will see a cube behind a sphere.
I need to hide the sphere from the beauty pass but still, I need to have a mask for this sphere.
what I have tried is that, I turn the sphere visibility off. and create an Aov mask for it. but once I turned the visibility off the mask goes off too.
I also tried to make a shader for this sphere with opacity. but it ended with no Masks too.
I tried to work with ray switcher and trace sets but without any results too.
so what should I do to achieve this result ?