In the image, you see I have a mech, a emission plane and floor and walls to reflect the light. Now I am ready to render, but I do not want the emission plane or floor/walls in the render. How do I remove them from the render?
2 Answers
A simpler way to do this than with a material like Leander mentioned is you can disable the cycles camera setting on the object found in the object tab of the properties window. Of course, this is faster if you have more materials than objects and the other is easier if you have more objects than materials (because this is a per object setting). If you want to script this, select all objects and run the following in the text editor:
import bpy
for obj in bpy.context.selected_objects:
bpy.context.scene.objects.active = obj
obj.cycles_visibility.camera = False
In cycles, use the Is Camera Ray attribute of the Light Path node. For the camera ray a Transparent BSDF will be rendered, for all other rays the previous shader stays the same.