In the Object Properties tab i can choose the ray visibility of that object. In other words I can choose if that object is visible on camera, if it casts shadows on diffuse shaders, on glossy shaders, and so on.
Is there a way to choose on which objects it will have ray visibility? Maybe a trick using layers? What I want is an environment HDRI that is visible reflected on a glossy object A, but not on another object B.
EDIT: I saw the question was marked as a possible Duplicate, but maybe I need to explain my question in a better way.
I don't need to remove the environment reflections from the glossy objects. Both the object A and B have a glossy component in the node tree but I need:
- the object A to reflect/refract the environment map with all its material components (glossy, diffuse, glass, etc...);
- the object B to NOT reflect the environment map with any of its shaders.
I can choose which kind of shaders an object casts (in the Ray Visibility panel) but not on which objects it casts it (and that's what I need).