Author Topic: Alpha channel, refract and opacity  (Read 2440 times)

2017-09-03, 17:49:03

Fluss

  • Active Users
  • **
  • Posts: 553
    • View Profile
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.

edit : corona 1.6.2

2017-09-13, 11:02:51
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 11414
  • Marcin
    • View Profile
I can see two things at play here:
1) 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
2) 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
Marcin Miodek | chaos-corona.com
Chaos Corona Support Team Lead | contact us

2017-09-13, 11:09:48
Reply #2

Juraj

  • Active Users
  • **
  • Posts: 4333
    • View Profile
    • studio website
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.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2017-09-13, 11:19:49
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 11414
  • Marcin
    • View Profile
Refraction override to black is something I avoid because it actually modifies the scene light unlike direct visibility which doesn't affect anything.
Yeah, but I only meant using the alpha channel generated from this, not beauty.

Using thin glass is one possibility, but it still has reflections, so there will be some greyish area around everything in the alpha.
Marcin Miodek | chaos-corona.com
Chaos Corona Support Team Lead | contact us

2017-09-13, 11:53:32
Reply #4

Juraj

  • Active Users
  • **
  • Posts: 4333
    • View Profile
    • studio website
Refraction override to black is something I avoid because it actually modifies the scene light unlike direct visibility which doesn't affect anything.
Yeah, but I only meant using the alpha channel generated from this, not beauty.

Using thin glass is one possibility, but it still has reflections, so there will be some greyish area around everything in the alpha.

I had this scenario in use many times, imho this is some other type of artifact, something doesn't quite fit.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika