Tutorial | UE4 Lighting Overview

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] all right so this is gonna be a fairly in-depth overview of lighting in Unreal Engine 4 I'm gonna go over all of the different light types their properties and how to get the most out of your your lighting and then 104 I'm also going to cover a few lighting techniques that are not exposed by default and under lunch and you have to modify the configurable any files in order to expose the values I'm gonna do this all as one long video covering everything but I will put timestamps down in the description so you can kind of skip through to the to the areas that you're interested in so I'm gonna start off with the most common basic light actor which is the point light obviously in order to put into the scene you just click it over here and your uh and lights or you can search for it in the in the place plays tab up here and you just literally just drag it over you just drag it over into your scene I've already got one placed and the lighting has already been built the light is set to static and building light with production settings which I'm going to use for this entire video now as you can see the shadows very rough it's got a very hard edge I'm using mostly default settings for the light other than intensity and attenuation yes but I haven't changed anything else so the point light is actually a light actor that you want to avoid whenever possible because it does render as if it were basically six spotlights spherically projected to a single point so it is more it's almost six times more expensive to run than a single spotlight in most cases especially if you're running fully dynamic so most for most lighting setups for your environments you can get away with a spotlight and you can go with a full 180 degree cone on your spotlight which we'll get into later so the first thing I'm going to go over is obviously your mobility modes so mobility tells the engine whether or not your lightest static stationary or movable so static means everything is completely baked and it's got the quickest rendering time it's also the highest quality uh in those cases stationary is kind of a hybrid between static and mobile it's partially baked you get shadow maps and all I could stuff but you also get dynamic shadows on movable objects you can't move it during runtime but you can change the color intensity and things like that at runtime moveable means everything is completely dynamic anything can be adjusted at runtime the position color intensity etc scale location rotation obviously I can go over that what that is by now so under the light options is where you gonna find or the light tab is we're gonna find most of the options for this actor so intensity is obviously how bright the light is your light color color over the light your attenuation radius is represented by the sphere is how far the light actually casts itself so obviously if you make it higher values it's going to go farther you make it lower values it's going to be a tighter sphere down here you have three options for source so you have source radius you have soft source radius and you have source length so I'm gonna go over each of these three independently because they are pretty important so right now this is a pretty close representation the lighting needs to be rebuilt because I moved it but there's a pretty close representation of what the shadow looked like with the default settings without any of the source radiuses without a source source radius information change so I'm going to change the source radius value to 100 now you'll see that the light now has this the sphere around it and you'll see that it changes as I adjust the source radius so what this is doing is it's telling the engine where to actually radiate the light from so if it's set to zero or source radius it's actually you're just gonna cast a light from zero point in the center of the light if you adjust the radius it's going to cast the light from the surface of this sphere which represents the source radius so what this allows you to do is get much soft shadows and different light bounce and all I could stuff and it's a good way of having much better lighting so I'm going to set the source radius to 54 now 50 units and as you can see it's a smaller sphere but it's still bigger than 0 point then we're gonna build my light so you can see I rebuilt a light with a source radius of 50 units as you can see the shadow is already softer it's got a more noticeable phone number is not just a hard edge see the fall-off on the sphere is also more noticeable now I'm gonna bump the source radius up to 100 there's gonna be double D units I'm actually I'll make it 150 so it's more noticeable and I'm gonna build lighting again now as you can see my sphere is much larger my sphere of if she call it light lady mission and the shadow here is reflecting that so as you can see it's coming from that sphere the lights actually projected from the edge of the sphere it's making the shadow much much softer and it's basically lighting in this direction now another thing that the source radius effects is it's is the lights reflection on non rough surfaces I'm gonna change the surface to be completely selective I'm gonna change the roughness down to zero there's no longer rough now if I bring this light down you'll see that this is how the light is represented on a non rough surface on a glossy surface right so if I adjust this radius that's what's affecting it's the reflection on a non-western set it to zero you can see it just shows a low point of light I wanna put it back to fifty now this soft source radius this doesn't actually affect any lighting what it does it affects how soft this representation of the light on a number of surfaces so if I scale this up you can see it makes it much Fleury and much softer so you can really fine-tune how your light is represented in the world not just how the light the actual baked lighting is represented but the point light itself so the next radius value that you'll see here is source length so this is the same thing as source radius but it can actually allow you to draw out a capsule shape so I set it to 50 you'll see that it's as you have two Spears and it's kind of a capsule shape if I go to scale it out you'll see it becomes a capsule and as you can see the reflection the background there's rep is reflecting that shape so what this is useful for is if you have say like a a fluorescent light in the ceiling or something like that then you want to emit light from the bulbs obviously the the long light tubes so your reflection should represent that and your actual light emission to represent that so that is the whole purpose for these four source radius soft source radius and sorts length so you would want to adjust these obviously a source radius if you have a light bulb you want to scale the sphere to a line or be flush with the geometry for your light bulb if you have like a canister light or something like that then you want to expand it to match that if you have like I said before a ceiling light like fluorescent light bulbs you'd want to scale it up to match that so that way it looks realistic everything back to its default value move it back into position set rough respect one all right so we've gone through all the radius values which are actually some of the most important and give you the most control over lighting the next thing I'm going to is utilizing temperatures so temperature gives you Kelvin values for your light so you can actually scale let's real-world numbers see as I'm sliding back and forth it's changing the temperature of the light so if you check this use temperature use temperature box it'll allow you to do that rather than light color checkbox whether or not it affects world so this is basically static geometry no stuff like that when I cast shadows so you can bake the light where you just get the numbers of the light itself but it won't actually cache shadows indirect lighting intensity this is how intense the light bounces so I'm gonna leave it as a value of one I'm gonna change my source radius to something like 50 so it's actually 100 so it's a little soft I'm gonna build lighting with light bounce set to 1 all right so this is a indirect lighting intensity value of one source radius is set to 100 I'm going to set this indirect lighting intensity value to 5 so you can see the difference build my lighting alright so with the light rebuilt with a indirect lighting intensity of 5 as you can see the scene is much brighter because light is being bounced around more you can see if I go into lighting only that the orange is actually being bounced off of this cylinder it's very very subtle if you pump up the value even more but orange is being bounced off the cellar cylinder onto the gray ground adding some orange into that color blue is actually being bounced off of this under the wall over here and onto the ground here and affecting your lighting it also picked up colors and textures so if you have like a terrain texture something to actually pick up individual colors in that bounce accordingly based on your indirect lighting intensity you can also modify this with a post process and the post process for minimum roughness this actually tells it the minimum roughness value to reflect the light on as I showed you earlier you can fine-tune that in the light itself this scales the resolution of the shadow maps used for the shadow in this light so it's pretty self-explanatory your shadow bias this controls basically how accurate the self shadow in the entire scene shadows from this light are you can sharpen shadow filtering with this with this slider here contact shadow length we're going to get into this in another part of the video that focuses more on contact shadows now whether or not you wanted to cast a translucent shadow so if you have for example grass in the scene or if you have a sewer grate that's a masked material then it'll actually cast a shadow based on that opacity if you have it enabled this will tell the engine whether or not the light is gonna cast shadows from cinematic actors cinematic actors are basically the ultra high quality and engine for cinematics that you don't necessarily need to worry about having the best performance for gameplay dynamic and direct lighting this is whether or not it injects itself in the light propagation volume which is one of the features that you have to enable via a configurable any which will be actually going to go over a little bit later whether or not the cast static shadows whether or not to cast dynamic shadows whether or not lighting whether or not to cast a volumetric shadow which we're actually gonna go over volumetrics a little later so if you go to the the light mask tab indirect lighting saturation this is the saturation of your indirect bounce lighting your shadow exponent basically controls the fall-off of the shadow penumbra so how softest this is regardless of what your source radiuses and whether or not to use shadows for stationary light for precomputed shadow maps and under the performance tab you can adjust the minimum maximum draw distance light function we're gonna go over later it's basically a dynamic mask for your lights you can do things like clouds cloud shadows and things like that like profiles IES texture which is basically a non dynamic mask but it also gives your light specific lighting values based on real world light we're gonna get into that later as well distance field shadows this is also going to be part of the video and that pretty much covers it for the point light so now we're gonna move on to the next most common light which is the spotlight okay so now we're gonna move on to the spotlight so the spotlight is another one of the most common light actors in Unreal Engine 4 and it's also the light actually you should be using them most as I said before you want to try to avoid point lights point lights whenever possible and you spot lights instead they're less performance intensive and they also give you greater control most of the time or setting up lighting in the environment so this is a spotlight that's been set to static I'm not going to go over the mobility options for this it's the exact same as the point light most of these options are the parameters available for the for the spotlight are the same as the point lights I'm not going to go over to those that it shares it does have a few of its own parameters that I will go over one of them being the cone angle so as you can see you have an inner and outer cone angle the internet or cone angle are represented here by by these lines these raycast lines that are in the shape kaolin obviously and you can see the spherical or a hemisphere fall off at the edge of the cones so the inner cone is the brightest point of the light the outer cone represents the edge of the light where in the area in between is the fall-off between the brightest and darkest part of the light as you can see here with the baked shadows you can see where it falls off based on the the cone so if I go in and adjust the cone you can see that it updates in real time I set this light to moveable and then hit build its gonna get rid of all the shadow map all the bakelite information to get a better idea of how the cones affect the light and see as I adjust the outer cone angle and the inner cone angle by hide the actor itself can see how is reflecting the shadowing attenuation radius I already went over with the point light but this sort of important spot light as well it can also affect the intensity of your light because the farther you cast the more intense the lights going to be along the so that combined with in effect how bright your light is hitting a surface for this you also have your attend your serratus your sorceress radius and your source length source length for the spot light doesn't actually go along the angle of the light itself or the cones are it goes the opposite direction this is something to keep in mind when you're setting up your source length but this is good if you were like I said using this for a florescent ceiling light or something that's longer because you wouldn't want it to the length to go the length of the light itself so the rest of the settings for the spot light are pretty much identical to the point light and as I said this is the most inexpensive performance-wise light and an entity to render those is the one that you should be using for just about anything if there's a very particular instance where you need to use a point life and go ahead and do that but try to avoid it if at all possible and another thing with the outer cone radius radius if you slide it the maximum is going to go to is 80 but you can actually type in a value beyond that you want to go 90 that gives you a full flat outer cone alright so that pretty much does it for the spotlight so the next part of the video is going to cover utilizing the spotlight for bounce card lighting which is used a lot in architectural visualization so let's let's jump into that now all right so this is another spotlight and it is also set to static its mobility is set to static so what's going on in this scene is I'm actually using the spotlight to bounce its light off of a light card and then that bounce slide is what's lighting the scene so this is used a lot in architectural visualization to give a much softer lighting and more natural natural bounce light in the scene so a lot of times people are doing arch biz environments will set these up and like windows and skylights and all that bounce the light off of them and then delete them and build the scene because one even if you have the light bill or once you have the light bill even if you delete this the shadow maps and everything the bounce lighting all that stays so if you look at the scene in unlit mode you can see that this card is blue the environment is gray and this pillar is orange and then there's also a sphere over here that's blue as well by going to lighting only which is only showing the lighting values you can see that the entire scene is being lit up blue because this spotlight is only hitting the blue card and all the light is coming from the bounce values off of that another thing to keep in mind is the light color itself will affect the bounce light color so it'll combine whatever color you're bouncing on to it with the color of the surface so I have it set to white which is why it's it's bouncing back in blue if I go in and just this value and say I make it a little bit of red and then I rebuild my lighting you can see that the blue is kind of toned down a little bit and it's gone more towards a purpley color as you can see here or a magenta go back and change the light color to say a blue like a lighter blue you also to remember that your color value if it's darker or lighter is going to affect the brightness the overall brightness of your light intensity so you want to keep your saturation or your brightness all the way up if possible then I go in and build it again with light blue is the light color you can see that it's now adding the light blue into the blue of this surface and it's making it extremely blue in the scene now if I want to take the I'll go back an unlit as you can see this is a orange or dressed yellow color so if I take that and I put it on this bounce card and then I go back to my light and I change his color back to white I go back into lighting only and then I hit build you can see that it's now bouncing orange into that orangish yellow the same color that's on here as you can see that orange is hitting this blue sphere making it look sort of green they're giving it a green surface color so the bounce also is basically affected by the surface of the mesh so there's obviously a flat surface but if I turn the light around and bounce it off of this cylinder you're going to see the light actually bounces out the direction the cylinder surface faces I want to turn this light around I'm going to bounce it off of the cylinder and I'm actually gonna bring this sphere over as well this blue sphere and I'm going to widen the outer cone angle a little bit back okay so now I'm going to build lighting again now as you can see it's bouncing orangish yellow off of this cylinder this way and it's bouncing blue off of the sphere this way and it's bouncing away from the curvature of the surface as you can see when it hits this this sphere it's bouncing a little blue on to this the cylinder and it's also bouncing a little bit of orange or just yellow from the cylinder on onto the sphere but go back to this this bounce card and say I had matte gray to it see it's bouncing it's bouncing a little bit of orange on to this may apply the blue back to it now a few things to keep in mind when you're doing bounce card lighting or any type of bounce lighting is the attenuation radius of your light the intensity of your light and obviously if you're using a spotlight the cone angles are all going to affect how much light bounces so if I put this back into its setup that I had originally which I'll do by reloading the scene so as you can see this is these were the settings that I had originally if I take this intensity and let's say a double it so I go from 8,000 16,000 and then I hit rebuild you can see the bounce lighting got much more intense and you can also obviously adjust the bounce value or indirect lighting intensity of the light itself so I already went over that with the point light so you can kind of mix those things together and get the the lighting that you're looking for and as I said before you can also adjust light bounce intensity it's basically a post process effect that intensifies the light bounce based on the values you give it alright so that pretty much covers a bounce card lighting so the next part of the video we're going to go into is going to be light functions and they're going to cover light functions and IES profiles so let's let's jump into that alright so now I'm going to cover using light functions so a light function is basically a dynamic material that can animate your the way your light is projected so you can do things with this like having clouds in a large environment that are cloud shadows that pan across your your environment you can use it for things like light shining through a window rather than actually having it cast shadows from the frame of the window you can use a mask in the function you could have things like a ceiling fan for example that you want to have the the ceiling fan rotating and blocking the light without actually having that geometry if you don't see the light itself or if you don't see the fan blades themselves so it's pretty dynamic and allows you it's basically a dynamic mask for your light so I'm going to apply this light function here I've already created and as you can see it's masking the light to just these circles that are being repeated over and over and the material setup is very straightforward for this one I've literally just got a panner that's panning this texture this mask and that's what's causing it to move so I can go and do things like injustice scaling this I'm doing this all via material instance by the way for the light function I can adjust the movement speed I can also modify the intensity of the mask itself how much it masks the light I mean go in and make the material as that dynamic as you like I just made this one fairly simple for demonstration purposes and obviously it's going to be affected by your light settings so they going to change the color to like an orange example justly that's masking the light color value we're going to adjust the outer cone angle just lean it spreads out now that's another thing is the the mask is going to be relative to the size of your light so you're you're like frustum basically you can see light fall-off still works it's still affected first radius also affects it 10 and radius is also affected by it so that pretty much covers light functions at a basic level shows you what they do and they are applied by literally creating a light function material which you can look up online and preferably making an instance from that and then drying the instance in here because the instance like to modify the values at runtime and also if you're doing multiple light functions you want to have a single master material so now we're going to go into a light profiles otherwise known as i-s profiles so what is profiles are is they're not just masks for light but they actually give the light values based on real world information they don't necessarily have to be real world information but a lot of the times most use cases they are for architectural visualization and things like that so if you're for example setting up a virtual stage like a production stage uh something like that you want to see how your actual light panels are using for lighting will affect the scene you can find the IES profiles for that specific light panel and download them then put them in the engine use the actual light values for that light you can also use them for things like you know very basic masks if you want to say feel like a flashlight you want to get the little projection light projection pattern that a flashlight has you can so I downloaded a bunch of free IES profiles online you can do a Google search and find I guess profiles all over the place this is just a batch that I found online so if I throw an IES profile light now as you can see it change the the light all I did was drag that end I didn't changing light settings that's the default that I have set up and I drag this in so as you can see if you look at the actual thumbnail for the light yes a little bit it shows you what the light pattern is going to look like this is basically how the light is going to cast I can picture this in three dimensions I'm gonna drag another profile there and see how it's affecting the light and they they work for static stationary and moveable I'm sorry a stationary removal static is not supported you'll see that it gets grayed out as soon as you do that throw a couple eggs in here so you can see the difference in lighting values now these are also affected by the settings for your light you're going to change the color it's still affected by the IES profile the outer angle inner angle all that stuff is going to be affected by the IES profile now as you can see when I adjust the outer cone angle and the inner coating upon maximize them out you'll see that the light's still only casting within the area so you maximize these values you're getting the true values from the IES profiles nothing masked by your inner and outer cone angle values back to there and before okay so another thing you can do is you can combine light profiles IES profiles and light functions so I go back and apply my function to this light you can see that within the mask it's actually still using the IES profile now light IES profiles and light functions also affect volumetric lighting which are going to get to what we're going to cover in the next part of the video all right so now we're going to go over volumetric lighting which is a newer feature in Unreal Engine 4 and it's something that everybody's been waiting for for a while including myself so it currently it works very well cost overhead or performance overhead it's not that intense one of the biggest drawbacks to it is it is a screen space effect and it's update rate is not one-to-one with your refresh rate and you'll see what I mean if I move this light around you can see that it leaves a little bit of trail of the volumetric effect as it moves around that's because the update rate of the screen space effect is is not one-to-one with your refresh rate that's one of the few drawbacks to it other than that it's that's pretty robust and there's some really nice nice good lighting so in order to enable volumetric lighting you need to have a light that's either stationary static or moveable and you can set it to any of those and then in the light itself suspect removal in the light itself you want to adjust your volumetric scattering intensity so by default at zero which means that it's off and as you slowly slide this up the maximum value is going to be used for by default but you can manually type in anybody you want so I'm using 50 for this example you can bump up to 500 basically intensity that this light is going to inject itself into the volumetric lighting screen space effect so I'm going to set that back to 50 now another thing that you need and/or if this surrender is an exponential height fog actor which I've already put into the scene so with the exponential height fog actor in the scene you need to go under the volumetric fog tab and check the volumetric fog checkbox and under here you have some some overall tweaks for the volumetric fog you have a scattering distribution you have albedo color which is basically going to be a color that's injected into your volumetric lighting colors from each light you have an extinction scale you have a view distance and statics static lighting scattering intensity now the fog density also affects your volumetric lighting which is under the exponential light fog components default settings your interest gathering color also it's basically affecting her height fall-off all this stuff affects your volumetric lighting so volumetric lighting is available on all light actors from what at least all the point light actors so the directional light point light and spot light so you can use it for your sunlight as well as well as spot and point lights now if you want to have the volumetric fog actually shadow itself I want intersects with an actor as it's doing here so you can see as I move past this the cylinder it's actually blocking the the volumetric light based on the shadows being cast in order to do that you have to light selected which I do right now and you need to enable cast volumetric shadow so if you have that disabled you'll see now that the cylinder is not actually blocking the volumetric effect I have it enabled you can see that it's blocking it and that goes the same for any object that you have in front of the volumetric effect so in this sphere over here as you can see it's blocking volumetric light so volumetric lighting is affected by IES profiles and light functions light functions are not as noticeable just because of the way it renders depending on the resolution of the volumetric fact that you're using so if I have the light selected I throw a light function on the same one I showed you before it does affect the volume but it's very very subtle IES profiles however are much more noticeable so if I go in and put a s profile on this volumetric light intensity you can see how much it actually affects the volume and obviously your light color is going to affect the color of your volumetric light injection now one more feature of volumetric lighting is actually something that's not tied to light at all it's a particle system now there is a particle system that you can set up that will only be affected by volumetric lighting so I already have one set up and I ready have it in the environment so I'm going to show it now as you can see the particle system is basically intensifying the volumetric effect wherever the volumetric light intersects with it I take it and I slide it up you can see as it goes outside of the volume it disappears comes back inside the volume makes everything more intense you now these are these uh systems for volumetric lighting are useful for things like low-lying fog or if you have a very specific light setup and you want the volumetric lighting to be more intense around like steam coming out of a sewer grate or something like that you can use it for things like that and you can place them throughout your environment a little bit better control over how your volumetric lighting looks alright so that covers volumetric lighting fundamentals of it and how to set it up alright so the next part of the video is going to cover the skylight actor so let's let's jump into that part of the video alright so now we're going to go over the skylight light actor so what this actor does is it acts similar to a directional light because it lights your entire environment but it actually lights your entire environment using color information from a cube map so you can either have the actor capture your entire scene automatically as a cube map and then project those colors back into your scene as lighting or you can specify a cube map that you want it to use so I've currently got the light built the skylight actors set to static and I've done a light build and I have it set to captured scene so that means it's actually capturing all the color information of my scene in the cube map from it in order to change between capturing the scene and capturing using a cube map you would expand the light tab and under source type select specified key mapper captured see so currently my entire scene just consists of a sky sphere with some clouds in a blue sky and that's what's being used to light the interior of this room I've also got bounce pushed up a little bit to show the effect a little bit better in the video now if I want to change this and I want to go and put a cube map in there rather than have it capture my scene I can do that and show you what what the difference is I'm going to change my source type to SLS specified cube map dragon cube map in there the cube map I'm going to use first is going to be this one as you can see it has a lot of Browns and reds magentas and tans going to build lighting the color is going to be dramatically different so if I go in and build lighting so as you can see the entire lighting of the interior of the room is completely different and it's based on the color information from I just that I just fed the properties for the skylight after as you can I didn't change anything outside of the room so I'm gonna go in again and change this keep meth out with another one this is gonna have more of a green white and tan uh overall color to it looks like this and I'm going to build my lighting again as you can see it's changed lighting completely again based on this this image so I'll go through and do two more cube maps to show you the differences a little bit more build lighting now the lighting color information last time I swapped the cue map out again then built lighting so that shows you how much of a difference changing map can make building your skylight and if you have it set to capture capture world capture scene instead it's going to use as I said before all the color information that's actually in your scene so if you want realistic lighting for what's already in your scene and you want it to look like you have distant mountains so they're casting light into your environment you can do that as well so the options down here that are available for the skylight actor these allow you to rotate the cube map when your source type is set to specified cue maps you can actually rotate it around so if your source of light for example you want it to come from the other direction then you rotate the light and then in your cube map you have the Sun captured over in this area keep map resolution this is going to be the maximum resolution when it takes that cube map and injects the colors back into your scene so you can get more defined color information in your light projection earn your image based light projection sky distance threshold this is how far it'll actually search when it's creating the cube map from your scene do a scene capture the intensity is self-explanatory it's how bright the light is basically the exposure of this cube map or the the captured scene like color you can go in and modify the color of the light overall and then when you bake it's gonna be it's gonna 10th your your whether or not effects world whether in a cast shadows your indirect lighting intensity capturing missive only so this if you have this checked it's only going to if you have this checked and then you have capture scene selected as your source type then it's only going to put emissive objects in that cue whether or not you want the lower hemisphere to be a salad color and if it is a solid color what color that's going to be I love usually the reason you want to use this is so you don't get if you have a spherical cube map the entire thing has color in it the lighting is not going to look like it's coming from above create some unwanted visual appearance now I'm whether not you want to cast attic shadows dynamic shadows but I want to effect translucent lighting or cast volumetric shadows so most of these are represented in other light actors as well other stuff having to do with and now under here so if you go to the skylight tab you have a recapture scene button just says recapture and if you click on that it's going to recapture your entire scene if you have it set to capture scene so if you change things in your scene and you know quite drastically and you want to be updated in your skylight actor if your capture scene or else it's just going to use the last capture that it all right so that that pretty much covers the skylight actor so the next part of this video is going to cover fully dynamic lighting so let's jump into that now okay so in this section of the video I'm going to cover some of the the full dynamic lighting techniques available in Unreal Engine 4 so there currently isn't a great real-time global illumination system for but it does have something called light propagation volume which is a it's basically a Fox alized pre-calculated indirect lighting solution it's not enabled by default you have to enable it via modifying it any which I would go through after showing you a couple things before we we enable it so right now I have a static directional light now the reason I have it set to static and we're going over dynamic lighting is because there there's some dynamic lighting features that actually work in conjunction with static lighting so one of the latest features that utilizes this is something called distance field indirect shadow so what this does is it basically uses the bounce light direction of a pre-baked light to cast soft shadows on dynamic from dynamic objects so as you can see this cylinder is currently set to moveable so it's completely dynamic so if I move it around the scene you can see that the shadow is already being cast it's a soft shadow I move this over here you'll see as it gets closer to the surface it's actually casting a soft shadow onto that surface now as you can see the the direction of the shadow is the direction that the bounce light is coming from so this light is pointing down at this angle as you can tell by the shadow and the light is bouncing off in the opposite direction at the same same opposite angle so as I move this closer to this wall as you can see it's casting shadow gets closer it gets darker and the shadow is actually very high quality and this is a strange space effect that uses distance fields in conjunction with light bounce so if I do the same thing and I move this over to this side now watch the shadow and the cylinder you'll see what happens with it see how it's moving into the other direction now now it's casting against this wall that's because the indirect lighting within the shadow is actually bouncing the opposite direction it's basically going the direction that this shadow is being cast but in Reverse so the shadow is actually being cast from the direction of the indirect bounce that's something to keep in mind when utilizing this it's rendering feature as you can see as I move it around it's crawling along the wall based on the indirect lighting bounce and this also affects other removable objects so if I slide this sphere in front of you can see shadows casting onto it this sphere also has this feature enabled from sing super shadow from this looks like alright so in order to enable this rendering feature you want to have your mesh selected you want to open its lighting tab and the mesh needs to be set to a stationary or moveable we set it to static it's not going to work as you can see here and then under its lighting tab you want to hit the little looks like a downward eject button with on that it shows more options and then you want to check this little box that says distance field indirect shadow if I uncheck it let's see what shadows gone I check it again you'll see the type of shadow it also self shadows feature and obviously you need to have cache detonate you can also modify the minimum visibility for distance field and direct shadows and that's pretty much it for for that rendering feature which as I said was added I believe is in 4.18 possibly 4.17 so it's a very it's a very new feature that was that was added now in order for this to work you also need to make sure that your static mesh has its distance field built so you can either do this by going into edit project settings going under the rendering tab which is under the engine engine header and then going to lighting and checking generate distance fields and restarting yetter it's gonna if you do this is going to generate distance fields for all the assets in your in your project or you can do it per object if you only need it for a few by opening the mesh itself the mesh property yourself you can either do by clicking the thumbnail in the static mesh details or you can double click it in your content browser you can even right-click on it and go to edit whatever your meshes and then in its and its properties if you go under general settings and check generate mesh distance field and hit save it'll generate the distance field all right so you have to have that distance field generated for the object that's going to be casting the shadows or else it won't work because it utilizes distance fields Casa Jenna all right so now I'm going to go into light propagation volumes so light propagation volumes you have a setting for on every light type the only light type that it seems to work for at least for me is the directional light so the directional light is a basically the light you use to replicate sunlight so it's an infinite light casting incident I'll cast infinitely it's not just coming from a single point it's gonna cast in fully an infinitely in whatever direction you set it up to to Caston and it's got the same values as point and spotlight for the most part it's obviously missing coning things like that but everything else is the same so this is the entity that you use to light an entire outdoor environment and you can also up its bounce settings if you do have an indoor environment that's getting supposed to get it it's light from sunlight only you can up its bounce bounce values and have you know openings where lie supposed to come through and if you said if your angle and bouncing all the stuff correctly you can get really organic exterior lighting so what I'm gonna do is I'm going to enable light propagation volumes or at least show you how to do it because I already have it enabled so in order to enable light propagation volumes you actually have to you can't do it through your console otherwise known as the output log but you can type the value in if you want so it's our dot light propagation volume capitalizing each word in light propagation volume and hit enter as you can see it says equals 1 by default it's gonna say 0 so that means it's not enabled so you can't just go into the console and type it you have to modify in any file then restart the editor so in order to modify the in file you would go to your Unreal Engine engine and then config directory so mines and D Program Files epic games Yui 4.18 s whatever engine version is for slash engine ford slash config so you're going to look for in any file console variables done any so you can open it with notepad if you like I personally prefer to use that notepad notepad plus plus so I'm going to do that so once you have it open you'll see all this green text everything from here up is the are the default values for this there's any file as you can see I added the value here at the very bottom without a semicolon if you have the semicolon it's commenting it out so it won't it'll just ignore it so our dot light propagation volume space equals space 1 and you have to type it exactly like it's typed here and once you do that you just save the file and then if the editor isn't open already then you just lost you editor if it is open you have to close down restart it for it to to get that to get that varial variable pass-through so I'm gonna go in in set my directional light to moveable and since I already have light propagation volumes enabled you'll see that it's already doing its job and I'm getting real-time global illumination of oxidized real time so we're gonna and rotate the line around I see that my shadow maps are still there because I had it set a static and I built lighting so I'm gonna do is actually build lighting real quick to get rid of shadow maps so whenever you have a light that was static you've bent lighting and you want to change it to dynamic you just rebuild lighting the shadow master mint light so now it's going to be more apparent as you can see as I rotate the light around it's getting real-time bounce due notice that the pillar is an orange yellow color and it's bouncing that color into the environment does it rotate the light so we keep the light right here see the ground now you'll see if I move the light really quickly I'll take it a second for to to catch up for the light propagation volume to catch up because once again this is also a screen space effect as you can see if I shine it completely outside of out of the box there's no bounce going on whatsoever I hit just a little bit you'll see it slowly becomes brighter in the scene as I said before this is all completely dynamic so you can use this for dynamic day/night cycles for outdoor lighting or indoor lighting where everything else is static and then you have this shiny windows if you like and kind of play around they can get get the effect that you're looking for and it's obviously still affected by your lights intensity the light color indirect lighting intensity okay so we're also going to cover before I leave this this environment setup I'm going to set my light back to stationary gonna build my lighting so I just build my lighting with the light set to stationary now as you can see the shadows are actually fairly soft they have a nice step number that falls off towards the edge I'm using something called a distance field shadows which is another feature that's actually I believe it's only available on directional light but I may be wrong so if you have it set to static and you go under distance field shadows and you check this rate race distance field shadows it will build with your light and then you have these values here which you can modify it with once again to do this you have to have your mesh distance fields built I'm gonna uncheck this and then you can see what the light looks like by default these are just the shadow Maps if I enable it again you can see how it softens up around the edges we're going to modify these values you can see how the numbers are affected do you have to rebuild lighting someone doodle click so you can see the difference without it and then with it on so it basically adds a soft shadow around your heart shadow light maps now as you can see when I switch it to moveable it doesn't show anymore so with all of my experimentation it only seems to work with the light set to stationary and we're gonna cover one more thing while I'm here since we're covering the directional light and that is light shafts so light shafts are basically a more not really an older version of volumetric lighting but it's it was kind of what what they used to use before they had volumetric lighting there's not a huge need for it right now in most most use cases but you still may want to use it here in there especially what it does is it casts a and it's only available on directional lights by the way it's not available on any of the so what it does is it casts something similar to volumetric lighting but it's got raised light shafts around objects so an object is going to include the light shafts it includes that light shafts you can see it more if I move the camera around so with the the light shafts enabled in order to enable light shafts you go to the light shafts tab and check this light shaft occlusion box and then you modify these settings light shaft bloom is actually bloom on the light shaft itself you can go through and tweak these value of occlusion masked darkness which is how dark the dark area is occlusion depth range which is how far the occlusion is actually happening your bloom scale the intensity of the light shafts and your blooms threshold which basically brings this back down as you run around you know sod just the bloom tint the tint of your light shafts and you can override the direction of light chest so if your lights facing one way but you want the light shafts to come for another direction for a reason you can buy that there and once again with directional lights you can use light functions those are before so I apply this here and as you can see it's affecting the entire environment so if I take this cube for example let's scale it up see that it's affecting the entire environment so you can see here that would be very useful for things for a directional light for something like shadows from clouds across the environment things like that and the the light functions also still work in conjunction with light propagation volumes the full dynamic Lux allies GI it doesn't mask it but still so another dynamic lighting technique that was recently added in a version of Unreal Engine herbally was for sixteen or seventeen so other is the ability to have contact shadows so what contact shadows are is that our screen space effect it gives you a more detailed shadow where a surface is very close to another surface so if you have things like grass or moss or a vine crawling up a wall you you want to have a more detailed shadow where it intersects not just a blob shadow and it even affects characters things like the nose casting a shadow into the face things like that are going to be much much higher quality with this effect enable so in order to enable your directional or whatever light source you're using has to be set to moveable you can set it on you can enable on static or stationary registers you build lighting it that goes away so you have your light selected you under the light tab and you'll see a contact shadow length so by default is going to be set to zero and you can see here this is what it looks like without without the effect enabled I slowly scale this up you'll see the shadows start to start to render so I'm using a value of point zero one point one one for this exam and as you can see this this masked material is very close to the surface of the cylinder and it's casting more detailed shadows same thing is going on down here I said this cast shadow or contact shall link back to zero you can see the difference so if you want very crisp detailed shadows where surfaces are close to other surfaces and I just mentioned some cases then this is what you want to use and it can actually add a lot of visual quality cheersing have enabled larger environments and it obviously fades out at distance it is a screen space effect so it's not gonna be rendering all the time the entire scene which you would anyway only get closer to an object and you can see the where it's supposed to cast a shadow onto the surface it's gonna look a lot more realistic if you have this enabled alright so that covers a fully dynamic lighting and the directional light so let's move on to the next one which is static mesh emissive lighting so we'll jump into that now okay so this part of the video is going to cover lighting a scene using an emissive material on a static mesh so there are actually no light actors in the scene if I select this pillar I don't have game mode on so it's not hiding any actors so the light in the scene is completely being generated by these these four meshes that have any missing material on them so I'm using two actually three different materials as you can see I have emissive white on this once there's a pure white missing material as you miss of blue which is a very bright blue and then I have this material which is emissive texture where I just have an RGB R and that same material is being used on the sphere over here so as you can see if I go into lighting only the meshes themselves are not receiving light they're just casting it from the emissive material or they are I'm sorry they are receiving light it's just it's very subtle because it's admitting from its surface so it's getting some bounce light it's not actually receiving direct lighting so if I go back into unlit mode you can see with the serve look like just like a purplish blue because it's it's a the emissive value is so high it's it's starting to become white this is an RGB bar material same thing with this and if I go back up to lit mode you can see exactly how the ladies make a minute intro so you don't have control over this type of lighting like you do with point lights you can't control like attenuation radius fall-off things like that it's all done through the material itself so how intense remiss your emissive value is is how far it's going to project the shape of the object affects the lighting things like that so you can use this for some very cool lighting effects and as you can see it creates a very very soft light much softer than most point lights unless you use a like a high source radius as you can see the fall-off is right along the edge of the object as well since the sphere is emitting light from all sides you can see it's more intense the closer it gets to a surface so if I go in and I let's say to get rid of all of these except for one and you can see that the lighting values are still there because the light was baked let's say I rebuild lighting with just this this white card as you can see it's it's an extremely soft lights come from this because the surface is so so large if I scale this down and then build lighting again you'll see how it effects how to fix the light build so even though I haven't changed the emissive value or the emissive intensity I think like that because the surface is smaller it's not going to put as much light into the scene as you can see here so if you look closely it is illuminating the floor a little bit but it's very subtle because the surface of the area is so small I scale it up a little bit more not quite as big as it was previously but bigger than smallest value i used you'll see how it affects the lighting so you can see it's much brighter but it's not as bright as it was before I scaled it I'm gonna reload the map put it back to its default values I'm gonna delete these again these three and then I'm going to modify the emissive value this I'm gonna build lighting real quick okay so these are the values I currently have set in the material itself so in the material I'm actually I have my missive intensity set to one I'm actually gonna set it to 0.5 so it's going to be half of that vetti missive value so then I'm going to rebuild my lighting again as you can see with half the emissive value it's it's much darker and seen as putting out less light even though I didn't change the size of the surface and another thing to keep in mind is this only works with setting static light builds of the cannot use the missive material lighting from meshes for dynamic lights are full of dynamic scenes and it also does not affect movable objects if I set this little sphere to static and then rebuild lighting and we'll get lighting just like everything else I'm going to leave reload the scene one more time so now I'm going to move this sphere over into the center so you can see how how it changes as I move it they make it a little larger lighting now remember this material in this sphere is a bright fluid material this is I made it larger the light emission from is much more intense and as you can see it's bouncing blue onto this orange we load the map again so let's say I take out all these actually not going to take out these gonna keep this card here and I'm going to hire rotate a little bit then I'm gonna go bakelite again so now as you can see it's it's lighting basically the entire small environment here it's got very soft light bounce it's based on the size of the surface and it's injecting all the colors from this this is material into the environment now if I scale this vertically or horizontally only then rebuild lighting pay attention to the shadow that it casts from a cylinder so as you can see the lighting is less intense because it's less surface area once again and the shadow from the cylinder is more noticeable because the size of the surface behind it casting the shadow just like with source radius on point lights smaller up now in order to enable static mesh emissive lighting you need to have the mesh selected and go into its lighting properties and go into light mass settings and then you want to check this box that says using missive for static lighting and then obviously your mesh itself has to be set to static so once you do that your missive values material will inject into the scene now you also have to have your material setup and a specific way for it to emit light into the scene so I'm going to open the master material from my instance so in order for it to work you can use all the default settings the only thing that you do need to have is obviously any missive any missive no tree setup so you plug whatever your missive no tree isn't your the missive node of your root node for the material so mine is is pretty straightforward it gives me a little bit of ability to modify the material so I've got a switch whether or not to use a mask so if I don't use the mask just using an overall color that's I'm getting the colors here with the mask enabled I'm getting these RGB colors here and the mask is basically a texture so I also have that both of those values the emissive color and the emissive texture mask multiplied by an emissive intensity so this is basically is how intense the emissive value is so if you don't have a multiplier for your intensity then you have to literally if you want a specific color you have to scroll each color value up in relation to each other to get that emissive density rather than just having a single value for overall intensity don't you have all that set up you have your mesh set to static and you check this using missive or static lighting under the lighting and light mass settings tab of your mesh I'm gonna go to Bill lighting you're going to get your emissive light values so in real world these cases something this would be good good for is like if you have a material for a sci-fi wall that has little light fixtures in the material and you want them you know they don't move or anything they don't change color and you want them to inject into the world rather than having to place a point light of each one you could do that you can have little backlighting underneath the staircases things like that works well for and keep in mind a static mesh lighting is it does not at least from what I can tell it does not do any indirect lighting so it won't bounce off of the surface and then go back into the it's just a direct lighting only alright so that covers static mesh emissive lighting the next part of the video is going to cover modulate heading so let's let's jump into that now alright so this scene has a modulated material setup which means when the light passes through this materials gonna pick up its color values and project them into it's basically a shadow map so this is an entire entirely static lighting feature it does not work with dynamic or stationary lights and in order to use this feature you need to first set up your material to support it in order to do that you have you have your root node of your material you have any miss of color which is your texture this emissive color is what is going to be the color that's picked up by the light as it passes through it so you wanna in your main material tab for the root node you want to have your material domain set to surface your blend mode set to modulate and your shading model set to unlit and two-sided I don't believe it's necessary but you may have to have two sided enabled material so once you have all that set up then everything should work so you just go in and build your lighting obviously want to play your material to whatever surface is gonna have the the that you want to have the light values picked up from as it's cast through by the light and then you just build your lighting so obviously as you can see I've already built the lighting in the scene if I go through and I rotate the light actor to a different angle it's going to cast direction now and I hit build you can see this it's projecting in the direction of the light now another cool thing about it is if you look through the light if you look through the surface that the light is modulating through you can see that the light rays from the directional light the light shafts are actually picking up the color values as they pass through the material so in the most obvious use cases where this is what I have here which is a stained glass window so this is obviously a very cool technique for the things like the obvious which would be stained glass windows I could just have you know regular windows or a rice paper that light passes through anything that would pick up the light would pick up colors while passing through and that remains static you could use this for all right so that covers that the next part are going to jump into is post-processing for for lighting okay so this scene is set up with a bunch of post-processing features for lighting specifically enabled so as you can see I've got lens flares which get more intense the closer you get to a surface I've also got screen dirt which actually is not able at the moment exaggerated so you can see a little better so I've got lens flares I've got screened dirt I've got bloom I've also got depth of field if I pull out you can see the depth of fields in effect I'm gonna break down how each of these work and how to set them up in your post Pasha post process volume so post process volume we can add from your modes tab under the place place tab here and you can literally just type in post or go under passivity for it and drag and drop into your scene so by default the post process volume will only affect your view when you go inside of it but if you go into post process volume settings and click this box for internet extent then that means it'll affect everything see if I uncheck that and the volume is actually here you see if there's no effect but if I go inside the volume see the it's it's affecting letting my view outside of it that's off again so I'm going to check that and it's basically affect you affect review anywhere in the environment you can have post process volumes inside of that entire environment that once you walk into the effect your screen separately by studying their priority so let's go into the settings that I have in this post processing volume that specifically have to do with light so chromatic aberration doesn't directly affect light but it is something that can affect the overall look of your environment which I'm kind of putting in with lighting so chromatic aberration what it does if I adjust the volume of just the value here so I set it to a higher value like five or ten what it's doing is it's basically separating the red green and blue values in the entire scene and giving kind of a stereoscopy effect and if you do it on a very small level it can kind of remove the really crisp transitions between objects not where they intersect but just visually in the world so if you use a value of zero it's completely off you use a value of 0.25 or 0.5 it's very subtle but when actually playing playing a game at normal movement speed and all that it's a it definitely makes a difference it's more on a subconscious level another thing that have enabled it now is vignette vignette is your corner-to-corner gradient you can see it darkens up starting at the corners moving in towards the center you could use this at runtime for things like blinking high ball if you wanted to by using higher values I'm using 0.25 for this example you also have bloom obviously so I'm using the method set to convolution which is the it's intended for cinematics it's the highest quality but I'm using it for this demonstration purpose because it is the best looking you know obviously use standard as well but I'm gonna keep it on convolution your intensity if you have it set to convolution it's not going to get just about if you have it set to standard you can adjust the intensity back to convolution our completion kernel is basically the it's it's kind it's basically the shape of the the bloom so if I go in and add let's say add okay kernel to it you can see that it's extremely intense so you'd have to set up a material specifically for it our texture specifically for it but you can modify the kernel I'm and then you can also go in and adjust all these convolution settings all the other settings are for standard bloom but your convolution scale which is basically your intensity for convolution convolution Center convolution boosts your minimum maximum convolution whose settings convolution boost multiplier and convolution buffer so dirt mask which I just mentioned a little early in the video so this is you see those little specks are showing up on the screen as the light the lens flares are intersecting with your screen that's what the dirt mask is so the first time we're actually seeing this in a game was probably battlefield 3 or is really used well and this is based on a texture that you give it so if I put in another another texture like this circular lens flare you can see that it's only rendering that mask where the lens flare intersects with the surface within that mask area do the same thing with an anamorphic lens flare or a render clouds so I'm gonna go back to the screen dirt mass that actually set up for this but double-click you can see what that looks like so basically what it's doing is whenever the lens flare intersects with any part of the screen that area of the lens flare is going to be masked by this and kind of render this texture a little bit so it gives you a much more realistic like it will specs on the lenses type of look dirt mask intensity self-explanatory it's how intense the drip mask is you can adjust the dirt mask tint as well and yeah if utilize a dirt mask in conjunction with lens flares which you need for the dirt master render so if I set the lens flares intensity down to zero you see that dirt mask does not render at all so you need to have lens flares enable auto exposure this is your eye adaptation high dynamic range so it's basically by modifying all these values which I'm not going to go into in detail right now you can adjust how long it takes for your eye to adapt from a dark area to a light area and how wide of a spectrum we have between dark and light like what's the brightest and darkest values you're going to adjust for and you can also change the mode between auto exposure histogram and expose your basic lens flares so my lens flares are what you see going on here the actual flares from the colors going now they don't come off of lights themselves they come off of the bloom value so need to see if I set the bloom intensity to zero the lense lawyers don't exist I slowly bump it up you'll see that they it gets more intense other ones players do set this back to convolution but modify the intensity of the lens flares obviously it's doing do I can also go in and adjust the tint color of the lens flares so that could come in handy if you have say like a light source it's one color but it's going through fog that's another color and using conjunction with like volumetric lighting and you want it to match you could Boston really cool thanks bouquet size is basically the the scale of the it's basically how you're blurring the lens flares threshold as a modifier of that okay shape you can actually assign a texture to it so I assign the screen a dirt texture to it see is kind of being masked by that if I assign an actual bouquet texture to it which is what you're supposed to do then you can see that it's actually the lens flares are molded to that shape if you tweak your bouquet size and get some ghost effects so if I drop the intensity down if I want a more realistic intensity probably do like a point one or something like that and then probably drop down line jerk mask intensity to 10 or something like that as you can see the color of the dirt mask and lens flares and all that are based on the bloom values in the scene also whatever tint you have said it formed sea urchins set to white it's just gonna be colors being emitted by the bloom so depth of field as I said I also have that enables us I pull back you'll see that objects in the distance become blurry and if I come in crisp and clear so I prefer using Dawson depth of field bouquet depth of field was the I believe is the cheapest to render actually maybe the second sheaves I think Dawson is the cheapest and circled depth of field I believe is the supposed to be the highest end I personally prefer to Gossett if the feel just because it seems to give you the most control so you can set your focal distance for example just how far what your sensor focus point is for your depth of field you have your near focal region sorry your focal region which is you have that center point which let's say is a thousand thousand thousand units away your focal region is going to be from that center point how many units out it goes in all directions from the distance of the camera so I pull back a little bit towards some actually blurry scale this up you can see that the the region inside which everything is clear it becomes a bigger smaller based on how a scale that you're Neil near transition region is basically how far from the camera it starts to transition into your ear floater size let's right now with an ear blur size set to zero but if I scale that ear blur size up you'll see it's actually littering towards the camera or closer to the camera so that's basically your near depth of field and your far depth of field when you have a focal region inside those values for most used cases you're probably going to want to set your near versailles to zero and then your far blur size is the maximum scale that your player gets at distance scale it up just becomes blurry scale it down and then another thing that you can go in and adjust with your post-process filing that has to do with lighting is your global illumination so this is the modifier it's talking about earlier where you have a global illumination or indirect lighting intensity on your light but you can also adjust it with a post-process effect in the post-process point right now is set to a 1 which is the default if I slide this up see this the bouncing tends to become more intense it doesn't actually require rebuilt Lighting's it's just doing it in screen space because it isn't for the process effect but you can go in and modify it this way you can also adjust your indirect lighting tint and once again this is not changing the light itself is just changing the way it's rendered on the screen your light propagation volume so if you have a light propagation volume enabled like I showed you and the other scene you have relative values you can modify in post as well I'll be on occlusion this is also part of your lighting setup so ambient occlusion is obviously the area where objects intersect and it's kind of like a soft shadow for intersection you can adjust the intensity you can adjust the radius which is basically the distance that your conclusion goes out from the area where objects intersect you can also go in and adjust more advanced settings which are all self-explanatory as well hower is probably the most useful so on top of intensity you can adjust the power that pretty much covers everything to do with lighting in the post-process volume now we're going to go into the final part of the video which will cover one of the most important parts of your lighting setup which is your light Maps so let's get to that now okay so in the the final part of the video I'm going to cover as I said before one of the most important parts of your lighting setup which is your which are your light Maps so one light maps look like are this the light Maps basically control the resolution of the light as a pitcher surface on a per object basis you can also modify this by adjusting your overall lightmap scale but it's still going to be based on your lightmap scale so as we'll see here I have my light maps scaled pretty little pretty high and the density is really high but they're still rendered as green if you modify your light map you can actually do it per object by going under the lighting tab and overriding your light map resolution so if I scale it here you can see how the light map density changes so blue is going to be the most most optimum it's gonna be the least performance intensive it's gonna create the less performance overhead the least performance overhead green is kind of in the middle and if you started getting into orange and red na stuff it's gonna require a lot more time to compute when you actually do baked lighting and it's also going to generate higher-quality shadow maps and light maps and all that stuff so your your files has gonna being bigger rendering overheads gonna be more intense let's add this back to its default value I'm gonna check this now if you want to change your light map density or your light map resolution on all the objects for a specific asset you can do that by going to the asset itself so once again either having an content browser double clicking it here or right-clicking it here and do edit or right-clicking it here and doing at it there are many ways to get to the editor so you double click the asset which I'm doing here and under here you can adjust your light map resolution and once again you can preview this in bill time so as I scale it up and down you'll see it changing there and if I have multiple instances of this in the environment it's obviously going to because I'm doing it on a on an asset level rather than an instance level so if I make a duplicate of this here and I go in and change it for just this one you can see it's only affecting that asset even though they both the same mesh so one thing that I usually like to do depending on the quality of light static baked lighting that I'm looking for and depending on the object itself is I like to go in and kind of match up my light map density so light map density is going to be based on your light map UV size and density and all that good stuff so a light matte value of 64 for the sphere might not be the same light map density or color value when you're previewing it as it would be for the cylinder simply because they have two different movies and the sphere would probably end up having a higher light map density by default because it's going to take up less UV space so it's really based on the object itself so as you'll see in this scene I have everything is set to a green so I've kind of modified all of my light map densities to match up in the scene so you can see like this cylinder I have set to 128 this sphere I have set to 64 and the entire cube hollowed out cube for the environment I have set to 1024 so you can see that each each one required a different light map scale to match up in the world another reason one of the reasons you want to do this is when you go to build lighting which I'm going to do now you'll notice that the lighting resolution on every object is consistent throughout the environment so if I had a different light map resolution for say this cube or different light map density for this cube and it was like four times larger than life density for this cylinder the shadow for this is going to look much lower resolution well on this cylinder and that's where you start to get break up in your environment lighting so I'm actually going to show you what that looks like if I go into like map density again it's in order to bring this view up you go into your pee mode up here lit by default go down to optimization viewpoints or viewports and select light map density just a lot of why you see what your light maps look like so I'm gonna override this light map density I'm going to set it to it really low value like 32 for just this I let out cube I set my mode back to lit and I'm gonna build my lighting so this is with built lighting so as you can see the the shadow resolution is extremely low on the surface but it's still high on the cylinder so you start to get a disconnect with your lighting which you do not want so whatever you do whether you go with a really dense high resolution light map value for your entire scene or a medium or a low you want to make sure that all of your main objects that represent your environment are a similar light map density or you start to get these disconnects SK look very strange just set this a little higher I had such a 1024 so I set it to half that which is 512 build lighting again as you can see the shadow is still much lower res in the cylinder but it is better than it was before so I'm gonna set this back to its default value or all right the default value that I said all right build lighting one more time as you can see the shadow is higher resolution and it matches with the surface the light map resolution of the cylinder in the sphere so if I go back in the light map density can see everything set back to green now you'll see on this the sphere is some area to going into the blue that's because the UV wasn't the aspect ratio for the UV wasn't perfect all the way across so some areas are stretched out so light maps are only the only effect static or stationary objects they have no effect on fully dynamic objects obviously so if I go back into my map density view and I set the cylinder to movable move it you'll see it no longer shows light maps because they're not affecting that object I said as a stationary static if I go into lighting only get a better idea of how the shadows are working and as I said if you make the light map density the the more dense your light maps are and obviously the larger environment lights you have also going to increase your like that build time your aesthetic static lighting build time so the best way to think of light Maps would be you're there basically you DS for your shadow maps and light maps so that's why when you import a mesh into by default it it has the option check to generate light map you've ease so you can have a separate UV map just for your light Maps and a separate light map for your act or UV just for your for your textures so that pretty much covers everything for light maps and their importance and it's going to conclude this this video on lighting an unreal engine and as I said I have timestamps down in the description for each part of the video so if you want to skip through it you can you can find that down there if you have any questions just post them in the comments section below
Info
Channel: C-Media
Views: 86,598
Rating: 4.9740539 out of 5
Keywords: Unreal Engine 4, UE4, Lighting, Materials, Tutorials, Environment, Environment Design, Level Design, Overview, Point Light, Spot Light, Directional Light, Light Propagation Volumes, LPV, Skylight, Cubemap, Volumetric, Volumetric Light, Baked Light, Dynamic Light, Static Lighting, Shadowmaps, Lightmaps, Lightmass, Distance Field, Contact Shadow, Light Properties, Walk-Through, UE4 Tutorial, Unreal Engine Tutorial, Unreal Engine 4 Tutorial, Epic Games, GameDev, Game Development
Id: kFaEf8V8XYY
Channel Id: undefined
Length: 92min 3sec (5523 seconds)
Published: Sun Nov 26 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.