Unreal Engine 4: Dynamic Realistic Interior Lighting for Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everybody welcome back to the channel in this video i'm going to talk about the basics of dynamic lighting i already have a video on real time right tracing in unreal but i'm just going to go on deep dive into how to use those features and how to use certain techniques to light interior rooms because it's not as straightforward as an outdoor scene now if you're interested in me doing a tutorial on how to do big light maps just please leave it in the comment section below the reason why i'm going with dynamic lighting is because i see that's the future of this engine if you look at the unreal engine presentation for unreal engine 5 that was pretty much what they're going towards is try to avoid static lighting try to avoid big maps that being said that technique still has its uses so if you'd like me to talk about that please leave it in the comment section below but for now let's just talk about dynamic lighting all right so what i did is i got rid of all my lights my post processing volume and everything that i had lighting this situation except for what you're gonna get as default so if you get if you start a new project as default what you're going to get in terms of lighting is skylight which i took out because we're going to talk about that later on but you're going to get a light source which is right here and you're going to get your sky with an atmosphere as so this is pretty much what you get with the default project unless you choose an empty project but let's start from this setting now as you're seeing here let me turn on the editor i have a bunch of decals here too giving this scene a little bit of life so if you want to know a little bit more about decals there's a link to a video that i made about that it's actually the video before this when it comes to light going in right now we're seeing is just the direct light so this is a regular directional light a directional light is an infinite source of light that means that it's just going to go everywhere until it hits a geometry that's blocking it which is why i can move it around and it doesn't affect it the only thing that affects the light source is rotation so as you can see there you go but right now what we have is direct light we don't have indirect light and in direct light is that bounce that goes around whenever you have light like this coming inside a room you're gonna see the whole room lit up because that's how light works in the real world it bounces around and it creates a lot of indirect light that's not how it works in engines so we need to force it in other ways that being said real-time ray tracing is allowing us to do those bounce lights and get a more natural indirect lighting what i'm going to do now is bring in a post process volume so you can bring in a post process volume right here just leave it here by the way uh since we're doing real time right tracing make sure you have all those ray tracing settings uh i have a video for that on how to get ray tracing on your scene please make sure you watch that if you have not gotten a right tracing pro real time right tracing project because that's what we're working with and make sure your light is set up to movable all right so moving on to the post processing volume this is how we are going to start using the real time rate tracing now for this to work what we need to do is we need to tell this post processing volume to be infinite because otherwise the only way that this post processing volume is working is when you're inside of it so let's just check this here that means that this post-processing volume is going to work on all the scene not just the space that it's occupying now after that we're going to go to rendering features and underneath we're going to go to ray tracing global illumination now you're going to see that we have three types of properties so i'm just going to enable them all and you're going to see that nothing happens if i increase the samples here nothing happens because it's disabled we have two types of ray tracing global illumination one of them is brute force which let's see what happens if i click here and as you can see this instantly lights up let me go to the game view so i get rid of all of these icons you can you can see that after i switch to my ray tracing global illumination brute force this scene actually lit up and that is because now ray tracing is doing the other part of global illumination now for brute force which from what i've read on the documentation and videos that i've watched from epic this is the most accurate type of lighting and what we need to do in this case is we can decide how many bounces of this light we want so right now we have only one bounce so that means the light's coming through here and it's bouncing on the walls one time if we do two times you're gonna see that brighten up the scene let's go something more exaggerated like eight okay that that doesn't change anything that means that there's always a threshold of how many bounce lights we can get and that means that the more we bounce the light it doesn't matter it's not going to change our scene because bouncing two times it's all that's going to affect our scene in this case so if you want to get a little bit more light and you already have two bounces you can always go into your light source and we're going to increase this to let's say a hundred and you're gonna see how this thing brightens up all right so this is a quick way to brighten up your scene however you're gonna see some noise around here and you're gonna see that the scene is a little bit choppy it's because brute force it's because it's the highest quality it's the most accurate it's also the heaviest and because of that i think brute force was created for rendering so if you're just creating still images for portfolio brute force could be a good way to do things otherwise this is actually going to be killing up your performance and we just need to bump this down to one and as we can see that's still very nice so but we are getting a lot of noise back here and over here as well the way that you get rid of that noise is by increasing the samples per pixels so if you want this up to eight you're going to see that the noise gets reduced a little bit not so much so we probably need to increase it all the way to 16 with 16 it's almost gone uh there's still a little bit of motion here but it our scene it's a little bit more manageable even though it's a little bit choppy because of all that sampling now let me go back to my post-processing volume and talk about the other type of real time right tracing that we have here and that is final gather so when we switch to final gather and let me bring this down this is quote unquote the cheapest version of the real time rate tracing now you're seeing a bunch of things floating all around this area and that is because uh it's trying to calculate the light so the bigger the this noise here that means you just need to increase your samples when it comes to final gather the amount of bounces actually doesn't matter and you can see how fast the scene got just by switching to final gather if i increase the bounce to 16 see that doesn't change anything so for final gather bounces are not going to do a thing what's going to help you out is the samples per pixel in this case i'm gonna up it to 16 you're gonna see how that noise change and actually kind of went away not completely but it does help the scene a lot so a big part of that noise just went away so let's increase our light source but as you can see our scene it's only lit uh it's not as lit as it was with the brute force the brute force was actually bouncing the light a lot more so let's do 500 and you can see this lights up the scene a lot the problem with just increasing the intensity of the light source or the directional light sorry is that at some point you're gonna get this now i can see my scene a lot better now but it does feel like the sun is right next to this building so this doesn't give us a natural look this actually gives a very ugly look and it's really really bright you could play with the exposure here but that won't help you too much so what we're going to do is we're going to find a happy medium by using other types of light so not just directional light but we're using other types of lights in the windows that are going to help lit up the room without actually having our directional light pretty much looking like a nuclear explosion next to the building so i'm just going to bring that back to 100 or even less let's do 50. and what we're going to do now is we're going to be adding rectangle lights so rectangle lights are really like these lights as you can see here we have several types of light there is point light i haven't used porn lights in a while i don't like using porn lights because it's really artificial and it does take a lot of resources spotlights is mostly for when you have those lamp posts or if you have an actual lamp up here and rectangle lights are the more versatile kind of lights if you use an offline renderer like v-ray you're going to be very familiar with these kinds of light because they do look like vray lights so i'm just going to go back to my editor mode so i can see all my icons and what i'm going to do is i'm going to use this rectangle lights as lights that are coming through the window so i'm just going to get it out all the way here and you instantly see how much that is helping but i'm just going to make it the same size as my window here and with the rectangle light rescaling doesn't do anything so if i go and do this you're going to see that this just changes the attenuation radius i want to change this shape right here the way you change that shape is by going here into the source width and height so just change my source like this and go uh i think this is just right okay now you see how much our scene is being lit right now a lot better so let me just toggle it so you can see what's up check it out that really helps to light our scene without actually blowing up the direction light which again it looked really terrible like the sun was right next to us and because brute force is so much more expensive then we still need to go to this little tricks here of getting some light in other ways so i'm just going to increase it all the way over here and as you can see i have this part right here i'm just going to tell it to switch it to movable that message goes away and i'm fully dynamic right now i think there's very little light coming in here because i have too many planks so there you go now let's put one over here so i'm going to hold alt so i can clone that light actually before we clone that knight let's edit some of some of this feature so they're all the same uh i think eight is fine for now what i like to do when it comes to uh the color of my light i like to play with the temperature as opposed to playing with the color unless you're doing something sci-fi uh the temperature is something that's easy to find you can go online and see the temperature of various lights if i want to turn the light warmer i go a lower value if i want to turn a light cooler i go higher value so just to give you an example of a cooler light would be let's go to 8000 and let's turn off that directional light so you can see that our light is a lot bluish so if we go to [Music] 2000 you're gonna see that our lights pretty much right all right so that's how temperature works now i'm going to go with 5 20 50 200 that's more of a warm ish light and as you can see there is a reason why i need the directional light because even though i have this light right here helping me out with the extra global illumination i don't have that effect of the light coming through the window so that's why i do need both lights so let me uncheck this one and there you go we can actually diminish this down a little bit and now let's keep working with this light i'm going to actually hold alt and take out another one here there you go so as you can see it's looking really nice and if i turn that off you can see that having those lights there really helps out the extra illumination just because i cannot be using brute force it's it's still a very slow solution i would use brute force whenever i do need to have that you know whenever i'm doing stills but for now i'm just going to be using final gather and for this one i'm just going to try to make the shape of this window there you go alright so i'm gonna go to my camera and get rid of all those icons and as you can see this actually brightens up the room so if i go to my rectangular lights and i turn them all off you're gonna see that this looks so much darker i could still just use the directional light by turning on the root force which does a lot with the bouncing light but another way and a cheaper way to achieve this is by turning on these two these other lights that i have here helping me out with the global illumination of this whole scene so again just a little trick something to help you out because it's not straightforward like lighting an exterior scene just drop in the sky and you're done you don't have to do anything extra in these kinds of scene if you want to use dynamic light then you will have to resort to using those little tricks like adding those uh lights and and one of the nicest things is you can get this volumetric feeling over here that's really nice now one thing that's really important whenever you're doing right tracing if you turn ray tracing off after the fact so you didn't make a ray tracing project from the get-go you need to make sure that you are casting ray tracing shadows because if you don't then you're gonna see that see this little diffuse over here it's very easy to tell if i turn off ray tracing shadows you can see that that turns into a really harsh kind of shadows and the other way that i like to soften off a little bit of these shadows right here is by increasing the source angle so the default source angle is like this and it's really tight sometimes it's not the most realistic so what i like to do is i increase the source angle a little bit let's say the two and you get that little bit of uh diffuse i think it's called penumbra the in between complete light and complete shadow so there you go that's how to quickly light an interior scene and that's kind of like helping out that uh dynamic lighting factor if you were doing static lighting you will be working with the indirect light intensity and you have to build your lights and that's how you figure out what kind of uh gi or global illumination you are getting for your scene with dynamic lighting is a little bit easier but sometimes it's not as straightforward just because of the fact that we don't have a complete solution that's 100 accurate when it comes to the bounces so we're required to do this little tricks i hope you enjoyed this video please let me know what you think in the comments below let me know what other videos you'd like to see in the channel uh please leave like share the video around subscribe all that good stuff and i'll see you in the next video
Info
Channel: MR3D-Dev
Views: 12,764
Rating: undefined out of 5
Keywords: Realistic Light UE4, Lighting in UE4 from scratch, Real time ray tracing for beginners, Quixel, Megascans, Lighting in Unreal Engine 4.25, Rectangle light tutorial, Interior lighting for beginners
Id: RkYe876N5I0
Channel Id: undefined
Length: 17min 36sec (1056 seconds)
Published: Sun Aug 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.