Realistic Glass Shader in Blender Eevee (Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this blender tutorial i'm going to show you how to create this realistic glass shader in blender ev now if you'd like to download this blender file with the eevee glass shader then i'll have a free download on my gumroad and patreon where you can download this blender file with the glass shader but if you'd like to help support me you can throw a dollar into the tip box before you purchase and that will help to support me and purchasing products on my gumroad store is also a really great way to help support the channel so i'll have links in the video description alright so with that all out of the way let's get started with the tutorial so i have the 3d view on this side of the screen and then i also have the shader editor on this side of the screen so the first thing that i'm going to do obviously is change the render engine to ev i'm now going to select this object and i'm going to click on new here to add a new material and i can just call this glass shader and then what i can do is i can click and drag and just drop the glass shader onto these other objects so you can just apply the shader to whatever object you want now to make it look like glass i'm going to turn this transmission value all the way up to one and then unless you're making some sort of frosted glass i'm going to turn the roughness all the way down to zero so this is starting to look like glass but the problem with it is that you can't see through the glass so what we need to do is we need to click right over here on the material properties and i'm going to scroll down so right down here under settings we need to turn on this screen space refraction and then also let's scroll right up here and i'm going to go over to the render properties and we want to turn on screen space reflections and then if you open up the screen space reflections i want to turn on this refraction and now it's already looking a lot more realistic so you can see through it and that does look much more realistic now we still have a problem and that is if you look through glass you're not able to see glass through glass so to fix this i'm going to press shift a and i'm going to search for a transparent bsdf now what i want to do is i want to mix these two together so that some of the object is transparent so we can see through it but then some of it is this glass so what i'm going to do is i'm going to press shift a and i'm going to search for a mix shader i'll just drop it right down here and then i want to plug the transparent up to the top one and the principle onto the bottom one now the transparency doesn't really seem to be working if i plug this up to the surface you can see it's not working at all it's fully black and that is because we need to tell blender to use the transparency so to do that again over here on the side panel i'm going to go to the material properties and right down here under settings i'm going to turn the blend mode and shadow mode from opaque to alpha hashed and now it's actually using that transparency so if i plug the transparent in there you can see it is using the transparency you can't see the glass at all so i can now plug the mix shader up and you can see it's using the transparency now right now it's just evenly mixing them together so i can change the factor here and it's going to be only transparent or only glass and i don't want this because this is just kind of evenly blending between them i want to tell it where it's going to be more transparent and where it's going to be more glass so to do this i'm going to press shift a and i'm going to search for the fresnel i'm going to drop the fresnel right down here and then i want to take the factor and plug that into the factor on the mix shader so what the fresnel does is it makes the faces darker when you're looking straight at it but then kind of on the sides when you're looking sideways on a face it makes it more white and you can see now what it's doing is it's using the principled glass here on the edges but then it's using the transparency in the middle now i want to be able to control this a little bit better so i'm going to press shift a and i'm going to search for a color ramp node and i'll just drop the color amp node right here so i can now take this block color and i can start to turn it up so really you can just change this to your liking if you want it to be a little bit more transparent you can turn it down or if you want to be a little less transparent you can turn it up i personally like this color right here um and if you want to use the same exact color that i'm using you can click over on the hex value and you can type in a7 a7 a7 now also over here on this monkey head um what i did is i added in this solidify modifier because you can see without the solidify modifier it doesn't really look that realistic it kind of just looks like it's a super super thin piece of glass it almost looks like if you set this down just the smallest amount of pressure would break the glass so to make it look a bit more realistic i added this solidify modifier and just turned it up to make it a little bit thick and that looks a lot more realistic because it gives that class a little bit of thickness so this does look pretty cool and it does look pretty realistic you can see through it and it has reflections and shadows but there is a problem with this and that problem is that it's really quite grainy so there are a few things that you can do to fix this so one thing that we can do to get rid of that grain is we can turn up the sample count in ev so right over here on the render properties ev does actually have samples so if you turn the viewport and render both up to something really high like a thousand now if you zoom in here you can see the grain is much less now this does look a lot nicer but it will take longer to render so if i just render this it took my computer 14 seconds to render this image and so that's not really desirable we would like it to render faster so you could turn up the sample count but what you could also do is just turn the sample count up a little bit so maybe not turn it up to a thousand maybe just turn it up to something like a hundred and then you can render this again so that rendered much quicker it only rendered in three seconds and you can see that does look pretty nice there is still a little bit of grain but it does look better so what you can do to get rid of that last little bit of grain is you can go over to blender's compositor so when you hop over to blender's compositor you can just click on the use nodes button right up there and you can press shift a and you can search for a denoise node and then just plug the image into the image on the denoise and then you can plug the image up to the composite so you can see here's the glass shader without the denoise it does just look a little bit grainy but then with the denoise you can see it smooths that all out and it does look quite a bit nicer and then also if you'd like to change the color of the glass right here on the principle you can just change this base color to whatever you want and that is going to change the color of the glass all right and that is going to wrap it up for this tutorial so that is how you create a realistic glass shader in blender ev and if you'd like to help support me and this channel then definitely consider checking out my gumroad and patreon so thank you for watching i hope this was helpful and i hope to see you in a future video
Info
Channel: Ryan King Art
Views: 13,076
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, glass, shader, eevee, blender eevee, material, glass material, glass shader, real time
Id: JYyUMMboZFk
Channel Id: undefined
Length: 6min 16sec (376 seconds)
Published: Thu Oct 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.