8
$\begingroup$

Is it possible to use the rendered output of one renderlayer in the materials on another render layer?

How can I achieve this?

$\endgroup$
9
$\begingroup$

Yes, this is possible.

You can achieve this with an Image Sequence Texture node:

  1. Set up two render layers with each layer excluding the other:

    enter image description here

  2. Set up compositing nodes so the render layer that is being used to influence the materials renders out to a separate directory.
    This is possible with the File Path node:

    enter image description here

  3. Render only the influencing layer once to that directory by Pinning enter image description here that render layer.
    The file will be named something like Image0001.png. Rename it to Image0000.png

  4. Set up the material you want to be influenced.
    You can pull in the result of the other render layer by adding an Image Texture node, setting the image to Image0000.png, setting the Source to Image Sequence, and setting the Offset to -1

    enter image description here

    This is the result of the other render layer.

  5. Render the animation. (CtrlF12, or Info > Render > Render Animation

Here is a simple test with two spheres (one on each layer) and a moving light source:

enter image description here

Keep in mind that with this technique, the two layers are one frame apart. This could be fixed by rendering the influencing layer completely beforehand, and adjusting the offset accordingly.

| improve this answer | |
$\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.