UE4 Interior Lighting Series (Part 2)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so before we dive into actually lighting the scene there's a couple different settings that we want to change to give us a much higher quality bake results and ultimately how our light affects the world so to do that I'm gonna jump over to my world settings now if you go under window and it should be here world settings of a doesn't display it will open this new panel and there are a few settings that we want to change in particular in this light mass setting so by default you'll probably look like this if you expand the triangle and the light mass settings this will get us into where we need to start making our adjustments if you follow this to a tee on every project that you have I can tell you that you'll have great results no matter what so even though this is per level so when you create a new map each one of these has this it's not necessarily a scale issue although you may see variances in that with larger scenes but for the most part if you just use the settings that have here you should get great results every time so let's run through the settings real fast so my static lighting level scale I'm taken to 0.5 the lower that you adjust this the higher your render times but the better solver the Bakke has with your scene what that means is that by lowering your level scale you'll get a more precise render or I should say you'll get a much more precise lighting bake now with this I'm gonna jump over to this one which is our indirect lighting quality both of these have an inherent relationship together and what that means is your static lighting level scale multiplied by your indirect lighting quality should be on or about one at minimum now if you do the math here you'll see 0.5 and 4 should get us to so I'm kind of breaking that rule there but for a good reason but ideally the best place to start would be set your static lighting level scale to say like 0.5 0.25 and change your indirect lighting quality to 2 or 4 so it equals 1 now what I've done in this situation is by changing it to 4 I'm actually getting a little bit more precise render but again there's a diminishing return there so if you have this set of say 0.5 and 2 you should be totally fine the next two settings that I want to are my number of indirect lighting bounces both form the default and for my skylight I want to say when these come in by default they're three and one for arc vis that's just not enough what that means is that you know if your light comes in and it hits your floor that's one bounce it hits your ceiling that's two bounds it's another object is three it stops calculating after that point so we want to crank this up to about ten for both our indirect lighting bounces and skylight bounces to ten if you do some research on the internet you will probably find people to bump this up to say like 50 a hundred I don't want to say that they're being ignorant in that but they just don't know there was a great article that was done about kind of the diminishing returns of this I'm gonna tell you right now anything from eight to ten or above that you're actually not gonna really notice it to be honest with you so by setting it to around ten both of these you will ensure that you both get a faster bake and that you don't have a light that's just bouncing all over the place and really not getting you much of a benefit game from that so 10 and 10 on both of those should be absolutely perfect compress light Maps this is one that you need to determine on your project if you want to use or not by compressing it it will help to make your package size lower so say for example this is going out to VR you may want to have this on compress the light map so again it's not trying to load a ton of data into the headset but you can uncheck this if you want much higher quality results it's really up to you you can take it or leave it and then the next thing that I've changed here as well is my volumetric light map detail size by lowering this it helps to get a final resolution of points without going into much detail the volumetric light map when it bakes lighting is something that helps to kind of fill in the a mizue be seen if you have objects moving through it that volumetric light map is what's casting theoretically it's not dynamic but it's what's casting the light on those object is moved so by setting this lower I think the default is like 200 by setting it lower it just kind of makes a denser volumetric light map so in this case this project 90 works great for that and the last thing that I want to check is down here ignore this one this is how you actually get rid of lighting if you didn't know that so if you'd check force no precomputed lighting build your lighting it's instantaneous it wipes all of your light so that's a great way to kind of just erase everything so you know is starting from fresh but the last thing that I want to change is this packed light and shadow map texture size 2048 is great it works great for VR especially for like the oculus go the oculus quest but set it to like 4096 is fine too really don't go any higher than that because that that is substantially high on your texture resolution but that should be a good place so if you set these settings in your world settings before you build your lighting you should get a really nice rich detailed lighting out of the gate so okay let's move on now actually to the fun part which is where we actually start lighting in part one of this series we covered setting up our initial scene and getting all of our parameters and various different components that we needed to make sure we had the best lighting possible the thing that I've done in between then and I'll switch over real fast to our optimization view modes go to my light map density you can see that I've made sure everything's within relatively the same range so I wanted everything with kind of in that orange to orange red range to get us really the best lighting results possible some things are in red that's fine again as I prefaced a lot of these assets were either implemented from the marketplace or they came from maybe an artist who wasn't quite as concerned about Lena TV's appropriately but this will give us the best results possible still so that's the only thing that's really changed in between when we did our initial setup so I'm gonna go ahead and go back into our little let's go into unlit mode for just a second and the first thing that I want to cover is really kind of getting the fun bits in here that we get to see our lighting now Before we jump straight into lighting the first thing I want to cover is kind of this the sky sphere that I have out here which is based on an HDR I I'm sure this will be something that as you're doing interiors and you have windows you're going to want to project that so how do we do that so let me go and just pull this window over real fast and show you the setup that we have here so this is the HDR that I'm using there's really nothing super complicated about this this is one that I found on the Internet I think I did find this from HDR I haven imported it and it's great there are a couple things though that you need to change otherwise the resolution in your scene is going to be too low so to override the default resolution all we need to do right here is maximum texture size set it to 4096 and that should go ahead and compress it at the highest now I believe this one no it was a 4096 imported so set in our maximum texture size to 4096 issue by default go ahead and import as an HDR which is fine srgb should be unchecked and then lastly what we need to do to ensure that this doesn't scale down or MIT as it's called is underneath our level of detail MIT Gem settings change that to no MIT maps that will force this image to display at your maximum texture size at all times so that's how we're gonna get this very nice kind of crisp background otherwise it would be blurry okay so that's the first step with our HDR I I'm gonna bring up the master material that I have for this guy and I'll just leave this on screen I'm not gonna dive too deep into this but it should be pretty obvious there's a few parameters that we have in here a rotate about access normalize and then I've taken one of my texture inputs and converted this to a parameter as well so I can change the scene out if I'm one of the daytime a night time it's all going to be relatively the same and use the same parameters and finally pass it into a multiply and set its brightness to 1 now I don't believe there was anything actually the only thing we did change on the material itself on the master was shift its shading model to unlit so those would make sure that always displays doesn't cast any lighting doesn't take any lighting and then set it to two-sided so again you guys can take a screenshot of this if you want me to go deeper into this setup or what we did with it drop a comment we'll come back to this but if you set this material exactly the way I have it it should work just fine and then finally I've created an instance of this which is what you see here in the scene I've applied that kind of düsseldorf bridge that we have that I showed earlier I have a sign as made sure I I've bumped the brightness up just a little bit and then I also have this rotation angle that actually derives from this material that we set up which is this rotation angle in our rotate about axis so if I move this and we'll go ahead and scale this down a little bit and I'll kind of jump out of the building for a second this rotation about angle allows me to turn that HDRI in my scene which is great so I can set up the Sun position relative to where I want it so again I'm not gonna dive any deeper than that on this material if you are interested in a set up drop a comment I'll come back to this revisit and show you how was exactly set up but that gets our exterior so okay what kind of jump back in and now what we're going to move on to is the fun bits of actually starting to do our lighting so let's go ahead and jump and do that all right so I'm going to go ahead and jump over into lit mode so we can start seeing what's happening here so the two things that I'm going to add which will probably be added no matter what for every project that you do are a directional light and a skylight the directional light is going to be essentially what is our main light source in this case the Sun and our skylight is going to provide that ambient light so I'm gonna go ahead and go over to my modes panel and I'm gonna type in light drag in a directional light will switch back to game mode by pressing G and then I'm also going to add in a skylight so there we go so these are the two components that we need to start off with now I'm gonna go ahead and turn off this preview shadow indicators because I know lighting needs to be rebuilt because our lights are set as stationary which means they do contribute to our baked lighting so to do that I'm gonna go ahead and go into show and I'm gonna go to I think it's visualize preview shadow indicators turn that off and there we go so now it's not gonna be so annoying okay so these are our two lights now before I click the bake lighting there are a couple things that I want to change to get me the best lighting possible so what I'm gonna do is I'm gonna focus on my lights now something that you will see throughout this this whole process is that I very much enjoy the the workflow of isolating certain aspects focusing on those isolate the next one the next one the next one and then combine them all together at the end as opposed to just trying to constantly layer and figure out what's happening to what so that's how I'm going to approach this next process so to do that I'm gonna take my skylight I'm actually going to disable it by affecting world so this way I can just focus on my directional light now in this one so I'm gonna go okay rotate it let me go and turn off my snap a little bit smoother so there we go kind of give me a little bit of an angle and maybe some nicer looking shadows okay there we go so now that I have generally speaking the direction of there's our Sun right there coming in the window looks pretty close this is a good setup alright now we need to go in and actually start adjusting some of these parameters now you may see throughout this additional settings if there just click this little triangle down and it will expose those so if something's unrolled you don't see it on yours just click that little upside-down triangle alright so the first thing that I want to do is go in here and I'm gonna go ahead and adjust my intensity so I'm gonna take this up now I want to say in this case because I'm using Lux it should be thirty one point four should be kind of the ideal I'm actually gonna take this guy to up to about thirty six to get me a really nice crisp bright sunlight coming in the next thing that I want to do is there's two options here you can actually color your light using an actual color picker I personally prefer when working in real kind of more realistic looking seams I like to use temperature so in this one we can cool it or we can warm it a little bit I think we're going to set mine to about forty four hundred well should get me kind of a nice warm sunset glow if you remember our HDR I has kind of that that warm glow you could also pick a color from the HTR but 4400 works fine for me again this is purely just your own call make it whatever color you want they'll really care okay and then the last bit I think everything should be set casting our shadows that's all good the last bit that we're gonna cover and this is going to be seen throughout the rest of this is a problem you're gonna face in fact I see a lot of people face when it comes to lighting arc-v' is is it's great that your light comes in so for example this theoretical Sun it comes in it hits the floor and then it just kind of dies there right like it doesn't really illuminate our scene very well the way we adjust that and the best way possible is underneath our light is this indirect lighting intensity there are a few other ways we can do this I won't cover those now but just know and you'll see me as we go throughout this whole process this is ultimately what we're going to adjust so intensity is our first point of contact which in this case is where the Sun hits the floor so that's going to make that brighter or darker and then our indirect lighting intensity is was ultimately going to help that light to fill the rest of the scene so we'll adjust this now I'm gonna go ahead and put this up - well actually you know what I'll show you real fast so I'm gonna go ahead and just do a quick build so I'm gonna keep our lighting quality on preview again we don't have our skylight even though it's visible here it's actually not affecting the world so the only light we have here is our directional light so I'm gonna set my build to preview and then I'm gonna head and just do build lighting only we'll let this turn watch that should be fairly quick and then we'll jump back and watch to see the results that we get from just our initial light setup without having our indirect lights and lighting intensity setup so we'll let this bake and we'll be right back okay so our Lighting's done building and you can see immediately the problem I was talking about with creating more realistic Lighting's so the light coming in is great this first point of contact is spot-on it looks good it's not overexposed it's not underexposed but the rest of my scene is pretty dark and the reason for that is this light just doesn't have enough energy or intensity to fill the scene so I don't want to go in here and and boost up my intensity because that will change excuse me my first point of contact what I want to do is actually bump up this indirect lighting intensity now I don't have like a mathematical formula for how high this needs to be but know that in many use cases I've seen this indirect lighting intensity go up to 200 so you've got a pretty broad range there of what you can work with now I'm gonna change this now I did some some tests as I was putting together this series and I found that 50 actually works really well so what does it do that's the magic let's go ahead and just build our lighting again this should be relatively a little bit quicker now that we have our scene data set up but by simply changing our indirect lighting lighting intensity you should see a difference here kind of in the rest of the ambient light now again it won't change the light that's hitting on this first point of contact with the light what it's going to change is the ultimate ambient light that comes from or derives from this light in the scene so we'll go ahead and at that that build jump right back and we'll see the results that we get okay so now you can see the same looks drum different by just simply changing our indirect lighting intensity from this one source light immediately regime starts to look a lot more realistic so pat yourself on the back you are now becoming a intermediate to advanced lighting artist I joke about that but really that is that is the key when it comes to lighting your scene especially with baked lighting that is the key indirect lighting intensity is what's going to allow you to push that ambient light baked into the scene so yeah all right now one thing I will know if you notice there's kind of some splotchiness on that ignore that for now the reason for that is because if you remember in our build settings our light quality was set to preview that's what this is gonna look like so I can tell you from experience that you won't have kind of these weird light bleeds when you go to production build however just know that you know early on I don't recommend going above medium or preview on your light settings because your build times will take substantially longer and of course when you're initially setting up your lights there's gonna be a lot of iteration testing and back and forth so by keeping it on preview you will get some of these splotches of shadows but again those should go away when you go to production mode so okay so this is great now I guess I should take a step back and make a note here that our directional light is currently set to stationary which means that we're going to have some dynamic shadows but I'll also bake effectively we could get very similar results with this by setting it to static in fact that's that's what we will ultimately do with our skylight so I'll go ahead and enable this guy turn on effects world now again this is set to stationary I'm going to set it to purely just static which it looks like it disappears if you need to do some fast testing iterations switch it to movable or stationary and what you should get is dynamic light adjust it kind of close to the results that you want to get but then when it comes time to bake we'll put it back to static now with this one I can tell you that the scene itself isn't really benefiting a whole lot from our our skylight just because most of the light that we have is actually coming from the main sunlight and these fill lights that we'll have later on but for the purposes of this demo they're gonna be many situations where you will use a skylight so let's just cover that real quick the process of setting up your skylight to get the results that you want with it okay so jumping back to a principle I had mentioned earlier that I'm very fond of when it comes to lighting which is isolation I'm gonna go ahead and take my directional light and actually hide it but I can also I also mean make sure that and check affects world so if I have affects world on it will still bake in the lighting even though it's hidden here so with effects world off the light stays but it's not calculated in baking okay so I'm jump over to our skylight and if you remember I have it set to static because I want to just be purely just baked lighting and I don't want there to be anything else there's two different things that we can do here if you're familiar with skylights you can actually have a captured scene in which when it comes time to build it will calculate and look around the world and reproject it on there that's great in majority of cases but you'll probably find on some projects that you want a very specific kind of ambient light or you know skybox to fill your scene in this case that's what I want because I want that lighting very very much rigorously controlled so to do that I'm gonna change my source type from SOS captured scene to specific cubemap so in here I've got one that I created which works pretty well it's got good coloration it's balanced so I'm gonna go ahead and put this on my cube map so let me actually switch back and show you so if I do captured scene this is capturing the scene itself which again this may work in the majority of cases but for this one I'm gonna show you the alternate which is using a specific Q mem so you see it changes the coloration just a little bit now I'm gonna make a couple different setting changes here so one is my rotation I'm gonna rotate rotate this 180 I know that again from the initial setup because the sunlight point that's in the scene is actually counter to the one that I have for our backdrops so if you recall Sun lights coming from here and this HDR I the Sun is actually on the opposite side so by rotating 180 degrees I've essentially flipped it so the sunlight in this HDR is coming from the same direction okay the next thing I want to do is actually change my cube map resolution to say like 512 what this is going to do is any of my reflective surfaces so for example if I take kind of this area here I'm gonna go up under build and build my reflection captures again so it uses that scene you can see that by now granted this is maybe a bad example because it's a little bit lower texture resolution but by bumping up my cube map so if I go to like 1k what it's going to do is it's actually gonna get me a much better reflection on any reflective surfaces so but again if you if you recall I said that this particular skylight really is gonna have a huge effect so somewhere in the neighborhood of 512 to 1024 should work just perfectly fine okay and the last thing that I want to change is my intensity something that I've noticed if I bump this up to say like 10 for example when it's set in stationary mobile moveable where it has dynamic lights this value is going to be very intense in fact actually 0.5 would be ideal for stationary moveable but again in some of the early testing that I did by switching this to static where it's purely baked lighting I had to bump this up to about 10 and then the second thing I'm gonna change and this should be the last one is this indirect lighting intensity so if you recall back when we did our directional light this is the parameter that something we gonna help to push that light into our scene so I'm gonna go and change this to two and let's go ahead and kick off our lighting build again which again will be in preview so I'll kick off my lighting only and we can see the effect again if you remember directional light is actually turned off so if I click it effects world is off so this should be just purely our skylight coming in with our HDR I set in our intensity indirect lighting with static so let's let that bill we'll jump back and we'll see what the skylight is ultimately contributing all right perfect so our lighting is built and again this is just our skylight so you can see how it does add nice ambiance to it so it kind of fills in the rest of those locations of course in this initial area here we just have these windows whereas over here you know we have substantially more upper windows but again everything that you're seeing here is purely just from this skylight this is just that ambience filling the scene so it gives us a nice result ignore the blotches again that's because we're in production I'm sorry in preview mode production build of this weather lighting will help to eradicate a lot of that but in general this is perfect so when I couple this with our directional lights so I turn this back on effects world this gets me actually a really nice starting point for my scene so let's go ahead and do this we'll do one last build so I'm gonna click it off again my lighting quality set to preview and I'll just build my lighting but this time we're actually using our directional light and our skylight so we'll see what the two of those combine together the kind of results that it produces so we'll let that build and we'll jump right back okay so our lighting is done building and again this is just our just the two lights we have in the scene on directional light and our skylight working together and you can see the results are actually really nice - the blotches again because we're in production mode this is actually a fantastic result for just using two lights very very simple so that cover is kind of part two where we have our external lighting in part three we're going to cover the interior part so actually adding interior lighting to our scene
Info
Channel: Ryan Manning
Views: 67,182
Rating: undefined out of 5
Keywords: UE4, Training, Game Dev, Tutorial, Unreal Engine, Lighting, Interior, ArchViz, Spot Light, Point Light, Blueprints, Lighting Scenarios, Lightmass, Rendering, Realtime, Cinematic, Directional Light, Sun, Sky Light, Ambient Occlusion, Emmissive
Id: dQ8bqHUg5To
Channel Id: undefined
Length: 24min 44sec (1484 seconds)
Published: Mon Oct 07 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.