 In this step then, we are now going to build our lighting which is going to give us some beautiful sexy shadows So Unreal Engine has lots of different types of lights. So if we just click on one of the lights Let's go with this one. It gives us some options for every type of light and it calls that mobility So stationary Kind of is the best of both worlds in that it can have Elements of static and movable what a static light is it's a light that you place and It will never move in the engine You'll only have to cast shadows once and those shadows will never move because the light source will never move if it's a movable light It needs to be dynamic Which means that that light could move at all times that could be like a torch that which means your shadows are always going to Be changing which means you can't bake your shadows You can't create shadow maps of that it won't work Stationary is pretty clever because it will allow you to do both So it can bake your shadows, but if a character runs past the light will also like create Dynamic shadows from that character as well And by default everything starts on stationary if you're really struggling for performance You can change them all to static and you'll probably get a bit more performance back But what we want to do is build our lighting So if I just turn on show stats and say it's been angry at me all this time Lighting needs to be rebuilt and it's just saying it in capital letters build your lighting chain So let's do it the way we do that is we go into build but we're not going to build everything We want to go the drop-down arrow here And we can go to build lighting owner, which we'll do in a sec. But first of all, let's go to the lighting quality Building lighting can take ages. So don't do it on anything other than preview until you're 100% happy with it That's my advice So I'm going to leave it on preview and then we're going to build lighting owner. This can take anything from 30 seconds to 10 minutes I think on this project. It should take something in the region of about two minutes So I'm going to click on this and then I will edit out me You know pick your my nose for two minutes and we'll have a look at the result when it gets finished So I will see you when we all have some beautiful built lighting Okay, so my lighting build is pretty much finished. We're just encoding textures so when this is done it will update my level and the Static the baked shadows will kind of pop in so let's see what that looks like. Oh, it's exciting Okay, that builders done you'll get a lot of like advisory warnings as you can see I've got here basically There are some issues with my the way that I've done my UV maps in that I want a tyling So there's some overlapping them, but it's not really an issue for what we're doing So we can even know all these none of these are going to break anything The engines just warning us So now we've got these beautiful shadows that are baked in So, you know some areas may not look a so we've got this little bit here. Oh, hello It doesn't look brilliant So we need to think about what how we fill in these really harsh shadows. So let's just have a look what this looks like when we play it. Oh We have an error. Okay, let's have a look at this over here. So Now that we've added some extra information In the form of light maps to our terrain Part of it's refusing to render. We've gone back to the world grid material This is not what we're going for And this is something that we need to fix before we move on so How do we do that? Well, we need to go into our landscape material and there's a change that we need to make so There's apparently So my research tells me there's a direct x11 limitation. I think or a direct x10 limitation where you can only have 13 texture samples and Light maps count towards that seeing see we've got 12 here light maps are being added to our material as well And now it's refusing to render because we've given it too many samples So we need to fix that and we do that in the material and the way we do it It's just select all of the samples you've got so I'm just going to click on all of these whilst holding control look on all 12 and this sampler source is from texture asset and On meal engine has got away a workaround and To do that we change it from there to shared wrap and that changes the way the shader works We're in terms of samples and you can have like up to 128 samples in one material Which is loads will never need all those so We'll save that and That should force that material to recompile which is happening now. It's compiling shaders I'm not going to go back over and look at it until that compile is complete because it keeps crashing So I'll wait till it's done and then we'll have a look and see if that's fixed itself Okay, it's finished compiling. Nothing's crashed. So let's move over to our level tab The materials back so We fixed that little issue But our issue now is these overly black shadows Obviously in real life. You don't tend to get shadows that dark. It looks kind of cool But we sort of need those to fill in a little bit So we need to look at how we go about doing that And the way that we're going to look at doing that is in our details panel There's another panel there or there should be a panel there called world settings if you can't see it You should be able to get it from window up here There it is world settings and what we're going to do is change the environment color from black which it currently is to Something light in that so I've gone for kind of a light gray And when we rebuild our lighting that should make the black bits not as black So let's build lighting again and see how we feel about the result Okay, so the light and build is completed and we can now see that we've got much lighter shadows I actually think I've probably gone a little bit too far and now my shadows are a bit too light So I am just going to bring those back down Something like that. So a darker gray And I'll build my lighting again And but that will do it for this step. We've now set up our lighting. We have built the lighting and We now moving towards getting finished on on this tutorial, which Which is good. I'm happy about that What we're going to start on next are some of the post-processing effects So in the next step, we're going to look at adding some atmospheric fog Which is really going to help with giving this level a feeling that it's at kind of a early morning late evening sort of time of day So what I'm going to do is build my lighting again So I get a slightly darker shadows and then I'm going to Mosey on to the next step where we'll start looking at some fog. So I'll see you there Thanks for watching If you really want to take your learning further than I can cover in this series Then I highly recommend checking out plural site They have loads of really detailed video courses covering game art and game development using Unreal Engine 4 When I learned how to use Unreal a couple of years ago This is where I went and I look in regularly to take a new course and improve my skills I recommend checking out the introduction to Unreal Engine 4 course by Joshua Kinney This is really good and offers a good overview of what you can do in Unreal You can get a free 10-day trial by using my link in the video description And you get full access to all of their courses for that time at the end of your 10 days You can either subscribe for more or cancel totally up to you. It's got to be worth a free trial though, right? I'd like to say a massive. Thank you to my patrons Your support helps me to keep making videos like this one and I really appreciate each and every one of you It really blows my mind that people will support my channel and my work by pledging their money through patreon So again, thank you all so so much If you aren't already a patron and you'd like to offer your support then please go to patreon.com forward slash Shane Whittington