3
$\begingroup$

Sorry in advance if this has been answered.

Is there a way to set each of my 3 lights (key, fill, rim) up in such a way that Blender will render them all individually?

I have looked into File output in Compositor, and have thought of Render Layers, but have come short of a solution?

It should be mentioned that my lights are not lamps, but planes with emission shaders.

$\endgroup$
2
$\begingroup$

You may noticed, that Cycles is lacking a certain Blender Internal functionality which would help this. Mesh lights don't have a This Layer Only option.

My suggestion would be to use a python script.

Reserve one layer each for your specific lights. Store the specific lamp objects on each layer. You mustn't have other objects in these layers, but the scene should still be intact if either of the layers was switched of.

In my example case I will place a key, fill and rim object respectively in layers 0, 1 and 2.

These settings are specified in an array at the beginning of the script.

import bpy

lightLayers = [
            [0, "key"],
            [1, "fill"],
            [2, "rim"]
            ]

layers = bpy.context.scene.layers
filePath = bpy.context.scene.render.filepath

for i in range(len(lightLayers)):
    for j in range(len(lightLayers)):
        layers[j] = 0
    layers[i] = 1
    bpy.context.scene.render.filepath = filePath + lightLayers[i][1] + "/" + lightLayers[i][1] 
    bpy.ops.render.render(animation=True)
bpy.context.scene.render.filepath = filePath

My render output is set to: "//images\".

Pressing Run Script will execute the script.

Each Light Layer is switched on, the others off (none Light Layers will not be affected), then the scene is rendered.

This will produce the following.

enter image description here

$\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.