UE4 - Lighting Exterior Scenes (The Basics)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in today's video we're gonna step through the process of building exterior lighting for a scene from scratch uh this video will be kind of a crash course in all the core components that you would need to create exterior lighting for your scene and still stay performant so let's go ahead and dive in and get started so before we get in and actually start lighting our scene i want to preface just a couple things so you understand the intent of what this video is what this video isn't is it isn't a massive deep dive into all the different settings and tweaks that we can make to exterior lighting components be it our post-processing volume our directional lights our skylights any of those different things that we can do now however i do want to make sure you understand that really the purpose of this is to allow you to be able to take essentially what is a blank scene with no lighting and give it life so we're going to add a skylight we're going to add a directional light we're going to add a few other components that will help us to light the exterior of our scene and we will cover more in depth on each of the individual components in future videos okay so if you want to follow along with this video um i'll actually pull this up here so i'm using the downtown west modular pack that i believe has now been converted over completely free on the epic store so you can grab this follow along this is where i'm using all the assets um and we'll go from there okay so before we actually start adding our components um i'm going to cover really what we need to include what i'm calling the core for any kind of exterior lighting now what you're going to need is a post-processing volume a directional light a skylight reflection capture and exponential height fog i highly recommend that and then as an optional we can add in an atmospheric fog for just a little bit more so okay so let's go ahead and dive in now to actually adding the components and lighting our scene from scratch so again if you're following along with this video and you've downloaded the downtown west modular pack all you need to do is open up the demo environment that's what we're going to use to start with now you may not have this in your tab but if you go up to window and levels i'm gonna go ahead and show this um the the author of this content pack actually was nice enough to include a daytime and a nighttime lighting scene um which we're actually gonna toggle off now if you notice you have a lock icon go ahead and just click it and all we're gonna do is just hide our daytime lighting and effect what this is going to do is just going to wipe out any of the lighting components that we don't need which is perfect okay so if you recall the first thing that i want to actually add in this is a let's go ahead and just drop our lights just so we can kind of see what's happening i will it's going to look pretty terrible but that's fine so we're going to need a directional light we're going to need a skylight i'll go ahead and press g and activate game mode so we'll take these guys move them up uh we're also going to need our post-processing volume so i'm just going to go over into my place actors and type post-processing volume so we'll drag this in there there we go don't worry we'll set up the settings here in a minute um and then the rest uh let's actually leave for right now so i'm not going to add the atmospheric fog i'm just going to add our primary lights okay so now that i've got this added um i'm actually going to uh first let's actually just go ahead and group these so they're easy i'm select all these click the little plus icon do dash environment that will move it up to the top and there we go okay so now we can see all of our base components i'm going to go and go to my directional light set that to movable and my skylight to movable as well so we can just see pure dynamic lighting and not have to view all of the preview shadow indicators okay we'll come back to that here in a second so the first thing that i want to do if you know kind of my workflow and how i like approaching things i've got another couple videos in there to show you how to set up a neutral post processing volume really the whole idea behind this is that we want to eliminate any kind of [Music] it's basically like auto exposure compensation so the engine will go up it will go down an exposure by default now you can turn it off in your project which is totally fine i don't personally like that way because you have to set it each and every time whereas you can just dynamically control that and override that with your post processing volume so that's the first thing that we're going to do so with my post-processing volume selected what i'm going to do is actually scroll down in the details panel and i want to check this infinite extent unbound so what that means is that even though i've got this square here i don't have to actually be inside of that volume this is going to be infinite extent um which means you don't do it so we'll go ahead and check that and then the next thing that i want to do here is actually go up to my min and my max brightness now if you were going to set up neutral we could set it to one set of max to one and there we go let's make sure that this is active infinite extent perfect so now we shouldn't have any kind of ramping up or down of our light okay so let's go back to our post-processing volume um now we'll come back to this as we're tweaking our scenes um actually let's just go and do this now so assuming you're doing an exterior shot if you had your mini max brightness set to one it means that all of your light is going to stay consistent so for example if i blow this out really really bright you'll notice that my viewport doesn't change with it let me show you a quick jump back to our post-processing volume i'll uncheck this and if you notice that's that auto exposure compensation happening so the min and max if i have a check to one it's fixed okay all this to say i'm kind of rambling here what i would personally recommend is a good starting point is somewhere in the value for your min brightness um of maybe like 0.3 to 0.5 so i'm actually going to set mine to 0.35 and max brightness um it's it's up to you i will explain this in in a future video um that actually goes a little bit deeper into the exposure compensation and how you can check that but for max brightness 0.6.8 whatever it is you can see as i look up it dims a little bit as i look down same thing so okay of course it looks like crap but um that's fine so that should be all we need to set so again our post-processing volume infinite extent unbound we're going to go back up here as well to our min and max brightness you can change your speed up and speed down if you want to as well that is simply just the time it takes for it to go from low to high so if i look up two seconds so when it re-exposes down as well okay perfect all right so that covers our post-processing volume now let's go ahead and move on to fixing this directional light which is absolutely terrible all right so now that we have our lighting being controlled and at least you know somewhat fixed within our post-processing volume let's go ahead and address what essentially would be your sunlight which is going to be our directional light so i'm going to go in here and actually just turn off our skylight just so it's not affecting anything if you try to do the hide it doesn't actually hide it so you just need to check uncheck effects world okay so just going really quickly through our directional light and some of the again the core components that you need to be aware of when setting up your lighting for exteriors so your directional light is going to be that omnidirectional which is essentially like the sun in this situation the intensity is set to lux now there's a bunch of tables you can look at don't worry about that um but the point is you can kind of ramp this up or down there are some values um that i would recommend especially if you're adhering to like a physical base rendering pipeline to look at what would the lux intensity be of a sun any of your other lights etc again there's there's there's tables out there that you can look up for that information but in this situation the intensity is exactly what it sounds like this is our ability to control how bright or how dim this particular light is now i'm going to go ahead and jump ahead real quick before we look at these settings and explain that again if you know me and my workflow this little show advanced tab there's always a bunch of little goodies hidden in there so i recommend if you ever see it just go ahead and hit it pop it expand it out so we can see what's happening here i want to say that by default in 423 or maybe it was 424 and above uh directional lights by default were coming in with lux because again that was trying to adhere to more of the cinematic workflow et cetera et cetera so okay let's keep rolling on here so with my directional light let me go ahead and press g so we can actually see the light mobility is the other thing so if you have static it's going to be pure baked lighting now typically if you're developing any kind of game product or anything that has moving characters moving objects you're going to want to set that to movable and or stationary so you can take advantage of the cache shadows now in this situation i'm going to keep mine set at movable which is totally fine we'll keep going there so again this is going to cast dynamic shadows for the whole thing so intensity i think i'm going to take mine down i think it was like 60 lux is what it is uh with light color it's exactly what it sounds like we can change the color i'm not going to worry about that source angle this actually has to do um with the uh i'm trying to remember it's like the degrees of the sun in terms of like the atmospheric scattering so if you had your source angle set to zero it's as if there was no atmosphere no bounce lighting and it's going to be a really really harsh sun if you had that source angle set higher again i believe it's in degrees so again degrees like you would have for an arc of the earth like 10 10 degrees i believe like 8 to 10 degrees is kind of where you would have like overcast and cloudy so again that will actually have some effect when you go to bake your lighting not so much in movable so i'm going to leave it at 0.5 it's totally fine for right now and then temperature is the other thing so if you wanted to set yours more to like kind of like golden hour you could take it down this is in kelvin if you wanted it much cooler you could take it i'm actually going to leave it at default 6500 which again 6 500 kelvin is kind of default but again you can change that all you want effects world cast shadow on by default let's go ahead and leave it there the next thing that i'm actually going to change here is this volumetric scattering intensity i'm going to go ahead and set this to four now what this is going to do is when you have atmospheric fog and you have the indirect scattering this light is going to contribute to that and this essentially is a multiplier of that so by one it's kind of weak uh but taking up to four we'll see the effect and you can toggle that back and forth okay let's keep going on here we're not going to worry about modulated shadows specular scale resolution none of that we don't need to cover that but we will kind of just make sure we've got our cast translucent shadows static shadows dynamic shadows effects translucent lighting cast volumetric shadow so with all of those turned on by default we should be fine now again like i said this isn't a super deep dive um you may find depending on your platform so whatever you're you know producing this for that you may need to turn off some of these components so just be aware that's where they're at again they're rolled up by default okay so we'll keep going through here uh we don't need to worry about light mass right now because again if you recall we have our light set to movable which means we're not actually going to bake any lighting with it if we did we could have some some parameters in there as well okay so we are also going to turn on um let's see light shaft bloom we do want that we don't i'm not going to worry about light shaft occlusion um again that's probably um for a deeper topic bloom scale you can set this it's when you're looking at the light i recommend let's just go ahead and set it to like .02 is totally fine bloom threshold this has to this has to do with at what point does the bloom turn on i believe four um again this is this is probably for a deeper deeper thing so anyways we'll just kind of leave that there not worry about the uh bloom light shafts again are going to correlate with our exponential height fog where we can actually have atmospheric so we're going to leave that there cascade shadow maps um so what the cascade shadow maps are is um with our direction light setup movable we have the ability to cast dynamic shadows to the whole scene that gets expensive very very quickly um you could have the most beefy hardware and that's probably not ideal because if we look at our scene you know we've got shadows way off in the distance we probably don't want to be casting our dynamic shadows out that far so this is where we set that so what the engine uses is something called cascaded shadow maps and it's essentially a lower res representation of a shadow that it produces now i'll show you here real quick so i'm going to go ahead and take my dynamic shadow distance so you see as i scale this way back you can see the distance at which the dynamic shadow cast now this is from the player's camera so if you see if i move forward you'll see that it kind of draws those shadows at a line but of course in the distance it doesn't look great at all so there are some things that we can actually change to be able to do that so with our cascade if i actually set this to one you'll see that it starts to take this up again the the higher that you set your cascade account a little bit more expensive that it gets so for the purposes of this again i would recommend if you're producing you know say something like a video game or something where you're really hardware constrained uh dynamic shadow draw distance anywhere from about 3 500 to about 5 000 as you start pressing past 10 000 units it can get pretty expensive pretty quickly so you can change this whatever you want if you're working you know in a cinematic environment and you really want to push that further that's fine again you can see at about 10 000 units it's off in the distance there and it's pretty hard to see even as i go back you can see it's it's pretty difficult to kind of see that transition so okay so we'll leave it at 10 000. the number of dynamic shadow cascades again this is what's going to be drawn in the distance um one is highly performant two is a little bit more accurate three four you can see anything past three it's kind of a i don't want to say a placebo effect because it's not entirely true but um from like three to five it's more expensive but you really don't get much visual gain but of course from one to three you can see a big difference so if your performance constraint set the dynamic shadow uh cascades to one two or three it's up to you so i'll go ahead and keep this at 3. the distribution exponent we can kind of leave it there the transition don't worry about those so we don't we don't really need to worry too much about that okay so now that we've got that set up the other thing that i would recommend um is that we have the ability to use our distance field shadows now if you notice that mine is grayed out which yours will be two probably um this is a per project setting um so we can go into the project we can enable our distance field shadows um in fact we will do that towards the end here and come back to some of these settings just because we need a little bit more in the scene to see what's happening but just so you know uh we'll cover that process a little bit later but that's why this is grayed out and we don't actually have anything in there okay thank you autosave all right so i think the rest um really we've only got just a couple other settings we want to go ahead and check this atmospheric sunlight if you highlight over you'll see what this does but with the new atmospherics in fact it was this the setting is in previous versions of the engine however it's kind of nested in i believe at the very top so if you're using like i think it's 4 24 or uh prior to that you actually see the same setting in your light so all this is doing is just telling the engine hey i this is basically going to be a sun so we want it to go ahead and play into atmospheric so go ahead and just and check that and that should really be all that we need to do i'm not going to worry about cash shadows on clouds atmosphere or cloud shadows again that has to do specifically with the new sky cloud system so we're just going to leave atmospheric sunlight and then i believe that should be all that we need okay recap i'll timestamp this so you can come back to it so we add our directional light into our scene we're setting it to movable intensity set it to whatever you want 50 to 60 lux for general sky source angle leave alone effects world cast shadows again on by default set your volumetric scattering intensity to four go ahead and scroll down all of the default should be totally fine we don't need to worry about anything inside of here again if that's hidden it's just a little roll up so if we go back up to my light little roll up pop that down we can see everything that's in there we'll keep going down um we're going to set our light shaft so light shaft bloom bloom scale threshold again you'll see that more in the final tweak it to your heart's desired that's totally fine dynamic shadow draw a distance on removable light again i would recommend if you're on a really budget constraint platform anywhere from about 2500 to 3500 if you've got a little bit more beefy hardware go ahead and start pushing that out to about 10 000. anything above 10 000 is going to be a little hard to see in the distance so we'll keep that up there and we'll leave everything else as default for a far uh shadow cascade you can leave it at i believe um yeah we'll go and just set it to one so we have it and we're also going to check our atmospheric sunlight so it plays with our atmosphere and that should be it okay that covers the directional light let's go ahead and move on to the skylight all right so the next thing that we're going to cover is our skylight now hopefully this will be a little bit faster than the previous information that we covered with the directional light because we're actually going to see a lot of the same settings or at least very similar settings in our skylight versus our directional light so i'm going to go ahead and let's hide our directional light you can see we have nothing that's black and with my skylight i'm going to go ahead and set effects world now if you notice nothing happened even if i take my intensity scale up to 5000 nothing happens the reason for that is actually this this first setting that we're going to cover which is our source type so with my skylight set to movable again i'm going to be casting real-time shadows for this demo you can set it to stationery if you wanted to bake with your lighting as well but for this we're going to keep it movable and again we'll find out a little bit later too why that's important with our distance field ambient occlusion okay so with my source type set to sls captured scene uh this is actually a question that came up on a previous video about okay well if it captures my scene doesn't it save it well technically it does but anytime you go to bake your lighting or you change your lighting with sls captured scene on it it will actually recompute the scene so say for example you go into your scene it looks beautiful it's awesome you have your skylight it's all set up and you change you know say for example one little light or some actors in there that changes the scene dynamically again when you open it when you run your bake it's going to recapture that so for the most part you can use it it's safe there's really nothing necessarily negative with it however we have a second type which is this specified cube map so i'm going to go and change this i'm going to go into my hdr map as well and i'm actually going to just use this one that i downloaded from hdri haven which is this tank farm so i'm going to go ahead and drag this into my cube map so if you notice now i have light okay let's jump through and kind of see the settings that we have available to us first thing is the cube map angle so if you see here it's probably better if i had some kind of reflective surface you can see as i move this it's actually rotating the hdr in my scene now there is another way that we can actually um do this but for the purposes of this demo we're not going to do the hdri projected into the world we're simply going to use it for our light okay so that's our source cube map angle the next thing is going to be our cube map resolution so again kind of going up to this reflective surface um this one actually is taken in at 2k now in this case it's actually downrested a little bit i can force it if i do i think 20 48 it should here recompute okay i realized i had that off screen so you couldn't see it so what i did is actually went in double click the hdri from the content browser and with this little roll up you can actually set the maximum texture size so you can see that um if i had this off it actually sets it i think at like 5 12 it clamps it um so by setting my maximum texture size i'm actually forcing the engine to go ahead and use bigger resolution so i'll go ahead and save that come back in here and if you notice too it's still kind of blurry i can set that cube map resolution so if i go here say like 256 512 1024 you notice it kind of starts to get placebo effect by but by bumping this up from the default of 128 i can get a little bit better um reflection in there so we'll go and set it to 512 which is fine and that will be good okay so the sky distance threshold um you just leave it a default that's totally fine uh intensity scale it's exactly what it sounds like this is just a multiplier um i hate this don't try to drag it because it's very very sensitive but of course with one you can see that's intensity if i take this down to like say 0.25 which again depends on your hdri source um i can say that the process um and i'm going blank on his name the the guy i apologize if if you're watching this dude my bad um but the guy that actually authors a lot of the hdris from hdri haven um he actually goes through a balancing process so most of those are pretty consistent so i find intensity scale of 0.25 to 0.5 is pretty accurate in unreal again using that cube map um but there's really no exact science of what your intensity scale needs to be just look at your light around and determine hey if it's you know too bright take it down if it's too dark take it out so i'm gonna go and set this to 0.25 again this is kind of br our ambient light light color so this is actually just an ability to kind of override the color use with caution please um effects world cast shadows again all that's going to be in there with our movable um let's keep going down um we're going to leave these set as is uh the reason being is for volume x scatter uh volumetric scatter scattering intensity on a skylight that's a mouthful um you got to be very careful with that because that can quickly blow out some of your um some of your looks so we'll just leave it at one and that's totally fine okay so the next thing that i do want to show here so i'm kind of going to go in this section will be easier to see by default again this is in this roll up here so if you don't see it go back up to your light and go ahead and just check this by default what happens is that your skylight if you think about it like a sphere everything below the half of that sphere by default is a solid color so if i uncheck this i'm actually going to inherit so if i open up my hdri so if you drew a line across the very middle of this image by having the lower hemisphere solid color everything below that line would be black so if you uncheck it you actually get all the color information from that cube map so to show you i can set this so if i go you know something purple you can see that everything cast down so kind of in this section here is from the hdri everything from below is color so that's absolutely terrible but because i'm using the cube map let's go ahead and uncheck this cast static shadows dynamic shadows biometric shadows again totally fine by default um you know again depending on the the platform that you're developing for you may want to go and turn some of these off but it's totally fine we're going to leave these as default for now and then finally we'll leave visible actor hidden in game um i don't know why this one by default um so we'll uncheck that leave visible and that's totally fine so should be good and then i believe um this is again new in 426 i believe with the new atmospherics um this cloud ambient occlusion you can turn it on um again we'll cover that in a much deeper uh deeper video where we go into this but for purposes of just setting up your scene don't worry about it you can check it on leave it that's fine totally good um okay and that should be it so again this is using our cube map as opposed to our specified scene um if you wanted to use your captured scene again set up all your other lights set up all your components in it change it you know add your skylight and then all you have to do is actually scroll down there's this recapture click recapture it'll do it so okay so in summary we're going to set it to movable um we're going to use a specified cube map which is the one that we want to use set our cube map angle um again if you want to kind of align where that's being projected resolution um again all that's going to matter is if you are overriding the cube map otherwise go ahead and just use your specified your captured scene and you don't have to worry about any of these guys intensity scale again set it to what you would like expand this out uncheck your lower hemisphere of solid color if you're using an hdri if you want to keep it on and just kind of you know change it yourself totally fine you can keep that on there as well all of our shadow parameters on by default uncheck actor hidden in game and set to visible and then that should be um it again we're going to come back to this there's another component here where we can actually adjust our distance field and occlusion with our skylight but for now this is just our basic process so okay so that sets up our skylight um i'll go ahead and turn on our directional light so we can see everything kind of working together that's horrible so let's go for a directional light we'll go and just take this down a little bit more so we'll take it to like 10 no 7 3. there we go okay so that's our basic scene again still kind of coming together and we'll see as we pull in some of the atmospherics how it will look a lot better so that covers up our skylight let's go ahead and keep moving on so before we begin going to our atmospheric fog i do want to add one more component to our scene that will help out um so i'm gonna actually go into our place actors i'm gonna just type in sphere and grab this sphere reflection capture so i'll go ahead and drag this in and if you notice that it did change some things um so in particular um i i will cover sphere reflection captures in a future video um really all we're doing with this particular reflection capture is simply helping all of our reflective surfaces so for example like our water um our windows here so in fact let me go and just use this puddle right here if i delete that reflection capsule you'll notice that things kind of look a little off so i'm simply just going to drag a reflection capture in position does matter but in this situation i'm just going to move it up a little high go ahead and set my influence radius all the way up captured scene is totally fine leave my brightness at one if you find that it's a little too bright go ahead and take this down to like say point five you can actually see here what's happening default to one captured scene is totally fine again really all this is for is just our initial setup on any of our reflective surfaces just being able to see more kind of accurate lighting in the way that's happening so okay that covers reflection capture um in fact i'm going to go ahead let's just move this up to our environment so here's all the way up there perfect okay so the next thing that i want to do which is really going to help this scene now by default this looks pretty terrible um and a big part of that is because we have this just this black background so what i want to do is actually go over here which sphere i'll go ahead and clear this so you see i'm just going to type in atmosphere and i'm going to drag this atmospheric fog in so go ahead and put this in and we'll leave this here um actually what no i um i jumped ahead here we're actually going to add in our exponential height fog so this is going to be our much nicer one so you can see instantly our scene already starts to have a lot more life to this um so let's go ahead and cover the settings that we want to change in this one so let's go ahead and move this to our environment so that should be totally fine and then let's go ahead and start going through the settings okay so i'm going to go ahead and just press g to go into game mode just so i can see my scene a little bit better and let's step through what we have here so static stationary movable um go ahead and just set it to static that's fine um technically if i need to double check this but we're not going to be moving it in game so let's just shave save a little bit performance cost uncheck movable just keep it as static okay fog density is exactly what it sounds like this happens to be the amount of density in the fog so you can see dragging it going from 0 to point zero five is really not a big jump but it does make quite a difference in our scene um so that's uh that's one thing that we'll start with i'm going to show you something here too so if i set my fog density you know fairly high and i move this um this may be a little difficult to see let me kind of zoom back but your exponential height fog does matter its height position in the world so you can see as i raise it up um it actually gets a little bit more dense near the bottom so where the actual height fog is and if i bring it down it's a little bit different we can override parameters but just be aware again that um your the the position of your high fog does does matter so go ahead and press g go back into game mode again so i can see what's happening here now fog height falloff is exactly what it sounds like so what i was just showing you there is a way that we can essentially compress or decompress that height follow so if i kind of look up you can see that if i change the height fog falloff to really really low it's essentially going to have that fog from the ground going up pretty high now if i take it up even further so say for example i go from two to say yeah i don't think it'll let me go above two that's actually going to compress it even further okay the next thing actually is the secondary fog data now this allows us to essentially layer a little bit more fog on top so if i change this density change this guy back up and you can see here too it essentially follows the same logic now if i have my fog density and the height falloff set to the same effect let's go to one so it's super dense so you can see here it's essentially just laying exactly on top of where my existing fog is but if i take this height offset i can actually move that uh further so for example if i take it i think 10 000 units um i believe it's actually going to take it down versus if i do say for example we'll go negative 10 000 it's actually going to uh move that into position as well so secondary fog data again is just a way that you can kind of layer a little bit of extra detail with your fog so we'll go and just reset all these back to defaults not use it at all and that's totally fine okay our fog uh in scattering color is exactly what it sounds like it has to be with the scene so um you can see that if you had like a desert scene where there's a lot of like dust particulate from uh around you you can do that uh by default it's kind of a bluish tint for the sky you can reset the color um it's it's totally pure our artistic preference uh fog's max opacity um is exactly what it sounds like as you start to go down further essentially what this is going to do is the layered kind of stacking effect of your exponential high fog you're kind of setting how far that goes so you may find with this one that by reducing it that you can actually help a little bit with performance as well start distance is exactly what it sounds like so as i push this out it's the distance at which the fog starts you can see as i move forward the fog kind of stays again about 2 000 units out in front of me so artistic preference set up to whatever you'd like and then cut off distance is actually the distance again at which the fog is cut off that's really a performance thing that you you'll probably want to use default leave it at zero okay so we'll go through here a little bit more i don't believe there's really any other settings that we need to be concerned with directional light scattering intensity again you can kind of go in here and change this has to do with your sky so you can see as i kind of move this this is that um kind of the the distance based one but i'm going to leave this as is which is totally fine volumetric fog um this is a way to instantly get beautiful fog so with volumetric it's actually going to do layered volume but again be very careful with this one because if you are on a very limited constrained platform so you don't have a lot of hardware performance this can get expensive very very quickly so we'll leave that there the scattering distribution actually has to do with how the volumetrics are factored in 0.2 is fine you may want to bump that up to 0.5 if you find that looking at your directional light it's a little off albedo emissive exactly what it sounds like the extinction scale actually has to do with the amount of bloom now i don't have you can see it there a little bit um so if i take this extinction scale way up you can see that i get those just amazing god rays um but we're going to go ahead and leave this down because that's that's just a little too much but that is a way that you can control that as well view distance scattering again all the same here we'll leave the rest as default so um leaving our volumetric scattering on is fine fog density is probably a little much so i'm going to take mine to about 0.02 we'll do that and then start distance probably push that out a little bit we'll go about 8 500. that's fine so we've got just a little bit of fog in here scattering distribution actually we'll take this down to zero let's go and bump this up a little bit more and so now we have some atmospherics in our scene okay so that covers our our fog adding it to our scene uh the next thing that i want to do is actually jump to help us give us a little bit of background so we'll go ahead and use a uh we'll we'll add in the bp skype here so okay let's keep moving on so the next thing i want to do is actually add a backdrop to our scene because right now we still have kind of this black voidless sky which is kind of breaking uh the look of our scene a little bit so there are a few ways that we can do this we can use an hdri backdrop again i believe that's 424 or 425 notes i think it's 424 plus you have that ability you have to go into your plugins enable it uh but for this one i'm going to use the tested and true which is bp skysphere so i'm just going to type sky drag our bp skysphere into the world let's go ahead and move this up to our environment as well so we have this and all this is going to do is just kind of add a nice little backdrop for me so with my sky sphere really all i want to do is actually link our directional light to the sky sphere so the colors which you can see here will be determined by the sun position which is our directional light so i can do it a couple ways press g to go back into game mode so we can see here there's our sky sphere i can click this little pick actor from scene you kind of have to get right on so there's our directional light click that or you can just simply select the drop down and you can see there's our directional light is where okay so i'm going to go ahead and go up and just show you kind of what's happening here so with my sky sphere um if i take my directional light in fact let's go ahead and just we'll just move this guy up so we can see what's happening here as i move my light so say for example i go to something a little more sunsetish and i move it this way um what it is actually disabled snapping so you can see that my my skylight is going to be very low on the horizon go back to my sky sphere refresh the material as you can see now um the the sun is kind of it's re-redid the colors again let me make sure that i preface this one there is a much better much more beautiful way to do this with the new atmospherics and the sky in unreal that will be covered in a future video really the purposes of this one again is the idea of what would you need as a base scene for just about any platform be it vr consoles that are very hardware constraint this is a way to start that so again just completely just a way to start from scratch so you can see if i move this go back to our sky sphere again refresh material auto update refresh material there you can see that the the sun position here still aligns with this so okay i'm gonna go back down actually let's go ahead and just move our skylight back down as well so we have that there we go perfect okay go back to this mode kind of set it up a little bit take our sky sphere refresh the material okay um so the rest of this i'm going to leave as default again there's a much better way that we can do this now this is fine um it's totally fine for what it is and we're using our directional light to cast it and that's fine it gives me a backdrop and all that what i may want to do is actually bump up our cloud opacity a little bit so let me go and set this to 1.5 so again we've got some clouds which look pretty good um the clouds are moving there we go perfect so um okay so our scene is actually starting to come together now this is still terrible it's not bad but it's still terrible but that basically gives us all of our components that we need in our scene so with that really what i'm going to do is step through the next process which is balancing everything that we have now before i do that um let's go ahead and enable our distance field ambient occlusion so what i'm going to do is go up to edit project settings and in our project settings you can go to all settings and just type in distance um if we scroll down we should see uh generate mesh distance fields so we'll click this um you can turn these on i'm not going to turn these on right now uh but compressing mesh distance field and 8-bit uh mesh distance field again applies to platforms where things are going to be heavily limited uh but we're going to go ahead um and just keep those off right now and i believe that's all that we need now on mine it's actually off screen so you can't see it but it does say restart required to apply new settings go ahead and restart and that's it so what i'm going to do is i'm going to keep this same kind of layout here let's go ahead and just restart the editor and we'll actually see distance fields kind of taking place and what's involved with that so go ahead and restart and we'll be right back so now that we're back in our scene the editors restarted and has generated our mesh distance field the scene does look a lot different and i think a lot better at this point so to show you kind of what's happening here with our distance fields i'm going to go under show visualize and i'm going to check this distance field ambient occlusion so here you can see what is happening under the hood what unreal engine is processing with our mesh distance field so it essentially looks like ambient occlusion distance field ambient occlusion dfaos you probably heard it and that's exactly what it's doing it's another layer of depth to our scene that helps to bring that realism just a little bit further now again you may find again it depends on the platform in which you're producing for this may be too expensive i can tell you though that distance failing inclusion works for just about every platform minus the ones that are really hardware constraint things like the nintendo switch mobile devices uh you probably don't want to use this so okay so with our distance field aiming occlusion turned on we're actually going to go back to some of the settings we had before and show you where we can control how this is viewed in our scene so the first thing i'm going to do is actually go to our directional light now you can go into search details and just type in distance and there we can see distance shadow um for our cascade distance field shadows we can click this which again this will help to control which we didn't have before uh the the distance at which those shadows will be turned on now you're probably not going to notice too much with by default so if i crank this down again it may not be readily visible you can leave those as default that's totally fine distance shadow movable light i believe yeah this one by default is fine you can see it does have um actually no ignore that because that's our cascade maps so ignore me on that one um okay so that's the first place that we can control is our directional light really the powerhouse when it comes to our distance failing inclusion is in our skylight i believe if i turn off static you'll see we don't get anything stationary doesn't actually give us our direct our distance failure main inclusion but as soon as you go to movable that's when you're able to inherit those abilities so again i'm going to toggle between stationary and movable so you can see the difference that happens here so let's go and change it to movable and i'll show you exactly what we can change so if i go down all the way here to distance field ambient occlusion this is where we can change the parameters how it affects our world occlusion max distance at a thousand again i want to say that this has to do not necessarily at the draw distance but the distance at which i'm a highlight of this uh yeah one point will affect another so essentially what it's saying here is you know if we take for example this little cart that we have and the tree and let's say that they are exactly a thousand units apart let me go back to my skylight and scroll down here this occlusion max distance so again if these guys are a thousand units apart when i have the occlusion max system set to a thousand they will affect each other if i take this down to say 500 they will no longer affect one another in fact we can probably see this more exemplified with the tree affecting the building so as i take this up you'll see that we get that shadow distance so again that's all that this does is it's the distance at which objects affect one another so change it to whatever you want with your scene in this situation i'm fine send it to 1500 because i do like the tree affecting the building okay collusion contrast and exponent um are exactly kind of what they sound like so with your exponent it's basically like a contrast um or i i should say it's kind of like a curve in which you can uh increase it that's a horrible explanation and then with the contrast that's more or less what it sounds like so brightness darkness uh the other thing that i would recommend changing though with your distance failure and occlusion by default it actually comes in at pure black so you can see all our values are black if you know anything about physically based rendering true saturated colors so pure colors i.e you know 100 red green blue white black any color that's a hundred percent starts to kind of break what naturally happens because in the real world we don't really have uh super perfectly saturated colors um so my recommendation here is because this color is in linear space i would recommend a value of 0.18 which i think is going to give you your 50 gray so if we have that i believe 0.09 anything slightly lower than pure black you can see actually helps to make it look a little more realistic so you can play with this value um again i threw kind of a ballpark number out there but you can see as i change this in fact we can actually tint our distance inclusion which is kind of cool um but again i would recommend having a pretty low value um but definitely not pure black so it may be easier just to take the slider um and change that there so okay so we will keep that um and that is pretty much it with our scene uh this next process i'm actually gonna do just a quick time lapse i'll come back and summarize but essentially now that we have all of our components in our scene now we get to have fun playing and start tweaking and changing our scene the way that we want so again i'm going to time lapse this portion but what you'll see me do is actually the methodology that i like doing when it comes to lighting which is what i call an isolation approach i'll go in i'll actually hide like a directional light just adjust my um just adjust adjust only my skylight for example turn that off go back to my directional light turn it on change that so you'll see me turn things on and off and really all i'm doing in that process is isolating that so i can see exactly what it's doing tweak it and then at the end bring everything together and balance it so i will go ahead and just let this time-lapse roll probably have some fancy music playing in the background so it's not so boring um and what i'm gonna do is just bring the scene into balance so i can make it look pretty exactly what i want so i'm gonna go ahead and do that um sit back and enjoy [Music] so [Music] [Music] so [Music] so [Music] [Applause] okay so i would call the scene good enough for now um i'll let you be to the judge um i think it works fairly good uh so i'll kind of fly around here show you kind of the the pretty atmospherics uh we'll kind of move around so we've got the bright patio area and then we go in here in the dark we can still see that we can see some things again if this is too dark i can adjust it in my post-processing volume but in general i would say that this scene um actually doesn't look too bad again just for a exterior we can absolutely keep pushing this even further but you know relatively quickly i mean minus minus my rambling of of how to set the stuff up i mean you could throw together a scene like this in a matter of you know uh five ten minutes at most so okay let me go ahead and just step through real quick and talk and talk about what things i changed above the defaults that we made again to give me this artistic choice so um if you watch the time lapse the first thing that i did was actually establish my directional light so i'm going to go ahead and uncheck my skylight i did duplicate this in fact actually this one where we use the hdri i've unchecked that i'll come back to that here in a second so i'm just going to show my directional light so if you know my methodology and the way i like to light the way anybody lights is i wanted to create um i wanted to draw the viewer's attention and the eye so all i did is i simply just kind of moved the light into position where i had some nice shadows and you know casting light on this building shadowed in this one so i've got that scene contrast so i simply just rotated it moved it a little bit to establish my light and the next process i do i just took my intensity down because again it was a little too bright for my taste and i used the temperature override because i wanted it to be a little bit more golden again there's multiple ways you could control this but i kind of wanted a warm looking sun and i did that the next setting that i changed and again this was a little bit later was my volumetric scattering intensity so if i'm looking through the trees you can see that i get a lot more of those god rays again if this was set to i think we had it at four it was just a little weak so i punched it up to 10 you could go up however high don't go crazy so i bumped that up and i believe that was pretty much it um yeah i left everything else the same on there so that was my directional light the next process that i did so if i go back to my captured scene and turn on effects so again this is with it baked um i didn't like what the hdri was doing for me um so if i take off the captured scene this may break it and turn on our hdri this wasn't bad it didn't look terrible but when i combined it with my directional light i just wasn't getting the effect that i wanted now the first thing that i did is actually went in if you notice here in fact i covered this in a previous video i'll show you real quick though go to your view options in your content browser show engine content click your engine content and just search for sm underscore color calibrator which is what here drag it into your scene um this is what i was using for mine so if i go over to here in particular i'm looking at this chrome ball um so i rotated the cube map you can kind of see here uh to get it in position so you can see there's my skylight the hdri where the sun matched up and i use that so technically the hdri is trying to project from the same distance it doesn't look bad but again it wasn't quite exactly what i wanted so i broke my rule of saying you know normally use the ssl specified queue map and i changed it to capture it same so i'm going to go and just uncheck this effects world go to captured scene turn this on excuse me turn this on and now this is a little bit different so going back to a previous uh thing that i said is that whenever you add your skylight at the start and you really don't have any lighting or anything going on the scene it's really not going to capture anything so that's why adding it towards the end or changing it to captured scene does make a difference because i had the light on and everything so uh what i changed in this one is i simply just set my light color so i actually tinted it a little bit more so you can see here kind of what it's doing um i wanted something that was a little bit cooler um you know you can change it whatever um it's fine and then um i believe uh yeah so i did change the uh lower lower hemisphere is a solid color the reason for that with the captured scene if we go down you can see that it's just simply capturing white so there's really no information there so by checking it you can kind of see the effect in particular under here and i simply tinted it more of a brown color because if i look on the ground here there's a lot more brown in my scene so uh that was pretty much it that was all i changed on my um on my actual skylight based off of the previous one and then finally the last thing that it is i just went into my exponential height fog and just changed some of the settings to uh push the atmosphere in um take it down a little bit change the color um and that was that was pretty much it i don't think i changed oh yes i did change this so with our volumetric fog i had the scattering distribution set to zero which you can see if i go through you still get something but i went ahead and just took this up to 0.9 just so it gave me a little bit more atmospherics which again you can kind of see here as well does play into that part and that's it so again um to kind of recap what this video covers this is not a all inclusive uh cover every single setting that you can change really this is more designed to give you a small tool set to create exterior lighting for your scene um at just a quick start now again you can spend days months perfecting this lighting making it look great adding different things but really this setup here is designed more to allow you to have exterior lighting for just about any platform and again that's coming from experience having developed for consoles that are heavily heavily limited this does work um granted there are some things you'd want to turn off for things like the switch but i digress so this at least gives you everything that you need to set up next to your scene uh from scratch quickly get you up and going be able to see everything and start playing around so um as always i hope this helps out please keep the comments coming that helps me know where you guys are struggling with game development in particular with unreal engine and what i can do so i hope you enjoyed this video again um i i will say that there are other videos coming down the pipe eventually to cover a lot more in detail a lot of these settings and what to do um so stay tuned again thanks for watching catch you in the next one [Music]
Info
Channel: Ryan Manning
Views: 65,831
Rating: 4.9637461 out of 5
Keywords: UE4, Training, Game Dev, Tutorial, Unreal Engine, Lighting, Exteriors, Skylight, Directional Light, Exponential Height Fog, Exterior Lighting, Exterior, Sky, Fog, HDRI
Id: tD3HYY67XpY
Channel Id: undefined
Length: 54min 45sec (3285 seconds)
Published: Wed Jan 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.