Compositing with render layers that are unchecked I am making an animation that has two render layers RL1 and RL2. Frames 1-10 contains only RL1, Frames 11-20 contains a mixture of RL1 and RL2, Frames 21-30 contains only RL2.

In order to save time I have animated the check mark (see picture) of the RL1 and RL2 so that they are only checked in frames 1-20 and 11-30 respectively.

The compositing nodes are shown as the picture below. Frames 1-20 outputs what I want. However, between frames 21-30 the output becomes black as RL1 doesn't output an image.

Are there any neat ways to ignore a render layer with no output?



This link is the closest answer I've found:
"How to stop rendering a renderlayer at any moment of the animation?"
However, as gandalf3 admits, the method doesn't work if the render layers contain alpha values
It could be more efficient not to animate the renderability of the Render Layer rather than to animate amount of samples for that Render Layer instead. 

Find and animate Samples option which will override scene setting for samples. 



This amount of samples can be set up for each Render Layer separately. So when that layer should be empty, drop the samples amount to some small value (but not to 0 as it will mean default which is the scene values) and the perfomance will be increased. 

The layers still will be overlayed; you can bypass data from one of them animating the Factor of the Alpha Over (or Mix) node (e.g. setting it to 1 to make only bottom layer visible).