Omit an object or material from render (while keeping its influence)


Is there a way I can omit an object or its material from the render pipeline, yet still keep the affect it has on other objects?
For example, I made a sky dome and I want the reflection of it to show up on my main object - but instead of the sky dome in the background I just want transparency.
So in the end the object and the reflection on the object (from the sky dome), but not the actual sky dome, are what should get rendered.

So I need to omit the sky dome from the render, yet leave its affect of the object (the reflection).
Sorry, I know I haven’t done the best job of explaining this. But if you understand what I’m saying and know of a way, please share.


You could put the dome on a separate layer so it affects other objects in the scene but not actually rendered itself
Example blend file attached. Cube on layer 1, background on layer 2, layers 1 and 2 active in the scene but only renders layer 1


background.blend (115 KB)