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?
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.
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.
There is a hole in the wall (no glass, nothing, just wall geometry with a hole) and background behind it.
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.
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.
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
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.
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.
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.
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!
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.