Arch Glass material

there are few things you'll need to obey to create a realistic looking glass tank, table, or anything more complex made of glass.
again as usual, important thing is to check reference from the real world

what do we see. the glass is refracting the world behind it, its reflecting more when looked at from an angle, than looking directly at it. the opacity is similar. looking directly at it, it seems more transparent than looking from an angle. also notice, the edges of the taple on the photo , you cant see through them at all. so this is something were gonna recreate.

i made the tank out of two meshes. one for the glass part , and one for the darken edges, to simulate that particular real world behavior

this is the shader for the glass, its made of two masked out realtime reflections. and one fake cubemap reflection with invert mask , so those two types of reflections wont interfere with one another
the reflections are then tinted with that dark aquamarine green color.
the opacity is made out of two fresnel nodes, for a smooth and also a sharp transition.
the distortion is imho basic with a huge amount of control for the user, who can edit the distortion on the area direct to camera, and also away from camera. and also the fresnel node for the distortion transition

the dark edge material is pretty basic. here i used the same trick with cubemap refraction as in the glass spheres material.
a problem with the material setup like this is the distortion.... it is distorting not only object behind it but also objects in front of it , which can look wery strange.
luckily you can use a simple trick to fix this. the problems only occur with opaque materials. so you can switch them to an translucent material with wery high opacity (something like 0.995) to remove the artifacts

Bookmarks