2
$\begingroup$

I have a scene with a number of Render Layers. In the screenshot I am only showing two to focus on the problem (called "main ground" and "bushes").

Each render layer has all the other layers set as a mask (I am not sure if this is correct, but it was the only way I could see to put them back together again as one image without visible parts that should have been obscured).

I am using Alpha Over nodes, but oddly I am getting strange halos around some of the layers. You can see this on the left of the image where there is a strange transparent halo around the bush, cutting through to the sky background.

It seems like Blender is cutting the wrong sized mask "hole" in the main ground layer for the bush layer, but I don't understand why. I suspect I somehow need to tell Blender to better calculate the bush layer mask, but I don't know how.

enter image description here

$\endgroup$
3
$\begingroup$

What you are experiencing is the result of antialiasing, more explicitly two overlapping masks with antialiasing, so the transparency of the upper mask is reveals some of the antialiasing of the underlaying mask.

You could get rid of anitaliasing it by switching off the AA samples using branched path tracing. That will give you perfect edges for the mask but it will affect the overall quality by having an aliased image that will look blocky...

enter image description here

A simpler and higher quality solution is not using a layer mask on the render layer for the grass.

enter image description here

Keep the layer mask on the layer for the bushes only.

enter image description here

$\endgroup$
  • $\begingroup$ Thanks. This definitely works for those two render layers, but I am having difficulty applying the principle to multiple layers. What is the general rule to take away? No two layers should mask each other? Is ordering in the compositor important? $\endgroup$ – Lewis Jul 6 '15 at 18:27
  • $\begingroup$ In this case it makes sense not to mask the underlaying elements (background), but the ones that go on top (foreground). $\endgroup$ – cegaton Jul 6 '15 at 23:03
  • $\begingroup$ In case the background is transparent, how can the issue be resolved? $\endgroup$ – bot4u Mar 19 '17 at 8:32
  • $\begingroup$ @VandanaIyer please use the link on the top right: Ask Question to post your own new question, and add as much information as you consider necessary along with images that describe the issue you are having. $\endgroup$ – cegaton Mar 19 '17 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.