0
$\begingroup$

I would like to configure an object to ignore one particular light source (sun) in Cycles - to receive no light from the sun. Is this possible? I've looked online, but most posts I found were either 5+ years old, or were unanswered.

I have made a sample file with a cube and a sphere in two different collections. I would like the sun to cast light only on the sphere, not on the cube. Sample

$\endgroup$
  • $\begingroup$ I see some answers that use Compositing, so I guess it still works in 2.8. Someone asked the same question in january: blender.stackexchange.com/questions/129575/… $\endgroup$ – moonboots Aug 7 at 7:21
  • $\begingroup$ That is true, but the answer in that question suggests using layers, which are no longer present in 2.8 - for example, the answer says "In the light's property at right, tick This Layer Only box.", but there's no checkbox like that in 2.8 anymore. I know about the concept of collections, but despite moving objects to different collections, they're all still lit by the sun. $\endgroup$ – Ondrej Aug 7 at 15:16
  • $\begingroup$ I have edited the question $\endgroup$ – Ondrej Aug 7 at 15:23
  • $\begingroup$ Only one light source? Meaning other light should light the cube? $\endgroup$ – lemon Aug 7 at 15:28
  • $\begingroup$ Yes, but the reason for my question is because I just need to selectively exclude an object from receiving light from a light source. $\endgroup$ – Ondrej Aug 7 at 15:30
0
$\begingroup$

After some reading through documentation, which is currently not entirely precise on this particular topic, I have found out and proved in practice that the way to solve my problem is indeed using two view layers. My scene now includes two collections - one contains the first set of objects and their light source, the other one includes the object that is not to be receiving light from the first collection's light sources. The view layers then control the visibility of each collection and its contents. This means that during render, each view layer/collection is rendered separately, and both rendered outputs are then combined together in compositing.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.