Is it possible to turn off primary rays for an object using shaders rather than unchecking the "Primary visibility" on the shape node. I want to achieve this so I can feed networks into AOVs.
So I want to achieve like the image on the right, but do it with shaders rather than using the shape node attribute for Primary visibility.
Thanks
Alan.
Solved! Go to Solution.
Solved by maxtarpini. Go to Solution.
I don't think that's possible. By the time shaders are evaluated, Arnold has already determined that the object is visible (or not).
Yup, that occurred to me last night!
You mean the reflection in the ball ? But he asked for 'primary rays' 😉 ie. that would occur also by turning off 'primary visibility'. You can plug the transpmat into specular reflection slot.. the only problem is that the part exposed to the background would still be visible (see black spot in refl sphere)... one can fix that by using a dome sphere.
No, I just meant I thought of the same thing as you, and I was echoing your suggestion (you beat me to it, when I went to post my answer you had already answered)
I just put in the chrome ball to show that I had "turned off" primary visibility, but left everything else.
Awesome that's great, so I can now use userData variables on objects to turn off visibility of objects in AOVs - retaining their reflections etc in the AOV.