Is this is correct way to combine environment and 2 render layers with transparency?

Hi! I am currently working on a large scene. Here is the view from one of the cameras.

What if i dont want to use ID Masks to combine different render layers?
I figured out one method but i dont now if its correct, it seems like it works, but maybe its just seems like…
So i am using here Environment pass for one layer. I combine two layers and then combine environment pass with layers.

1 - Is it correct?
2 - Should i enable also environment pass for the second layer and combine them both or this one Environment will affect both layers?

here is the node setup -


There seems to be no need or use for ID masks in this setup. ID masks give you something only if you need a mask for something that is combined with something else in the same render pass and you can’t or want to separate them into different render layers.

The second part about environment… Depends what you want to achieve. If environment has to affect lighting or reflections etc in the layer it must be enabled in the sense that it must act as an environment for that layer. Enabling the Environment render pass does not change anything in that. To use it as a background in compositing you only need it once so there is no difference, from which render layer you pull it in.

@kesonmis

Thanks, but i think you didnt read my question properly. I said there that i dont want to use ID masks, so i am looking for another method. And the question was if my current node setup is correct?

Yes it is.

If it looks the way you want it to, it is “correct.” :slight_smile:

ID masks are “just another way to identify things in a frame,” useful when other forms of identification (such as distance from the camera) won’t do what you want. ID masks let you select an object (or exclude one) based on “what it is,” which is a factor has no purely-visual corollary. Blender, being the one that produced the image, can identify which object-ID is responsible for each pixel in the frame: “why this pixel is there.” Very handy when you need them, but you probably won’t need them often.