6
$\begingroup$

In cycles, how can I make an object opaque to the camera, but transparent to light?

I know this can be done in compositing, but is there a way to do it at render time.

$\endgroup$
1
  • $\begingroup$ When you say transparent to light, do you mean that the light that hits the object is unable to color any of the other objects with the first object's color? $\endgroup$ Commented Mar 5, 2015 at 2:06

3 Answers 3

7
$\begingroup$

You can do the same as you would if you wanted to make the object invisible to the camera yet still cast shadows etc, only in reverse:

enter image description here

This is equivalent to disabling Shadow ray visibility as NoviceInDisguise answered, but with nodes instead. Note that disabling the ray visibility in the object panel helps rendertimes a little more than using nodes, but if you want to use it inside a larger setup it may be necessary to use nodes.

$\endgroup$
5
  • $\begingroup$ Wait, isn't the shadow option done on an object by object basis? $\endgroup$ Commented Mar 5, 2015 at 2:31
  • $\begingroup$ @FranciscoChavez-Tejeda Yes, that is one other difference. $\endgroup$
    – gandalf3
    Commented Mar 5, 2015 at 2:37
  • $\begingroup$ @FranciscoChavez-Tejeda As gandalf said, yes, but also no, you can easily copy the option to as many objects at once as you want. $\endgroup$
    – J Sargent
    Commented Mar 5, 2015 at 2:38
  • $\begingroup$ Sorry if this is a dumb question, but why would we need to use the nodes option in a larger setup? If we can turn off the shadow option on an object by object basis, can't we just do that? $\endgroup$ Commented Mar 5, 2015 at 3:00
  • $\begingroup$ Thanks, this is exactly what I wanted and worked beautifully. $\endgroup$
    – deltaray
    Commented Mar 5, 2015 at 13:36
6
$\begingroup$

Uncheck Shadow in the Ray Visibility options.

Ray Visibility > Shadow

Example Usage

This makes it so that the object does not cast shadows, and as you can see, the plane is illuminated as if the sphere was not even there, while the sphere itself is still illuminated properly.

It can be tedious to set this setting for each object, so there is a shortcut. Select all the objects you want to have this setting, then change the setting (all still selected) and right-click on the checkbox and choose Copy to Selected.

Set Multiple

$\endgroup$
2
  • $\begingroup$ Your solution is nice and would work great if all I wanted was to prevent shadows, however I also don't want the objects blocking the camera view to show up in reflections either. I guess you could also uncheck the other ray visibility options as well (except camera). $\endgroup$
    – deltaray
    Commented Mar 5, 2015 at 13:37
  • 1
    $\begingroup$ @deltaray Just do the same for the Glossy option. You should find that it works perfectly :) $\endgroup$
    – J Sargent
    Commented Mar 5, 2015 at 15:35
1
$\begingroup$

I'm just guessing here, so I could be wrong. But the "Light Path" node has an output value that tells you if the light ray is heading for the camera.

enter image description here

You might be able to use this as the fac input of a "Mix Shader" node. It might still generate a bit of a shadow because some of the light is being blocked by the object.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .