Cycles Light and Shadow Linking

That should not be an issue given that objects can be part of any number of collections.

One of the issues with light/shadow linking from my limited test in my personal opinion is the user experience. It’s kind of annoying to manage collections for light linking in certain circumstances.

An update to the UI could help, such as the proposed changes by Pablo Vazquez: Blender Chat
The most noticeable change is the addition of + and - buttons.

Specifically this proposed idea could be useful:

Ideally I think [the + button] could:

  • If there are selected objects, add them to the list
  • If there are no selected objects, pop up the search dialog to type an object’s name and add it quickly

Maybe an eye dropper (object selector) could be useful too?


It also helps if people learn about all the different ways lights can be linked to objects, as some are easier to manage than others. They are documented on the release notes page, but not all people have read them. Here are some videos showing the different ways.

Using an existing collection (Less than ideal for some situations):

Using the linking menu to link objects to lights (can be opened with Ctrl + L):

Drag and drop into Light Linking Collection (You can drag collections as well):

9 Likes

While we do want to give the maximum control to technical artists throughout the studio pipeline via collections, we are also aware that there are cases where simple list and couple of operators will bring the desired goal of a scene quicker. And we do want to make the latter use-case easier and more clear.

The interface changes you’re describing makes sense. There are some technical details in the code why it is taking longer that it seems it should, but it is definitely something we’d be working on next for the light linking project.

4 Likes

I also noticed that when using the ‘existing collection’ method, if you decide to remove an object from the light linking panel (using the little x), it deletes the object from your scene. Is that the intended outcome?

If a user decides to use the ‘existing collection’ method, It might be better to have Blender duplicate and rename the ‘existing collection’ to a linked collection so if someone decides to remove it, the object won’t be deleted because it still exists in the original ‘existing collection’.

It’s not deleting the object, it’s unlinking it from the selected scene collection. And if that’s the only collection it’s in, then it gets removed from the scene, and looks like it’s been deleted.

I think this behavior is just inherited from how light linking is kind of designed to be used. If instead of using a scene collection and you press the “New” button in the light linking panel. Then every object you add there will be in your scene and linked to the light linking collection. When you press the X button, the objects will be unlinked from the light linking collection, but leaving your link in your original scene/collection.

I understand why this is a desirable thing, but I personally don’t like this approach. Assuming there were no other changes made to Blender, this leads to an issue. You can’t manage which objects are inside the light linked collection through the outliner without adjusting the outliner view settings (most people won’t do that). And most people will use the “existing collection” approach because they can manage objects in the collection through the outliner.

Modifications could be made to Blender to keep the two collections in sync with the exception of the objects that have been Xed to get around that issue. But I’m not sure how easy this is or if it’s desirable.

Another issue comes to mind. Let’s just say you have a collection called Box and in it an object called Cube. If you link that collection to a light, it will create a duplicate collection called Box - Light Linking. Now lets say I press the X button on “Cube”. It’s gone from Box - Light Linking but still in Box. If I wanted to add Cube back to the light linking collection, how would I do it? I could use the link menu Ctrl + L or the drag and drop method in the UI. But then at that point it’s no different from Pressing the New button in the UI instead of using an existing collection.

Maybe a better solution exists?

  • Maybe Light Linking Collections are put in the active scene and viewlayer? And when you use an existing scene collection, it creates a duplicate of the collection with all the objects linked together? (Very similar to what you proposed, but now everything is in the current scene and viewlayer allowing for easy management of the collection from within the outliner)
    • This does have the issue that multiple lights can’t share a scene collection. And if all light linking collections are a “scene collection”, then lights can’t share collections at all.
  • Don’t use collections at all?
    • This will remove some of the flexibility of managing light linking collections in the outliner. And I believe there is a preference to using collections due to it being similar to how USD(?) handles light linking.
  • Maybe hide the X button when a collection is a scene collection?
  • Maybe if an object is linked to only one collection in the current scene and viewlayer, and you press the X button, a pop up appears “Are you sure you want to unlink this object from the scene?”
    • Maybe this sort of pop up will appear no matter how many collections the object is in, as long as one of them is the current scene and viewlayer.

Maybe someone else has a better idea.

Is there a convenient way to assign a linking collection to multiple lights? Copy to Selected (and Alt shortcut for that) is not enabled for the collection assignment.

CopyToSelectedOnLightLinkingCollection

Setting a collection as light emitter collection might be useful. (And maybe the same for light group too?)

As it is now we still get the bounce from the light onto the unlinked object, will this get fixed? :slight_smile:

And the behavior of the light on and off buttons are quite strange to say the least. Can’t really say that I understand what’s it doing.


Also when having both objects enabled the light will only shine on them (except for hat bounce that is), and then disabling one of them will do what you expect to not shine on that one, but then if you manage to disable both (this might take a while because of the funky behavior) the light will all of a sudden shine on everything else. I guess we can learn to live with that, but I still find it a bit odd.

And tbh, have a look how Maya does light linking, it’s much more intuitive than this :slight_smile:

1 Like

For various use cases, this is the desired effect (E.G. You use light linking to selectively light a character, and you want them to look consistent in mirrors, or through glass, or when they’re close to a diffuse surface, all bounce lighting effects). Maybe settings could be exposed to allow turning this off. But this decision will have to be made by the Blender/Cycles developers.

Note: You can reduce the max bounces of a light to 0 to get this effect now. It’s in the light settings section (the same place you change the light colour and strength)

Once again, this may be the desired effect. Turning off all light links results in the light linking to everything else.

This means that if you have a light and you want it to shine onto all objects except a few, then you can do that my selecting the objects you don’t want to shine onto, add them to the light group, then disable them, as opposed to adding every objects to the light group then disabling the ones you don’t want to shine on.


Obviously. Arguments can be made in both directions for both of these behaviours, and these arguments are valid. So we’ll probably have to see how the Blender/Cycles developers feel about this.

Yeah for some use cases this might be desirable, but that’s probably more of an edge case than general use. So a toggle for bounce or no bounce would be nice, but it really should be defaulted to no bounce.
Reducing the max bounces to 0 of the lights is a workaround that I personally wouldn’t use since you probably want the light to behave normally for the stuff the stuff that’s not light linked away.

It might be what they intended yes, but it still feels a bit odd.

I suspect we’re talking about different things. You can select a single light and set it’s light bounces to 0 while leaving the rest at their default. I’ve attached an image showing where it is. And since you’re changing the bounces to 0 only for the light that’s light linked, it will have no effect on the lights that aren’t light linked to other things.

Yeah I was talking about that one (accidentally wrote an S after the first “light”). It will affect how that light behaves with the other stuff in the scene which is probably not desirable.

Yeah sorry, I forgot about the case for when you want bounces between objects inside a light linked collection, but no bounces outside the light linked collection.

Sorry if this isn’t the latest thread regarding light linking. Any thoughts on something nice and simple for now (a light-linking option that could also be available in Eevee?).

I’m thinking of something like this mock-up (attached).

If I should be posting this elsewhere, please let me know where. Thx!

1 Like

This is the right topic.

This looks like the same functionality as light linking, just in a different panel and restricted to a single object? I don’t think implementing intermediate solutions like that is a good strategy, it costs significant time too that could be spent doing a proper implementation of features.

Okay, I’ve managed to catch up to where you guys are at (I was away for a long while).

Looks like this is only in Cycles at this point.

If this implementation isn’t intended to be ported over to Eevee at a later date, then maybe the image I posted might be suited to a simpler approach for Eevee users…? I expect that the bulk of them just want to stop a light from casting onto a specific object. That’s certainly the case that I ran into in a scene that Cycles could never render.

I should mention that, in the UI mock-up image above, it’s per-light; multiple objects can be excluded from illumination by that particular light.

Light linking is intended to be implemented in EEVEE at some point, but there is no concrete timeline for it. If we do it will use the same approach as Cycles, it would be the least amount of work to reuse the code that is already there.

I notice that the cycles standalone example scene_world_volume.xml doesn’t work in the blender 4 branch. Black image, and notably the only example which defines lights. The other examples appear to work fine. Is there something which needs to be added to app/cycles_xml.cpp in order to maintain nominal support for lights, now that we have light linking?

First of all, thanks for adding this to 4.0, it’s an amazing feature.

Keeping this Light Linking design should, in my opinion, come with a clarification on what the selection means to the rest of the scene. There’s currently no way to know what the selection means to the rest of the objects.

It could have a dynamic way of knowing what It meant to have the different setup right on the tab.

From what I understand there are 3 settings. Lets say that are 3 objects added.

3 enabled
- Light only affects the enabled objects
- Would show as “Everything Else Disabled”

3 disabled
- Light affects all objects besides the disabled
- Would show as “Everythign Else Enabled”

1 enabled
2 disabled
- Light only affects the enabled, the 2 disabled are ignored
- Where it gets confusing, would show… “Everything Else Disabled”?

My proposal - with a better design - would fix the confusion.



2 Likes

First off, a big thank-you for Light Linking in Blender. Very very cool.

Is there a way to quickly exclude an object from a bunch of lights in one go?

I set up a shot of a long hallway with lights along one wall (each light facing down like you’d see in a hotel). I tried a few methods to bulk-select the lights and add the floor object’s collection to Light Linking Exclude. However, when I do that, only the first light in the series ignores the floor object. In cases where there are many many lights, a way to quickly exclude a collection from a string of lights would be a nice-to-have feature.

In other news, some people are wondering if the bounce light on an object that’s excluded from a light is a bug. I don’t think it is a bug since I’ve seen that same thing in other 3D programs’ handling of light linking. I solved it in one program by just checking “Exclude Radiosity” for that particular object. That eliminated any bounce light hitting that object from the linked light (of course, that also eliminated all ray bounces for that object from all light emitters). Having said that, if you find a way to have bounced light accounted for in the Light Linking Exclude feature, I suppose it could be an option that the user could toggle on and off.

Hi There,

I am new to blender, but am coming over from Maya. I was looking for a simple way to handle lighting. In Maya they have attributes on the mesh itself, to either ignore shadows, or receive but not cast, etc.

I see here that Blender is using light linking after version 4. I can not find anything in the documentation to use light linking with the World environment light though. All of these light linkings assume you are grouping with a light in the scene.

I am lighting my scenes with an HDRI map in the environment texture. Is there a way to make an object, or material of an object excluded from that?

My use case is, I put image planes behind my exterior scenes and would like them to not receive light or shadows, or cast shadows. I make them emissive so they show up on reflective surfaces in my render.

Let me know if there is some other way, thank you!