Using Compositing for Semi-transparent object effect I am new to compositing and find the whole thing thoroughly confusing. 

I wanted to create the animation of a planetary gear mechanism and make the outer rings semi-transparent so that the inner workings would be better visible. As you can see from the following image I have been partially successful:



I placed the inner gears on physical layer 1 and the outer rings on physical later 2, then created two render layers: RenderLayer1 incorporates physical layer 1 and RenderLayer2 physical layer 2. The image above was rendered while both layer 1 and layer 2 were highlighted. The compositing layout is as follows:



Frankly I don't fully understand this layout myself, it was created through trial and error. As you can see, the inner and outer wheels are rendered as a single scene: they cast shadows on each other. This is apparently because I have highlighted both layers. I would prefer, however, that each layer be rendered independently and and then combined but in such a way that the Z-index is taken into account, just like it is now.

Any hints how to do it?

Thanks in advance.

-- Peter
Set up the Exclude layers section on each renderlayer so that layers you don't want included in the renderlayer are explicitly excluded:



By default, as you have noticed, objects outside the included layers will still affect the output through indirect lighting/shadows.

This is often very useful when compositing different parts of a scene together which should appear to integrate together seamlessly, but if you don't want this, it can be disabled via the exclude option.  

"Excluded" layers will not have any affect on the output of the renderlayer.