- We've seen that materials can really bring your scene to life in on Unreal Engine Four, but of course, going hand in hand with materials is the lighting setup. Now Unreal Engine Four actually has a very powerful lighting system involved with the game engine. And we're gonna take a look here, very quickly, at an overview of the basics of lighting in Unreal Engine Four. So if you're following along with this course, and you have access to the content, I'm simply using a base scene that we've been assembling or building along the way here.
And what this scene will allow us to do is just get familiar with the lights within Unreal Engine Four. So the first step we want to do is go over to our left hand side, into our Modes panel. And actually click on the Lights. And you'll see that it's a very basic setup. We have four options available. For this example, looking at basics of lighting, we want to look at these first one, two, and three lighting options and take a look at how we can interact with them and work with them within the Unreal environment.
So the first thing you'll notice with our scene, it's quite dark, and there are a few reasons for that. We don't really have much in the way of lighting going in here. And we don't really have any environment lighting going on within the scene. In fact, if we kind of zoom out here, you'll see that we have our island and we're kind of devoid of any other lighting in the environment. Now this scene does have some basic lights available here within the scene. And we'll take a look at those in a moment. Before we can do that, let's take a look at what those lights are and how they work, and when you might want to use them.
So some basics in lighting here. A Directional Light, if you're familiar with lighting in any context, whether it be with actual film or within 3D software or 3D content creation, these lights work in very much the same way. Now some of the parameters, we'll take a look at how they're set in there. So what I want to do is just left click and drag into the Viewport. And I could place a Directional Light really anywhere that I want to simply because a Directional Light is an infinite light that is going to provide light in whatever direction I am pointing that light in.
This light can actually be physically below the island, it doesn't matter. It's broadcasting light based on the direction that it is facing in. So let's look at the Details panel. As we know in Unreal Engine Four, the Details panel contains all of the parameters, the properties, the attributes, all of the components that are necessary to dialing in anything in relation to an object or an actor for that matter, in Unreal. And in this case, the actor we're using is a Directional Light. So let's take a look at some of these settings in here.
So if we look at our location, we just drag this in and by default it's going to put it wherever we drop this. It's going to read in some of these values on here. Some things to keep in mind, the most important thing for affecting the lighting of a Directional Light, when it comes to transformations, you're gonna find that the rotation of that light will have the biggest impact. And just to illustrate that, actually, let's get out of Rotation and go to Transformation. You'll see that our lighting is not changing if I move it up and down, and if I move it in this direction as well because it is maintaining that direction of beams coming in.
So think of it as something that's very infinite, much like the sun, but even more infinite in the sense that we are in a virtual landscape here anyways. So any way that I transform that, it's not really going to have any affect whatsoever on my lighting. Similarly, if I grab my uniform scaling here, I can actually scale this light up and down, but it's not going to have any affect on that either because it's not directly linked to the intensity or anything. However, with the transformation, if I hit my E hotkey or if I use these little icons in the Viewport, I can go to my rotation gizmo and I can affect how that lighting is applied.
And you can see that I'm just rotating this light in the scene. By default the Directional Light will have shadows on it. And by rotational value here, I can affect greatly, how that lighting is going to affect the environment. And we can really see that with the intensity of the light fall off on the objects as well, of course, with the shadows in this environment here. So let's just for sake of learning these lights here, let's leave it maybe something like that. And then look at some of the other settings.
Now by default, when I bring this in, the light intensity is at 10. Now just a note on that, that light intensity is always going to be different depending on what you're doing for your scene. It's always going to have a default value of 10, but your results right away, are going to be different, and that's based on your materials, the overall scale of your scene, and what other kind of density of objects that you might have. If you have a lot of reflective surfaces, for example, it's going to affect the overall appearance of this. So the intensity in this light might be a little bit bright. And certainly, we can just simply, quickly dial that down, or up if we wanted to go with something really bright, kind of midday, we can certainly adjust that.
So that's the basics of placing a Directional Light Let's also take a look here at this. Now all of these lights that we're gonna take a look at, Directional, Point, Spot we're going to avoid the Sky Light for right now, are going to have these basic settings here. There's going to be an Intensity Setting, there's also going to be a Color Setting. So if we wanted to add some color to that lighting in there, maybe we want it to kind of warm things up, make it a little bit yellow or towards an orange, you can see our Viewport is updating that. And this is where we could start to get into some different feelings, if we wanted to do something like maybe a dusk, or an early dawn or something, we can certainly affect how that lighting is going to appear, simply with our Color, by dialing that in.
As well, if we go down a little bit further in our Details Setting, we will have a couple of different parameters that are important here. Now this Atmospheric Sun Light, if we click this on, this is going to allow this to be essentially defining this as our main light source, working as our overall global sunlight. And this is important if we want to connect this with something like a Sky Light or something with a larger, more global environmental light which also may be mapped with a texture, for example sky in the background.
We'll look at that a bit later. But for now, the important thing with a Directional Light is operates much the same ways you would be used to or familiar with any other 3D packages, and it can be thought of as more of a global infinite light, something like a sun would provide where the rotational value is most important for that because of its directional attributes. Now let's take a look at the difference between that and a Point Light. I'm gonna leave my Directional Light in here, but I'm actually gonna dial down the intensity just so that we can see, I'll bring it right down to zero, the difference here with a Point Light.
A simple little Point Light, we can drag and drop into the scene and we'll maybe put it right around these rocks here. Now the first thing we're going to notice is that intensity that it comes with. This is where a scale is actually important with a Point Light. And if I scale that right down, you'll see that the actual effect of that lighting is greatly being affected because you'll notice in my Details panel that I'm actually affecting the Attenuation Radius. And this is the overall brightness or fall off for that matter, of the light and what is affected by the light.
So we can simply scale that in and move that back and forth to affect how much it's going to affect the local surrounding area with its light. Now of course, being a Point Light, rotational value, unlike a Directional Light, this is not going to have much effect here at all. But of course moving this or translating this around the scene will have great effect on this. And we can certainly see that result in there as well. Much like a Directional Light, we can also note that this simply has a color setup in here and we could quickly define the color of that light that we might want to use in our scene there as well.
For whatever effect it may be. There we go, let's turn our intensity, we could crank that right up, bright, just to see how right we can actually get this. But let's turn it right down to zero. And let's grab a simple Spot Light which is pretty much a classic light in the sense of what it can do for overall lighting. Now there are a couple different parameters on this light. and there are several different transformational values that will affect this. Scale will affect it. Rotation, of course, is going to affect how that's going to light. And certainly translation will affect where the lighting is happening.
You know it's important to note that in our scene right now, it's of a scale that we're not seeing a lot of effect from this Spot Light. And the reason for that is that we can come down to things like our intensity. And you can see, if I dial that out, we can start to get some brightness on there. But we may want to adjust things like the Attenuation Radius. And that's going to give the biggest amount of effect on the fall off of this. And you could see, if I dial this or bring this up, it's going to affect the distance that it's broadcasting that light. Now of course you'll notice this big cone coming out of here.
We have an outer cone angle which is this large one you're seeing here in the Viewport, and that's going to greatly affect how much light is being broadcast in a radius or in that direction there. But we also have an inner cone light. If we start to bring that in, we can actually dial in where the main focus of that light will be. Now anything between the inner cone and the outer cone is going to result in light fall off. So if we have a large gap in between, much like this, we're going to get some nice, smooth fall off. If we were to dial in something like this, maybe we bring in our outer light and bring it in tight towards that inner light, we would see something along the lines of a very, kind of defined, more sharpened effect of a light where we're going to get more of a, let's just frame in on that, more of a hardened, or less of a fall off for that matter, by doing that.
So if we dial this inner cone just slightly out, you can see we get a very sharp fall off, in fact, if we match it directly with the outer cone. And opposite here is if we grab the outer cone and we start to bring that out, you see we get this nice soft fall off. So these are different effects that we can certainly get with a Spot Light. And you'll notice that all of the different transformational values are going to have an affect on how that light works. And certainly if we rotate it up, the shape of the light will be affected by this, but also the fall off as to how far that light can reach.
And that's defined by our Attenuation Radius and our intensity as well. And of course, much like the other lights, we can affect the color of that light here in much the same way. So there's a quick little review of the lighting basics here in Unreal and some of the basic parameters that would work. I'm gonna delete that light away. The last thing we want to quickly look at is an example of how some of these lights might work. So for example, before we look at that one, let's actually grab down here in our lantern.
Now in a previous lesson, we created this flickering light effect solely with materials in the Material Editor in the Power Node of Unreal Engine Four Materials. Well to add actual real lighting effects, for example, shadowing, and having an effect on the overall environment with real lighting, we would want to add some actual real lights here. So this flickering is being driven by a material. It's not actually lighting the environment. It's not going to provide any shadows. That's where these Spot Lights would come in. And that's where we would simply go and define a bunch of lights facing in different directions.
And that's all that's happening here, is that we have simple little lights facing in different directions. That will allow for the broadcast of that light to affect the surrounding environment in a more natural way than just a material being flickered. So there's a review of the lighting basics in Unreal Engine Four.
- Customizing the Unreal UI
- Creating a new project
- Creating landscapes
- Blocking out levels
- Assembling a scene
- Working with materials and lights
- Adding post-processing effects
- Defining bodies of water
- Adding atmospherics, foliage, and wind
- Working with the Blueprint editor
- Creating cinematics
- Monitoring performance
- Packaging a game for distribution