Lightgroups in Blender? (a proposal)

Somedays ago, somewhere on the net I saw a video showing a technique to fake lightgroups with Gimp (or Photoshop), placing several renders illuminated by one lamp at a time, in different layers, setting them to “add” blend mode, and then adjusting their opacity.
I thought: this is the discovery of hot-water!
Then I thought that Blender can do that internally, in the compositor node, setting proper render layers. Of course, the bigger the number of lamps in the scene, the more the setup is going to be complicate …until you reach the layer limit of 20, so you have to stop
But now, on with the proposal:
what if you can select/deselct lamps in the renderlayer node? or at least, to make it easier, select/deselect lampgroups. This way you could duplicate the renderlayer node, switch on just one lamp (or lampgroup) and add it to a mix node. then the same for the next lamp… and so on, to complete the setup. think at the power of it combined i.e. with ID nodes to limit this effect only for certain objects.
The best would be a “lamps node” which feeds the render layer node itself, populated with every lamp (or lampgroup) present in the renderlayer.
I know this sounds like a feature for lazy boys, but it could also be good to quickly test complex light setups (you dont have to worry too much about light intensity) or to help in faking light bounces, or just to avoid going through a looong render again because of a too bright area o too dim lamp…

what do you think?

You can do things a lot more advanced than that. If you render with normals and z-buffer passes you can totally relight a scene.

that link explains just this:

in the compositor node, setting proper render layers. Of course, the bigger the number of lamps in the scene, the more the setup is going to be complicate …until you reach the layer limit of 20, so you have to stop

If you render with normals and z-buffer passes you can totally relight a scene.
You mean something like this?
It is a cool technique, but doesn’t allow proper shadow casting.

I hope I’m not missing something, but i think my suggestion isn’t completely achievable now in Blender, unless you get crazy with many renderlayers (but then again you have a limit)


So here are the mockups (thx graphicall):

If you are interested, you can find a little more detailed explanation on Blender official forums:

Hope somebody has to comment on this

being able to create light groups and turn them selectively on off is in deed a nice feature.

the posted tutorial how ever is nothing new an old trick to fake maxwells multi light technique.

from what I understood light groups in lux do not create individual images which are simply
blended together - it saves the light information into different buffers.

this is slower than rendering without any light group but faster than rendering each image
in a different pass.

I am not sure if that is possible with blenders internal engine.

I googled vray and multilight and found some videos but I am not sure if those are composetings
or true multi light renderings. the do not show the interface.

Couldnt these just be scenes with different light layers active in each, then you mix them in the comp nodes?

as you know, it takes time to set renderlayers in order to achieve this feature, and if the light setup is complex it might take A LOT of time.
Besides that, in this proposal i mention the layer number (20 so far) that can limit the workflow.
I’m going to prepare a last mockup of an alternative node that could simplify even more the job


I think you have already a good proposal.

Grouping lights together and being able to turn them on and off is something
that could work fine.

I would not mind seeing that feature being put into the outliner where you can
browse via object type.

The only thing that might be hard to put in there than is a 0 to 100% slider for
influence of that light group.

IIRC from coding the colored shadows feature, each light is evaluated separately in the render code (i.e. for each lamp, a discreet result is returned). They are accumulated for a final result. There’s no reason that those lighting results couldn’t be broken out into separate node outputs.

I’m no expert on the render code, but I don’t think this is a tough one. Thus, a nice proposal articulated with illustrations and examples might be a good thing to have before the material/render recode.

I figured out it works something like that internally, so as promised, here is the final mockup,
and let’s hope somebody can get interested in an implementation…


hey that sounds like a possible way - in particular with blenders node system.

i am curious abut what the devs would say

What’s wrong with using render layers?

edit…uh, aside from not actually reading the OP?

Aside of the layer number limit, that might not be a problem in the future in case of a layer system overhaul, as mentioned before setting renderlayers can be a big waste of time, especially if you just want to do this lighgroups stuff, which is something that the engine already does internally. The issue here is to give the user the ability to mix the light contribution by hand instead of having Blender doing it blindly and silently

thats really a good proposal lsscpp. I have dealt with large scene with wasting time on that stuff. Hope the dev hears you…

A great feature indeed.

It seems one of those simple things that makes a big difference. I like the freedom and flexibility it brings, and I guess it could be even more powerful than the lightgroups solutions in some other rendering softwares, since it’s integrated.

You could for instance (after doing the"final" render) add a couple of lights more to an already illuminated scene, only render that lights channel alone, and then just composite them together with the previous “final” render (which may be automatic, you have your nodes already set)

Or if you see that one area light brings some noise and needs a few more samples… you just render again that single light channel alone!. And then composite.

The ability to tweak every light “channel” without caring too much how you set them at the beggining feels like a great workflow, and gives a lot of artistic freedom when being able to grab any light channel and pass it through any combination of nodes. And speed for tweaking, letting you for instance turn lights on and off to see which one is bringing more noise to some area.

This functionality is definitely important. But I would suggest some changes.

First, referencing this:
I think it’s important not to make a special “light group” type. We already have a group system, so let’s use it. This keeps things generic. If we add a new group system every time we want a feature that involves specifying a collection of objects, things will quickly get bloated.

Second, referencing this:
Instead of a check box for a “light groups pass”, we can specify an optional group of lights for a render layer to render with. This would be similar to how you can optionally specify a material for a render layer to use. Just it’s a group with lights in it.

This fits a lot better with how Blender already works, IMO. A pass is supposed to represent a single output from a renderlayer node, and the current proposal misuses that concept, and will confuse a user when the “lightgroups” pass ends up behaving so radically differently from the other passes.

Hmmm… I’m confused now. Just for the hell of it, I checked Blender’s existing renderlayer functionality, and the ability to specify a group of lights to use already exists.

So I’m wondering what use-case is actually lacking here? It seems you are proposing redundant functionality.

Just to be clear: there is no render layer limit in Blender. You are confusing layers with render layers. Layers are limited to 20. But I tested just now and had no trouble adding 100 render layers.

Yep, it’s all there.

That’s one of Blender’s characteristics. Sometimes you don’t have very specific features with fancy names, and seems something is missing, but you have all the “ingredients” to achieve that.

Sometimes mixing those ingredients feels like workarounds, but this is not the case at all. You set your groups of lights only once, and just hit render.

What I didn’t find is a way to “mute” a Render Layer, so you can render only the layers you need with only the lights groups you want to render.

It does indeed appear that this is a redundant proposal.
I made this quite easily:

6 light, 3 groups, 2 lights per group.
3 render layers, each with one light group assigned.

Obviously the node setup could be even simpler, but I wanted to see the brightness of each set of lights prior to being added together.

The render times between this and just rendering directly (without renderlayers/compositing) are very comparable: only about a 10% difference.

(You’ll note this was done in 2.5. However, the same features are in 2.4x, so it should be doable in 2.49 as well.)

It’s a beautiful technique. It seems you can forget about light color saturation and intensity settings and manage them completely in the compositor.

Here I’ve set 3 “neutral” lamps. They all have energy set to 5, and color set to H=0.5, S=1, V=1 (each on a separate render layer):

That way they have enough energy, color and saturation to be tweaked then with a HSV node for each:

Another example just tweaking the HSV nodes: