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

2022-01-21, 12:39:16

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
Hi all,
a classic basic situation, glass on window with backgrond.
As you can see when the alpha channel is applaied the glass retain the refraction information and this is a problem if i want to change the background.
I think that it should be an option on material setup  (glass in this case) to retain only the trasparency information or only the reflection information.

At the moment my trick is create alpha from wirecolormask and apply to it the CESSENZIAL_reflect.
There is a more efficent way?

thank you

2022-01-31, 16:25:21
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
Sorry, but the description of the issue is hard to understand. Could you please try rewording it?
What would greatly help is:
- explaining what exactly you are doing (what you are starting with and what is your end goal)
- showing the BEFORE images
- showing the AFTER images
- explaining what is the expected result and what is the result you are getting

I may be wrong, but I think you may be looking for the reflection/refraction propagation option: https://support.corona-renderer.com/hc/en-us/articles/4402621221521-How-to-use-Masks-with-Reflection-Refraction
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-01-31, 17:45:48
Reply #2

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
hi maru, thanks for the reply.
I try to explain better, look at the attached image:
- the image 1: it is the raw render without post production, a window with glass and an hdri image beyond the window.
-Image 2: I apply the alpha channel generated from the window glass and I get the transparency.
-Image 3: I insert a simple gray background in post production, now you see the "issue", the refraction data remains in the alpha channel, I think it shouldn't be there.
In fact, if I put any other background instead of the gray background, it would be disturbed by the refraction of the previous background.

PS: I saw the link and tried all the options, but it doesn't help.

thank you

2022-01-31, 20:48:20
Reply #3

dj_buckley

  • Active Users
  • **
  • Posts: 871
    • View Profile
You'd need to override the refraction with black to get it to completely disappear no?

If there are no overrides, then the alpha just helps display the correct refraction strength rather than remove it completely.

Happy to be told I'm wrong, but that's my understanding

2022-01-31, 21:15:01
Reply #4

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
thank you  dj_buckley, yes it works!!!

I still don't understand why the alpha channel incorporates refraction, we already have the CESSENTIAL_refract element that does this.
having the possibility to exclude the refractive component inside the material would be welcome.
But maybe i am wrong and not undestand something.


2022-02-10, 14:12:56
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
Just letting everyone know that this is not forgotten, we are just dealing with a lot of various work right now. We will return here ASAP.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-07-07, 10:47:16
Reply #6

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
Hi, better late than never, right?

Let's imagine two cases:
1. There is a hole in the wall (no glass, nothing, just wall geometry with a hole) and background behind it.
2. There is a hole in the wall with glass in it (like in the original example here).

If we render case 1 - the wall will be white in the alpha channel and the hole will be black.

If we render case 2 - the wall will be white, the hole will be black, but there will be some shade of gray where there is glass because the glass is not 100% transparent - it has some reflectivity.

If you imagine that there is a person in the room, standing next to the window, you would see this person's reflection in the window.
If you want to replace the background, you want to see the background behind the glass, but you also want to see the reflection of the person - right?
That's why the glass cannot be 100% black.

To overcome this, we can use the "trick" provided by dj_buckley. The directly visible background will be black, so no additional color will be added on top of the glass if you apply the alpha.

I hope this helps.


Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-07-07, 20:17:43
Reply #7

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
Quote
If you imagine that there is a person in the room, standing next to the window, you would see this person's reflection in the window.
If you want to replace the background, you want to see the background behind the glass, but you also want to see the reflection of the person - right?
That's why the glass cannot be 100% black.

ok i can be agree on reflection case.
but not agree in refraction case.
The alpha channel retain also the refraction information and i think this is not correct behavior.

2022-07-07, 20:57:02
Reply #8

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
...to explain better, the alpha channel should not retain the background information.

As you can see in attachment when i apply the alpha channel and insert a white layer behind, I keep seeing traces of the background.

2022-07-08, 18:09:40
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
I may be wrong, but I still think this is because the glass material has some reflectivity (so it is because of reflection, not refraction component).

Is it the same if you go to the glass material > Advanced options and set "Alpha mode" to "Always black"?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-07-08, 19:21:48
Reply #10

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
Quote
I may be wrong, but I still think this is because the glass material has some reflectivity (so it is because of reflection, not refraction component).

Is it the same if you go to the glass material > Advanced options and set "Alpha mode" to "Always black"?

don't works,i tried, the alpha channel lost all the reflection information.

2022-07-08, 19:32:59
Reply #11

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
Quote
I may be wrong, but I still think this is because the glass material has some reflectivity (so it is because of reflection, not refraction component).
i think you  are rigth. The problem is the reflectivity on out side, infact if I try tu use a single face as glass and set the glass to thin shell i see always the background information on alpha channel

2022-07-16, 18:05:44
Reply #12

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
I tried to use a "Duble Sided" material by putting a non-reflective material on the face that looks outward and the glass material on the face that looks inward, unfortunately it does not solve the problem.

2022-07-18, 11:21:29
Reply #13

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
Quote
I may be wrong, but I still think this is because the glass material has some reflectivity (so it is because of reflection, not refraction component).

Is it the same if you go to the glass material > Advanced options and set "Alpha mode" to "Always black"?

don't works,i tried, the alpha channel lost all the reflection information.

Now I am completely confused. In your first posts, you are saying that you see the reflection information in the alpha channel and this is a problem to you. Now you are saying that the lack of reflection information is a problem to you. I do not understand your requirements.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-07-18, 12:05:48
Reply #14

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
Quote
Now I am completely confused. In your first posts, you are saying that you see the reflection information in the alpha channel and this is a problem to you. Now you are saying that the lack of reflection information is a problem to you. I do not understand your requirements.
yes i confirm what i said.
There are 2 reflection component on glass: One on the face that looks inward and One on the face that looks outward.
The iussue is only the reflection on the face that looks outward that incorporate the background reflection, that is why i cann't substitute the bacground.
The reflection component of the internal face must remain otherwise I no longer have a glass but an empty hole.