Can Anyone Help With Some Simple Compositing?

I’m fairly new to using the compositor in Blender, and I just wanted to add some simple glare to the lights on a space station I’ve created. I got that far, but when I tried to mix the layers together with a screen mixer, as you can see the lights from the back of the station shine through to the front and I can’t figure out how to fix this. Here’s how I have it set up:
[ATTACH=CONFIG]471100[/ATTACH]

Thanks!

Attachments


Perhaps you need an ID mask layer to hold out the ship’s shape? If you don’t want to rerender try creating a mask of ship by increasing the contrast radically

I attempted that but I wasn’t necessarily sure how to connect the id mask to the overall image. Any thoughts on that?

I assume that you are using a separate material for the lights. These are the steps to get the effect you want:

  1. Put all your objects in the same render layer.
  2. Go to the material of the lights and assign it a pass index of 1 (or any other non-zero value)
  3. In the Render Layers tab, go to the Passes section and check the Material Index checkbox
  4. Render your scene
  5. In the compositor, you will notice that the Render Layers node has an output named IndexMA. Add an ID Mask node (Add > Converter > ID Mask), take the IndexMA output and plug it to the ID Mask node. Then, check Anti-Aliasing and set the Index to the number you chose in step 2. Then, add a Color Mix node, plug the output of the ID Mask node to the Factor input of the Color Mix node. Set the top Image input to black, then take the Image output of the Render Layers node and plug it to the bottom Image input.
  6. Connect the output of the Color Mix node to the input of your glare node setup.
  7. Finally, add another Colox Mix node, set it to Add. Connect the top Image input to the Image output of the Render Layers node, and the bottom Image input to the output of your glare node setup.

Now you have proper glare for the lights of the space station.