 Good morning class and welcome back to Gamedev Academy, I'm Shane and in today's video we'll be taking a look at how you enable ray tracing in Unreal Engine 4. Before you can even try to turn on ray tracing you need to make sure that your system meets the requirements. First of all you need to make sure that you're running Windows 10 build number 1809 or later. I'm running version 1909 so I'm good to go. If you're not sure which version of Windows you have you can find out by typing winvert into the Windows search bar and running the command. You also need to ensure that you have an Nvidia RTX graphics card or one of the GTX cards that supports DXR. You'll also want to make sure that your graphics drivers are up to date. I've just updated my drivers and I'm using an RTX 2070 Super GPU so I'm good. Finally you need Unreal Engine 4 version 4.22 or later. I'm currently running version 4.25.3 so I've got everything I need to enable ray tracing. Now that you've checked that your system meets the requirements for using ray tracing we can enable it for a project. Luckily Epic makes it nice and easy to enable ray tracing for a new project. Simply launch the engine in the usual way and then choose the type of project you want to create and click the next button. I'm going to choose games. Next if you want you can choose a template for your project. For the purposes of this video I'm going to use the first person template. Then click on next again. In this window you can make some other decisions about the type of project you want to create including whether or not ray tracing should be enabled. So enabling ray tracing is as simple as choosing the option from the drop down box as you can see here. Once you've made your other choices on this screen you can choose to create a project. So here's the new sample project I've just set up and what I'm going to do is just go into the starter content and open one of the maps from here. So we'll have a look at the starter map and you'll just need to sit through the compiling of the shaders before we can take a look at how ray tracing works in this scene. So that's all my shaders compiled. Now we're going to find some of the more reflective materials over here and see that the ray tracing is in fact working. So if we look through this water we can see the little building is being reflected in the water over there and if we go to some of the more metallic looking ones again you'll see the same. So all that building is being reflected and to know that it's really working if we cut that building out of our view you can see the reflection still there which means it's not screen space reflections it's proper ray traced reflections. To make this a little bit more obvious though what I'm going to do is just quickly create a material and we'll just call it mirror and we'll just throw some constants into this. So we want the roughness to be set to zero and then we're going to put a probably a one into base color and a one into metallic. So let's just set these up that looks pretty mirror like so let's just save that material close it down and we're going to apply it to one of the surfaces over here so we can see that it is in fact creating a little mirror for us. So I think what I'll do is I'll apply it to this wall here so let's drop that on there and then once that shade is done compiling you can see that we have proper ray traced reflections going on which is pretty darn nice and while we're here we'll also just take a look at this little statue thing because this is also using ray tracing to bend the light through it so if we just have a little look around that maybe not facing the reflection though there we're going to see that the light is bending through there lovely okay there's one more thing I want to show you while we're in this project if we look for the post processing volume because there is one in here this is where you can choose to change the settings for ray tracing so if we go to something like ambient occlusion we can tell it how much that we want so sorry ray traced ambient occlusion would be better wouldn't it so we'll enable it and then we can play with the settings a little bit and we can make it stronger we can have the radius go out make it look a little bit grittier and dirtier which is nice we can also turn on ray trace global illumination so if we enable that this will really tank your frame rate if we go to brute force but it does fill in the the background really nicely I'm a fan of that but I'm going to turn it off for now for the sake of my frame rate reflections we want to make sure a set to ray tracing as well which I think they should be by default and we can also make sure that the translucency is set to raster oh no translucency is set to ray tracing as well oh now we're talking oh so it turns out it wasn't ray tracing before look at it now oh that's pretty that is pretty thank you ray tracing okay so there's lots of settings that you can change in there so I've shown you that it's dead easy to get ray tracing enabled for a new project but what if you want to enable it for an existing project well I'm happy to report that this is also pretty simple to do here's how to enable ray tracing for existing projects with your project open you'll need to go into the project settings like this then in the platforms category choose windows and make sure the default RHI is set to direct X 12 which is the one that we need for ray tracing next we need to go to the engine category and choose rendering scroll down until you find ray tracing and tick the box you'll now get a warning that you will also need to enable skin cache for ray tracing to be enabled and you can select yes to have this turned on for you automagically the editor will now need to restart and your shaders will probably need to recompile but that's it you've now enabled ray tracing and control the attributes using a post processing volume just as before that's everything I wanted to share with you today hopefully you've learned something if you have definitely smash that like button and consider subscribing if you're new here here at game dev academy I upload weekly video tutorials covering game development and 3d art I like to end the video by thanking my super generous academy governors who support the channel through patreon your continued support means everything and helps me to keep this channel viable thanks for watching and I'll see you next time