How to Make Realistic Glass in Unreal Engine 4

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so i'm going to quickly show you guys how to make glass and unreal engine as you can see here this glass material is quite versatile you can change the color so say we want to make it red we can do that you can change the opacity so let's say you want it to be fainter or you know thicker you could do that and you can also change the roughness right so let's say you wanted like more frosted hazy effect you can get that and finally we can even change the normal map which does some interesting things like let's say we wanted to use water pick the normal map for water you get this interesting warping or perhaps um for wood right and then this is more obvious when the roughness is down you can see wood etching in the glass so that's just a neat little effect so to make the glass you create a new material call this one glass tutorial and now you want to go to the material domain and under the material domain there's blend mode and you should change that to translucent now we're going to go all the way down and change the lighting mode from volumetric non-directional to surface translucency volume now i'm going to create just hold down three click that'll give you a vector right click and convert that to parameter and we're going to call this one color i'm going to go over here and make it white for its default value connect this to base color now for metallic we're just going to hold down one to make a constant and we're gonna change this value to one and connect it like that for roughness we're gonna right click convert this to parameter call this roughness and hook that up like so and its default value make 0.3 and then its min will be 0 and max will be set to 1. and actually let's make the roughness zero now for opacity i'm going to do the same thing make this a parameter and call this opacity its default value will be 0.5 with a min of zero and a slider max of one because that's opacity for you it's just a scale of zero to one so there's no point making the values higher or lower than that now here's where it gets a little complicated so we're gonna make it for now mode and we're gonna make a lerp node so just hold down l this to the alpha and connect this to the refraction now we're going to make two scalars so first one we're gonna make one and connect it to a second one we're gonna make 1.33 because that's the index of refraction for glass so if we convert this parameter we can call this index of action and there we go and now there's one more thing so if you hold down t hit texture sample hook this up to the normal and convert to parameter so that way it can be dynamically changed and we'll call this normal now for default we can just use black this should be in the starter content so if you have starter content enabled for your project you should have this now we're going to hit save all right so with the material saved we can right click it create a material instance and open it up now change the preview mesh to sm underscore matte preview mesh zero two or zero one doesn't really matter right so now we have a nice preview mesh so we can see our changes you can just check all of these boxes which are the parameters that we set and now if you want to change the normal for example let's use steel again it's this one and you can see you get an interesting looking texture it shows up on it right this looks nice now for the color obviously you can just make it whatever you want get nice and dark and the opacity and let's say you want to make it really thick just drag the slider up you heard that one it's just solid so if you wanted to make it like let's say you want to have a sci-fi helmet and you want a divisor right you do something like this and have the opacity set to one so that you couldn't see through it right but we're going to leave this at like be 0.8 now for the roughness you can just looks a little bit weird when you have such a high opacity and this is a kind of a weird mesh to use glass material on normally like let's say it's just a circle it looks pretty normal right it's just because of the faces so yeah that's it
Info
Channel: CannibalFish Tech
Views: 2,669
Rating: 4.6756759 out of 5
Keywords:
Id: wZwv1VqhS90
Channel Id: undefined
Length: 5min 59sec (359 seconds)
Published: Wed May 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.