Compositing multiple scenes and passes with transparency I am trying to composite some render layers from two different scenes:

Main scene has objects and mist pass, transparency in world setting enabled.
Sky scene has only sky environment and transparency in world setting disabled.

What I want to achieve is to have the sky in the transparent area of the main scene, and to use the mist pass to add mist to the objects but not the sky, it should only affect the objects.

Main scene with objects:



Main scene mist pass



Sky scene
You can use the alpha channel of the trees renderlayer as a mix factor between the sky and the trees:



You can combine the Mist pass with the trees however you like, just replace the screen node with whatever nodes you want.