A compositing graph becomes ambiguous if a render target node is connected to a render pass that is shared between two render layers. The question arises as to which layer the render target would take its render pass result from.
You can avoid this ambiguous case as follows:
shadingNode -asRendering renderedImageSource;
If a render target is not connected to a specific render layer, it will, by default, render in the master layer using the render settings from the master layer. You can override these render settings by creating a render layer and connecting it to the render target. This way, the render target renders in the context of the render layer.
You can do this in the Hypershade by connecting the message output of the render layer to the renderLayer input of the render target.
You can create a camera override by connecting a camera to the camera input of the render target. This signifies to the render target that all upstream connections in the compositing graph will use this 3D camera. This way, you can combine, in your pre-composite, the 3D output from different cameras.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License