How do I make realistic looking glass?

I made a little project to get the feel of the pbr shading material system and it’s going reasonably well so far, but I’m at a completely lost when it comes to making realistic looking glass. I used the default glass material to make some shelves, but they just look like grey bars.

I think this isn’t about Unreal Engine itself - have you made this in UE4? O.o - and not belong to us to answer you.

CGSociety is a good source to learn these concepts.

Erm, what?

This is about how to create a realistic looking glass material in UE4, to use for the shelves.

I’m getting confused. UE4 offers this feature? If so, please do not consider my answer.

Well, if you want glass shelves in UE4, you gonna make a glass material in UE4.

Hey electricsauce,

It looks like you may not have a ReflectionCapture actor in your scene?

Capture.JPG

Without this, you won’t get correct reflections (and glass is mostly reflections!)

-nick

That was it. I have one more question about glass though. When you are looking at a glass shelf, the edges are tinted (usually green) darker than the other surfaces. Is there a way I can replicate this effect in a material, or do I have to cheat it by using material masks to change the color of the edges?

Thanks for the help.

I’m curious to see the final realistic glass effect - can you share it?

I want to see the power of UE4 materials.

Here I’m using vertex colors to raise the opacity of the edge. It’s a simpler solution than some complex material hackery. You could also darken the base color with the same vertex information if you feel that it should be darker.

I modified the glass material that came with the example content.

I decided to try using a thickness map with your glass material. It works well, but is more expensive than the vertex method. I’m going to try it out on a glass statue to see how it looks.

Edit:

I’ve tried your solution in my test project but it didn’t work. Maybe I’m missing something? I’ve used a standard static mesh wall, scaled it down, applied the glass material and created a Sphere Reflection Capture object. Here are some screenshots of it running in simulation mode:

With original glass material:

Modified glass material:

Material Editor:

Looks like you have the wrong node going into opacity, it should be your clamp :slight_smile:

I believe in 1 of the Twitch streams Epic explained that they still working on a way on making transparency glass look more realistic.

Wow, such a stupid mistake, probably happened when I tried creating the material a second time. Now the clamp node is going into opacity, I’ve rebuilt the scene and the lightning and still nothing has changed :confused:

Constant 0.35 into Opacity:
604719905a8c32c331dce60314110e846d2a8477.jpeg

Clamp into Opacity:
2a4a8d05b41a0ddf1f4c2f5bebac4c909122d9c6.jpeg

Yeah I tried it too and it didn’t seem to do anything :S Sucks because it looks pretty nice.

Looks great!! Could you please share your current material setup?


By the way, I don’t have any reflection of any kind on glass materials in 4.1 (Mac), even with reflection capture. Am I missing something?

I’m having the same issue in 4.1 and I’m running on a PC (geforce 770).

Could someone from epic confirm if this applies only to mac? Any improvement with 4.2?

Try setting the “Translucency Ligting Mode” to TLM Surface.