Author Topic: Alpha channel retain refraction information  (Read 11880 times)

2022-07-18, 12:29:59
Reply #15

BardhylM

  • Active Users
  • **
  • Posts: 56
    • View Profile
    • Behance
I think what the problem is simpler to determine, but not so much to solve.
Glass always has a small amount of affecting the alpha, like its light gray. And that way when an image is saved, it is saved as a transparent image with that light gray value (for e.g just like 20% opacity in Photoshop) .
That "bakes" in the image the background image and the reflection of interior as one. So I am not aware that there is a way to separate them in this workflow, as it can be not determined in alpha what is reflection and what is background.

How I would do it is to override the background image in material opacity, make it black in direct visibility and refractions, leave reflections on if you want to project reflections on inside surfaces.
If you make it black totally it may darken the inside a little cause there are no reflections but a black color. If you render now you would get that light alpha again with interior reflections, but also in place of the background you get a black color. Not the best but you can work maybe with this.

If you do not want that black color to be mixed with your reflections(cause it darkens the glass a lot), you can make the glass material alpha always black, and add a reflections pass in render settings. That way you can put any background behind, you have light reflections inside, and with the reflections pass you can add the reflections in the glass as a additive layer.

Hope I did not complicate it, and helped a little!

2022-07-18, 19:45:08
Reply #16

LorenzoS

  • Active Users
  • **
  • Posts: 327
    • View Profile
Quote
If you do not want that black color to be mixed with your reflections(cause it darkens the glass a lot), you can make the glass material alpha always black, and add a reflections pass in render settings. That way you can put any background behind, you have light reflections inside, and with the reflections pass you can add the reflections in the glass as a additive layer.
It is exactly my workflow at the moment.

But i hope in future a more usefull solution will be found.