Demystifying the Skylight [Unreal Engine 4 & 5]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone welcome back it's great to see you again it gets a little bit lonely in this void here the topic of today's video concerns the skylight actor so the skylight is one of the most powerful but most misunderstood and misused lighting tools in the unreal engine so most of what we're talking about today has already been covered in last week's live stream right here but i wanted to make a dedicated video about this because i totally understand that not everyone had the time to listen to a two-hour live stream that being said this was less of a two-hour live stream and more of a two-hour live course i was going ahead and talking about the skylight talking about my workflow when it comes to lighting exteriors it was a really good time and not just because you know i was talking for two hours but you guys the community was one of the best parts of this live stream you got asked questions you answer your own questions as well as well offering other tips and tricks that even i didn't even know about i've been using unreal for what 10 12 years now and i'm the first to admit that i'm still learning new things every single day i am an eternal student and there's so much to learn so if you want the length of that livestream you can find it right there right there it's hidden but it's there and i encourage you to either go watch it and to come join us in the next live stream we'll be happy to have you so i'm fully aware that i've been talking for way too long now you want the juicy tidbits of information so let's get started all right so now that we're in unreal the first thing i always do before even placing any light is to create a chrome ball okay so we're gonna go ahead and add a sphere here i'm gonna drop it in here and i'm going to add in chrome material to it and you'll see the chrome material is very simple it's just a base color of 0.8 or can be one one in the other having the metallic set the one and the roughness at the zero okay so this is going to give you a perfectly reflective surface now the reason i create a chrome ball here is because it's going to give me a better visualization of what exactly is being reflected in my scene okay so you're gonna understand how this works real soon so bear with me now that we've created our chrome ball here i'm gonna go ahead and add in the lights panel up here i'm gonna go add the skylight now look at the boring part out of the way one of the main things that the skylight is used for is for hdri so if you have an hdri that you got online and you want to use that you apply that with the skylight so if you have an hdri that you found online and you want to use that for your lighting you apply it to your skylight so in order to do that you need to go into the details panel and in source type right here we're going to go click on sls specified cube map okay so once that's done you can choose your cube map right here and we're going to go just use one of these for example and you'll see right away we have we can kind of see our tree that our hdri is showing up in the reflection of our chrome ball this is why the chrome bulb is so useful because it really shows you what's being lit in your scene all right so now that we've covered how to use an hdri let's get into the fun part and why the skylight is such a powerful tool okay so i'm going to reset this right here i'm just going to leave it the captured scene and now it's where things get a little bit interesting so what i'm going to do first and foremost is i'm going to disable ray tracing because i don't want any rage rate reflections affecting my crow ball i want to make sure that the chrome ball is only showing what the skylight is doing to it okay so i'm going to use a console command and turn off ray tracing and so you'll see now we've got no more screen ray trace reflections on our chrome ball here just we just have the sky and a big black bottom of the sphere here now the first thing i like to do when using the skylight is i like to set it to movable right here uh the reason for that is if you have distance fields enabled in your project so distance field ambient occlusion you're going to get much better shadowing with the movable skylight if you're using race racing you don't need to worry about that you're going to get proper raytrade shadows if you choose the checkbox um obviously if you're baking the light that's another topic entirely but for now we're going with dynamic lighting set it to movable now the skylight by default has a myriad of settings that are pretty self-explanatory like in intensity scale you know we can choose the brightness of our of our skylight here we can choose the light color add a tint to it like this whatever you want that's pretty straightforward i think everyone understands this effects worlds and the effect tool is kind of an important one because as you probably noticed if you hide the hot the skylight in the outliner right here you'll notice it's still affecting our scene it doesn't actually hide anything so in order to hide the skylight you need to disable effect world like this okay now the next thing i like to do is if you scroll down notice how the bottom the chrome ball here is totally black that's because of lower hemisphere is solid color i usually turn that off for the most part there are some use cases where it can be useful but for the most part i tend to disable this so i'm going to uncheck this and notice how now we've got well instead of being black it's like blue why is that and that brings me to my next point the magical setting that is very often misunderstood or misused is right here sky distance threshold okay so by default it's set to 150 000 pay close attention to the reflections on the chrome ball when i set this down to one now notice now instead of being just you know just washed out blue flat color now we have some detail showing up in here we actually see the reflection of manny our mannequin here we have a little ball up here we have the grass showing up in our scene now notice that the chrome ball suddenly integrates with the environment so much better than it did before okay that's what the sky distance threshold does it captures what's immediately around it now so when you set the sky distance threshold to 1 it's really important to understand that the position of the skylight actor right here immediately affects what the reflections will be okay so let me demonstrate right here to show you what i mean i'm going to move the skylight actor like over here something like that and now we're going to scroll down all the way down here and you in skylight it says recapture scene all right i'm going to hit recapture and pay close attention to the reflections in the chrome ball again notice how they totally changed notice how now the mannequin our mannequin shows up way over here and same thing with our sphere shows up here right and if i move the skylight actor you know over here for example and i hit recapture one more time notice how the reflection change once again so you're i think i hope you're starting to understand what the skylight actor is doing when you hit recapture it's immediate basically becomes a reflection capture actor if you've ever worked with those you'll know what they do and that's basically what the skylight is doing okay so it'll update and capture what is immediately rounded now what exactly does this skydiving threshold do why is it that when it's set to 150 000 by default it doesn't include the surrounding environment the easiest way to visualize this is to imagine i'm gonna duplicate this just to give you an idea of what's happening okay i'm gonna duplicate this and i'm going to place a default material on it so imagine this gray ball right here okay imagine this is set to one imagine that this great ball is the skylight distance threshold set to one it captures everything that's around it now if i were to increase the sky distance threshold it would also increase the size of this sphere okay so now it ignores the reflection will totally ignore everything that's inside the sphere it'll only capture everything that's around it okay so if i made this you know 150 000 in scale you'll see notice how huge the our ball is here now right now it'll that means that the sky distant threshold or the skylight will only capture everything that's outside the radius of this sphere i hope this is starting to make sense let's demonstrate this one more time for you guys now if i select my skylight again and we change the sky distance threshold to a higher value like 100 notice how it's starting to ignore everything that's within a hundred units of it same thing if i set it to a thousand it starts to ignore everything that's within a thousand units does that start to make sense that's what the skylight is doing it's basically capturing what's around it and that's why i prefer having a sky distance threshold of one because then it creates an hdri for you that immediately displays what's around the actor itself okay this can really help you with the integration of your lighting helping your model feel more kind of integrated into the scene now you might be wondering well why don't i just check the box right here called real-time capture well the reason for that is that you when you have a real-time catcher turned on and we'll see this in a second it basically ignores the sky distance threshold which is kind of a bummer so let's uh visualize this real quick if i set this on you'll notice hey now we lost our surrounding environment now the advantage of having real time capture on is that if you update your lighting let's say let's give it a more of a sunset feeling here notice how our sky updated automatically so if you're trying to have a day and night cycle going on in your game or your project or whatever having real-time capture will really help things feel a little bit more natural now the major inconvenience of using real-time capture is that you lose the integration you lose the immediate surroundings of your model so turning off real time capture and i'm going to bring my sun back up a little bit and we're going to recapture the skylight intensity and now you'll see we have a way more interesting reflections than our in our scene this is how the skylight is supposed to be used i know it's weird but this is like one of those little things that people don't really know about so this is why i'm telling you about it once you understand how the skylight works your lighting is going to go to the next level now we're going to turn ray tracing back on and now you'll notice that there are there is another thing in the skylight that's for ray tracing so if i select my skylight again and i'm going to type ray the skylight has cast ray tracing shadows available now it's a little bit hard to visualize in this scene but i promise you let's let's turn it on and see what it does you'll notice we get much more interesting shadows showing up on your models especially like right around here notice how we had this really bright and green bounce going on which is not necessarily realistic now it can cast shadows and things kind of feel a bit more integrated so if you have ray tracing in your project cache ray tracing shadow goes a long way and if you don't have ray tracing no worries let's open up another level so i can show you another way that the skylight can cast shadows and that's with distance fields so i've opened a new level here it's part of the australia package that is available for free on the epic marketplace let's demonstrate what distance field ambient inclusion does okay so i'm going to select my skylight right here and in the search details panel i'm going to search for distance fields and now you'll see we have a bunch of different settings so i'm going to totally disable this just to show you what it's doing so now this is with nothing no inclusion and with occlusion no occlusion with occlusion you'll notice that distance field ao will give you much more oomph to your scene gets much more depth um and this is totally not ray trace this is one of the major advantages of using the dyson fields ambient occlusion is that you don't need raytracing for it to work and it looks pretty good as well so while i do prefer ray trace ambient inclusion this is a great alternative if you don't have an rtx graphics card and plus performance wise i do think it runs a lot better so if you're you know running if you're pushing your graphics card to its limits dfao is amazing and i'll show you guys how to enable that right here so let's go to the settings tab up here in project settings and we're going to type distance fields and it says right here generate mesh distance fields okay make sure that's enabled by default if you have ray tracing i don't think this is enabled so just go double check to make sure that the distance fields are generated in your project once they are then you'll have access to the distance field ambient occlusion settings in your skylight and you'll see you know it the results are day and night as you can see the skylight is not a complicated thing it's just a matter of understanding what the sky distance threshold does down here and once you've understood that things really start falling into place and i promise you your lighting will go to the next level and that my friend concludes this week's video in the event that this channel has helped you out in any way and you want to donate don't hesitate to check to buy me a coffee button found on my channel right here you can donate to any amount that you want it means the world to me and really goes a long way into helping me justify the time spent making all these videos making this content available to everyone for free so obviously no pressure but it's much appreciated that being said thanks so much for watching guys i hope you learned a little something don't forget to hit that like button and comment down below if you have any questions and i'll see you guys in the next video
Info
Channel: William Faucher
Views: 57,841
Rating: 4.9725575 out of 5
Keywords: UE4, Unreal Engine 4, Unreal Engine, Cinematics, 4.26, UE4 4.26, UE5, Realtime, realtime rendering, rendering, CGI, 3D, 3D Artist, lighting, skylight, ue4 skylight, exterior lighting, interior lighting, hdri, unreal engine 5
Id: BGoaPyfZlYg
Channel Id: undefined
Length: 13min 46sec (826 seconds)
Published: Tue May 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.