In my scene it is required to position the lights close to the main object like this:
How I can make the light source invisible to the camera?
You can turn off Ray Visibility of the 'emission object'. In Blender 3.0+ go to Object Properties > Visibility, open up the Ray Visibility panel and disable the Camera property:
As of Blender 2.8x, Ray Visibility panel is now part of the new Visibility Panel:
As of Blender 2.76 the Ray Visibility panel was renamed to Cycles Settings:
Blender 2.7x
You can also run the following script to toggle the Camera Ray Visibility for all selected objects:
Blender 3.1+
import bpy
for obj in bpy.context.selected_objects:
# toggle mesh lights
if obj.type == 'MESH':
for slot in obj.material_slots:
if slot.material:
for node in slot.material.node_tree.nodes:
if node.type == "EMISSION":
obj.visible_camera = not obj.visible_camera
# toggle light types
if obj.type == 'LIGHT':
obj.visible_camera = not obj.visible_camera
Blender 2.8+
import bpy
for obj in bpy.context.selected_objects:
# toggle mesh lights
if obj.type == 'MESH':
for slot in obj.material_slots:
if slot.material:
for node in slot.material.node_tree.nodes:
if node.type == "EMISSION":
obj.cycles_visibility.camera = not obj.cycles_visibility.camera
# toggle light types
if obj.type == 'LIGHT':
obj.cycles_visibility.camera = not obj.cycles_visibility.camera
You can set up a custom emission material by adding another Transparent BSDF and determine the (camera) visibility of each shader at render time by using the Is Camera Ray output of the Light Path node that serves as the Factor for the Mix Shader node:
Note: @gandalf3 mentioned that disabling the Ray Visibility is slightly more efficient performance-wise than this node setup.
Well, in Blender 2.79 just turning the camera ray off did not work as I expected. So I did a new trick. It Works fine for me.