It looks like there is an issue with the alpha channel when opacity mapped objects are located behind another object with refraction. Part of the sky appears in leaves opacity. Here is the scene setup :
corona env → corona sky
direct visibility → black
As you can see in the attached images, the behavior is correct above the glass but it’s not when the refraction is involved. Pretty annoying when trying to composite a sky in post.
The glass panel is reflective, which is visible in the alpha channel, so the area around the leaves in the alpha channel will not be 100% black
The refraction of the glass panel will not appear as black in the beauty, but it will show the sky instead, if you will not set refraction override to pure black
One solution would be to:
-set direct, reflect, and refract overrides to black in scene setup
-disable reflectivity for the glass material
-then use the alpha channel generated from this render
There is also partly another work-around that I use.
Refraction override to black is something I avoid because it actually modifies the scene light unlike direct visibility which doesn’t affect anything.
So when I have glass railing, I use ‘thin’-glass. This doesn’t create the volumetric absorbtion effect on edges, so I instead use second non-refractive dark green material on edges as another matID.
The net-result is that it looks absolutely the same, renders a lot faster and doesn’t create as many refraction-induced compositing artifacts.