Light Groups in Cycles

Recently, I found myself wanting more control over how the lighting of my renders look in Cycles so I found a way to use light layers in the compositor.Now this isn’t real light groups like in Indigo Renderer or Luxrender but this technique still allows you to have a lot of control over the lights in post. It works by rendering each light by itself then mixing them together in the compositor. You could also do this in Photoshop if you want, but I’ll just do it in the compositor.

First, you want to render each individual light by itself. This also includes any Global Illumination, so when rendering each light make sure that the World color is pure black. Then later you can render just the Global Illumination on it’s own. For the examples, I just made 3 basic lights lighting a chess piece. The chess piece was modeled by “z0li” on Blendswap which you can download here. Here are the 3 images that I will be using:

Render with just the purple light.

Render with just the purple light.

Render with on the orange light.

Render with on the orange light.

Render with only the blue light.

Render with only the blue light.

Now you’re going to want to setup the nodes. Add all the images, then connect each of them to their own Mix node. Make sure that you connect it to the bottom socket and then set the top socket to pure black. The factor for this Mix node will determine the brightness for each light. After doing that for all three images, connect the first two images together with a Mix node set to “Add”. Then connect that to another Mix node and put it in the top node socket. In the bottom socket, put the third image in. If you have more lights (more images to mix) then just keep on doing the same thing. If that was kind of too confusing, here is how the node setup should look like with 3 images (3 lights):

How your nodes should look like with 3 lights.

How your nodes should look like with 3 lights.

Now you can play with the brightness of each light by changing the factor of the first Mix nodes. Here are some examples of turning the lights off:

Turning the Mix factor to "0" for the purple light.

Turning the Mix factor to “0″ for the purple light.

Result of turning the Mix factor to "0" for the purple light.

Result of turning the Mix factor to “0″ for the purple light.

Turning the Mix factor to "0" for the orange light.

Turning the Mix factor to “0″ for the orange light.

Result of turning the Mix factor to "0" for the orange light.

Result of turning the Mix factor to “0″ for the orange light.

Turning the Mix factor to "0" for the blue light.

Turning the Mix factor to “0″ for the blue light.

Result of turning the Mix factor to "0" for the blue light.

Result of turning the Mix factor to “0″ for the blue light.

You can also make the lights brighter too:

Turning the Mix factor to "5" for the blue light.

Turning the Mix factor to “5″ for the blue light.

Turning the Mix factor to "5" for the orange light.

Turning the Mix factor to “5″ for the orange light.

Now, you could have just changed the brightness and everything within Blender but this could be useful if you were to lose the original .blend file, you could still edit the render. Also, you can have even more control in Photoshop.

Rendering it just out of Blender and compositing it together will give you the same results if you mixed them together right. So you don’t have to worry about it ruining your image. You can compare the two images by opening them both in two different tabs.

The final raw render with all the lights on in the same layer.

The final raw render with all the lights on in the same layer.

Final composite render after mixing the individual lights together.

Final composite render after mixing the individual lights together.

If the written tutorial was way too confusing (I hope it wasn’t), I made a quick recording of the process if that’s easier to follow. I recommend watching it in HD and full-screen, so that you can actually see what’s going on.

This technique is really just to edit it after you render out your image. I’m still looking for away to make light groups without having to render each light individually.  Real light groups in Cycles is planned to be developed soon (as you can see here), but until then I’m going to try to find a way around it.

About these ads

6 thoughts on “Light Groups in Cycles

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s