I’m struggling to figure out how to do this. I want to have a cube rendered to an object buffer (so that all of its faces would appear as solid white in the buffer), but not show up in the regular RGB pass. I’ve tried using the compositing tag to hide the cube from the camera and set the object buffer to 1, but doing this hides the cube in both the object buffer and the rgb pass, which is not what I want. I’ve also tried putting a transparent material on the cube, but this also hid the object from both passes. Surely there’s a way to hide the object in the rgb pass but not the object buffer, right?
Of course I could just do two separate renders, but that’s not particularly convenient and it’s not the best long-term solution. Is there any way to get the result I’m after with a single render? If so, how?