# Composite interior and exterior separately

I'm trying to make an interior scene where I want to composite the exterior separetely form the interior. So, before I go any further I want to set up the layers to accomplish this.

In Layer 1 I've got just the interior:

Layer 2, the Sun and the Earth without the atmosphere:

Layer 3, just the Atmosphere, which I need to blur.

How can I composite the interior and the exterior separately and the join them? I'm fairly new to compositing so I don't have a clear idea to do this, specially with the window in the way.

EDIT:

This is how I've set up the three different render layers:

Layer 1:

Layer 2:

Layer 3:

And this is the result using the Alpha Overlay in the Compositer:

Thanks,

• The first thing you have to do is to enable film> transparent and get rid of the background (the stars and sky) on the first image, and use it as a separate element. Then use Alpha over to composite the layers in the order you need them. See this related links: blender.stackexchange.com/questions/57610/… and blender.stackexchange.com/questions/38452/… For the atmosphere layer use a color mix node as add or screen mode – user1853 Feb 11 '18 at 16:47
• – user1853 Feb 11 '18 at 17:00
• @cegaton I can't get it to work, there's no transparency in the first layer (because of the window?) – cuoka Feb 11 '18 at 18:04
• It's hard to guess how you set things up. All we know about your project is what you've posted so far. How did you create the background? – user1853 Feb 11 '18 at 18:18
• @cegaton It's just an HDR, please, tell me what else do you need and I'll update my question. – cuoka Feb 11 '18 at 18:26

With the help of Cegaton I've found the solution. The main problem was that the window is in the way so it has to be rendered separately. This way there's a hole in the first layer without the background so later on the Alpha Over node can be used.

So, in this case, four render layers are necessary:

Layer 1:

In this layer is the foreground, just the spaceship but without the Window, masking the rest so that there's a transparent hole in the window.

Layer 2:

In this layer it's the Earth without the Atmosphere.

Layer 3:

Just the atmosphere in layer three.

Layer 4:

Here is the Window:

And finally, here's the compositor node setup: