How I Light My Scenes in Unity 2020 Tutorial Beginner Friendly

Author:

Sykoo

Keywords:

unity vs ue4,unity vs unreal engine 4,unity or unreal engine,unity lighting,unity light,unity lights,unity light tutorial,unity lighting tutorial,unity hdrp,unity high definition render pipeline,unity hdrp light,unity hdrp level design,unity level design,unity speed level design,speed level art,game,unity3d,gamedev,indiedev,unity game development,unity make games,make games in unity,how to make games with unity,unity lights tutorial,sykoo,unity tutorial

Subtitles:
so in last week's video we made this level design and I promised in the pinned comment of that video that I would make a tutorial on the lighting so here we are what's up everybody its Sam here with the messy hair I just got my hair cut so don't judge me so it's a little it's a little song before we begin with this video I just want to say quickly a thank you to all of you for showing a lot of support on the previous episode of this series I I guess I can legitimately call this the series now that we actually have an episode to you and by the way if you don't know the episode one you can check it out through the link in the description I've actually created a playlist for them because I'm very organized so you can check it out from there anyway I'm not gonna hold you for any longer so wait let's get into it alright so here we are in unity I am using unity 20 19.4 which is the long term support version LTS it stands for and if you guys want to use the same version go ahead and do so feel free to but you don't have to you can also use 20 20 if you want to it should be pretty similar I think there will be minor changes to you like the names of fields and also acid compatibility but other than that everything should be fine so we're gonna be using HD RP because the video the level design itself initially is using HD RP as well which stands for the high definition render pipeline now if you don't have any ideas on what I'm talking about like HD RP what is that then feel free to check out the video that I'm gonna link in the description first before watching this one but if you say now Sam I got you bro I know what you're talking about then good let's get into it so first and foremost this scene is really freaking dark because basically I put all of the initial lighting objects so the directional lights and I'm gonna talk about why I'm using multiple ones into a parent game object called lighting and I just basically disabled it and this also includes the sky and fog volume which I basically duplicated so we have Mauri here which is the one that's active and it's just with the almost the default values so that we can actually edit it together in this video but the reason why it's so dark in here is because we basically don't have any directional light right now so let's go to game object go all the way down to lights go to light and then pick the directional light option now once you add it into the scene it's still gonna be really dark and that's simply because the intensity of this light is for some reason I actually don't know why is set to be very low so when you're using a Lux value for the intensity you actually need a much higher value than that so what I normally do is I just kind of like put a three and then go by zero zero zero and I feel like this is kind of a kind of a good enough lighting but obviously we're gonna edit it so I just kind of leave it there for now now I'm going to do this very similar I mean pretty much the same setup as I had in my initial level design video so what i'm gonna do is i'm also going to rotate the light to be pretty much in the same spot as it was in the initial video and by the way i keep talking about the initial video but if you haven't watched it I'm going to also link that in the description so you guys know what I'm talking about but that one you actually don't have to watch before you watch this one so yeah feel free to continue watching this now a couple things that are super important so actually three things that are super important number one the rotation of the light obviously as you can see when you rotate the light it's going to also affect the skybox or rather the sky behind it so depending on how low you have it it's going to become a little a little bit more like that red color which looks really nice for these types of levels but for that to really shine for that effect to really shine you need to make sure that you have the option enabled for effect physically-based sky now if you don't it's gonna look weird so you're probably gonna be like you know wondering why that looks weird but just make sure you guys have this option turned on you can also edit the flare size so how big you want the Sun to appear and how you want it to blend into the volumetric fog we can come back to it later but for now I think this looks pretty good number two or actually yeah that was number two number three very important thing is color temperature now the thing is you can just edit the color of the light itself but what's really important is that you actually keep it as you know as much as white as possible or maybe a little bit yellow depending on the type of you scene you're making but for instance for this theme what I did is I kept the filter to be completely white and then I just simply change the temperature of the light a little bit towards the hot values and to really see the effect of the temperature a lot more we can actually add one more zero to the end of the intensity for this light and that's gonna make it a lot more bright which is great because the thing is the lower you have the Sun in the horizon it's going to obviously not going to illuminate the scene as much but also it's just going to not affect the brass and the foliage on the ground basically any anything that's really close to the surface of the terrain or the ground that you guys have in the scene it's not going to be very much illuminated and it's not gonna be affected by the light as much there we go I feel like this looks really good now a couple things is I normally have the shadow dimmer of the volumetrics to be highest and the multiplier for volumetrics I normally keep it a little bit low not too high because if you if you just keep increasing it's going to take away the exposure from the sky itself which you really do want that blue the essence of gluing that sky because it just looks more real that way but also the fog if you just have it like this it really doesn't look very realistic so having a little bit of fog but not too much like this one is pretty good my favorite part shadows so make sure you guys enable shadow map by default here and then also enabled the contact shadows by setting this to be high and we can actually make this light a little bit more hot but also remember we were talked about the Sun itself so for the flare size you can actually put this to something around I mean you could literally just drag this value to play around with it and you know see the effect in the scene but what I did with my own scene is I put these numbers - well the flare size was about not 0.9 - 4 and then the flare fall-off was actually pretty low as well so about this value which if you look closely it just kind of makes it like it makes it look real because you sort of see a fade towards the bottom of the Sun but the top part is pretty much visible and this is especially good because it's very close to the fog so it's almost like blending into the initial color of the center of the fog which looks really good because the top part looks sharp and the bottom part just fades in now I feel like we are pretty much done with the directional light over here so what I'm gonna do is I'm gonna go ahead and show you guys why I added multiple light sources especially multiple directional lights into the initial scene so what I'm actually gonna do is I'll just to make it easier for all of us instead of repeating all the steps that I already took I'm just gonna literally drag and drop these directional lights in here now you're not gonna have them but what I'm gonna do is I'm gonna explain why I added them and we're also gonna take a look at the values that I was using in the lights so that you guys can actually learn from this now first and foremost the reason why I add them basically when you have a light that's really low into the horizon like we talked about before like for instance our Sun is all the way here it's not going to illuminate the ground as much and the thing is a lot of people usually think that I do this to add a lot more light to the the building and the constructions themselves like trees and you know high up objects but actually the problem is not the high up objects the problem is literally everything that's as close as it gets to the surface levels so on the terrain so for instance puddles and you know grass rocks pebbles and all that sort of stuff you can see how dark they all look like you can see the smoothness of the light hitting them but nothing behind them so what I do is I add these two different directional lights which I'm going to explain more but if we just enable them you can immediately see the effect that it has well first and foremost on the destruction but also on the ground now important note in HD RP you cannot have multiple directional lights with shadows enabled which makes sense because you know why would you have like three suns so if you don't disable the shadow maps on these two direction like basically on the extra directional lights then you're gonna have some weird effects going on so just make sure you disable them now both of these lights are pretty much similar in the way that they work so first and foremost I have disabled the effect physically-based sky on both of them actually one of them has it enabled so we can just disable and the reason why I'm disabling is because basically the directional lights are very much targeting the the you know the back side of the grass and back side of any object basically the opposite side that the Sun is facing so that we can actually have some nice back lights and for that reason you definitely don't want like it to shine a little bit white here at the top because there is another technically speaking another Sun that's hitting the objects in the scene so just have it disabled as for a color temperature I have it enabled on one of them and the reason why is because I still want that really definite control over how how the light actually functions and we can actually go to the one where I have it it pretty much simulates what the Sun has as for a temperature so so that the light that's hitting as the backlight for objects isn't actually way too bright like if you change the temperature you can really see the effect and when you have it like this it really does look more natural I also have the volumetrics disabled on both of them because again I don't want them to affect the volumetrics nor the sky itself and the intensity on both of them is very low as well because from 550 if I change it to a thousand five hundred fifty you can see the effect a lot more clearly and you you probably don't want it that much and speaking of that much I actually do one more thing so on in addition to adding these two directional lights you can see that the the Sun is hitting from this way right so the hell should not be eliminated as much here however I do like having this lighting effect unlike this rock these you know the reflections over here the grass and all that stuff that we covered so what I do is I go into my sky and fog volume and in here I enabled the indirect lighting controller override and boom it becomes a little bit darker which looks really cool now the values that I'm using for this indirect lighting controller is for indirect diffusing intensity this is going to normally be set to one because that's actually the default value even if you have it like disabled now normally a lot of people change it to be higher than this but obviously in our scene we don't really need any more indirect diffuse intensity so what I do is I actually decrease it so I just reduce it to 0.5 and it makes the house you know darker which looks cool and the rock becomes a little darker which also looks really nice the ground is also getting a little bit of this effect but the grass is not getting affected too much because there are still two directional lights that are hitting the grass very nicely as for the well the direction of both of these directional lights so basically the rotation you can really pick how you want to rotate them but it really did it's it's a way for you to define the well first and foremost the rotation that the like actually hits the objects the back surfaces of your objects but also it just enables for more positions so for my scene I just kind of have one of them hit the grass from this side so that it compensates for where it's really dark and the other one is pretty much from this side over here so that it also compensates the lack of lighting from this side because again the directional light is very low so it's not really going to affect these sides of the grass so I kind of just want something that's going to affect the sides so long story short long answer but in the short term it's the the extra directional lights just allows you more position first and foremost but also just a better viable option for you know compensating the lack of light from one specific direction so if if the side of your objects is a specific side of your objects is becoming really dark you can use directional lights for that now another thing that I'm gonna add into my scene is a reflection probes so what we're gonna do is we're gonna go to game object one more time go into light and then pick the reflection probe now this reflection probe we're gonna move this guy up here and I'm pretty much just gonna place it around the next to the house pretty much in front of the camera and just actually more precisely its going to be above the puddles so we just want to add some reflections specifically to them now the box size is pretty small as you can see it doesn't affect a very big area so what I'm gonna do is I'm gonna put the X value to 100 and I'm gonna do the same for it Y & Z and let's keep it as um yeah let's keep it as baked you can also put it to real time if you want to use that type but I'm just gonna keep it at baked and then just browse all the way down and press bake and there we go I think this looks better the puddle here is not as shiny because there's obviously a rock that's blocking it and also the house is you know a part of the reflection whereas the reflection of the Sun on this puddle right here is beautifully executed and yeah after all that you get a result that looks similar to this it's pretty similar it's not exactly the same but I think I like it I think it looks natural enough the light here is bright enough and the light here is dark enough because there are just more shadows here and here there aren't that many let me know what you guys think of the scene I know you guys left a lot of well left a lot of lights I was gonna say but just showed in general a bunch of support for the other initial level design video which I really appreciate so thank you guys so much for that but let me know if you guys want to see any extra tutorials on this this scene specifically or maybe if you want me to create a a another scene and make a tutorial out of that let me know what kind of scene you have in your mind and I can try to make that as well alright so that's pretty much did you know that I cut my hair can you tell I mean I mean you never know anyway so that's gonna be pretty much it for this video hope you guys enjoyed and had some fun I think this was a pretty cool tutorial to make I I feel like there was a need for specifically this use case type of tutorial because in that level design video I actually spent more of the most of the time on the lighting which you probably are able to tell if you watch that video but yeah let me know in the comments section guys if you have any ideas on what I should do next because I feel like we can keep making this series a long-term project as in terms of like making more level designs and actually making more tutorials out of them because I feel like that's what you guys have been wanting to you then again I will just repeat what I said in the in the video for like a month ago or so I I will be making long format tutorials for how to make a level so that's coming as well all right sounds good I'm sorry that was super loud my claps are by the way super loud I don't know if you actually could tell that isn't that loud there you go a good way to end the video all right folks sounds good thank you so much for watching this video I hope you guys enjoyed if you did and wanna see more and make sure to hit the like button I completely forgot how to do my interest hold on make sure you give this video a thumbs up to show some support and hit the subscribe button two steps tuned for new videos and turn on the bail notification the outro sub becomes so long and on that thank you so much for watching I will leave you guys with a cool outro music a Turkish music alright guys peace out have a good one you

Loading