Join Craig Barr for an in-depth discussion in this video Secondary lights, part of Unreal: Architectural & Industrial Visualization.
- [Instructor] In order to provide or complete the overall visual look when it comes to lighting for our visualization project, we want to make sure that we add different lights to give that kind of believability of the scene, and you also want to be able to showcase your architecture, your props, for example, so that the visualization really pops and really comes to life as you're experiencing it. We've looked at how we can place basic lights, or how we can work with a basic overall environment light, and the basic preview lighting. Let's look at how we can work with secondary lights.
On that, I want to point out a note about lightmap UVs, and how that works within Unreal. I'm just going to close some of these world outliner things here, just to organize that a bit. And I'm going to go underneath my Content folder, and if we go into Meshes, for example, or even better yet, let's go into our scene. Let's just kind of scroll things around, so we can see the scene maybe a little bit better from here. I'm going to hit the G hotkey just to clean up the scene and get rid of some of those icons. Let's just click that table there for a moment. And underneath the Details tab, let's just double click on the actual table asset, and we could see that we get this mesh preview that we have here.
And once we have the table within this view, we can simply click UVs, then we can see that we have a UV layout to provide the texture coordinates for that asset. Now, a couple of important things that I want you to look at here, underneath Static Mesh Settings, if we just move that down, we're going to come below that actually into Import Settings, we'll see that we have an area here called Generate Lightmap UVs. That's checked, and it should be checked by default. The reason why we want to use this is that it's going to take our UV layout, and it's going to create a second set of UVs based off of that UV layout to use as a second texture channel essentially.
It's going to build your lightmaps to composite over top of your textures to give you that overall lightmap feeling, or baked in lighting effect for your scene. So, we don't need to save this because I haven't done anything to this object here, but I just wanted to point out what's happening there with lightmaps. So it is treating them as a separate set of textures. It's baking the lights in to essentially composite with your textures in your overall scene. So there we have an overview of lightmap UVs. Let's take a look at adding in some basic secondary lights. Now, what I want to do here is we have a sunlight system setup.
We need to bring some lights in the scene to really bring it to life. I'm just going to hit Escape so we're not selecting anything in there. Let's again collapse this, and we'll open up our Lighting tab, because we're going to start adding some lights to this. So on the top left, we'll click on Lights, and let's just drag and drop a spotlight into the scene. This is where I want to hit G again, so we can actually see what we're working with here. And I'm just manipulating this light around in the scene. You can see that it's by default just pointing directly down, and that's great. What we want to be able to do is begin to place this into the scene where we thing it'll be best for our overall view, so if we have these pot lights in the scene.
So I'm just going to place a couple of them. I don't want to place a light at every pot light. And the reason why I don't is just to maintain some performance in here. I'm going to hit F to frame in on that light, so that we're actually focused on the light here, so I'm orbiting around the light with that. And maybe something like this is fine, but we want to address the overall scope of the light, the overall reach of that. And if we go into our Details setup here, let's just bring this up a little bit more, we'll see that we have a couple of things that we want to work with here. We have an Inner Cone Angle, which is actually the inside of the main light.
This is really nice to be able to dial that in, and have an outer cone. That really gives you that falloff effect of the lighting. If we were to bring that inner cone and outer cone really closely together, you get a really sharp light, you get less falloff. So our Outer Cone Angle, let's increase that a bit too. Maybe bring it out to something like this. And then we can work with the overall light intensity. I'm actually going to leave this light intensity to the settings it's at right now. It's providing a good overall effect for what I need. If I check the cast shadows, you can see the shadow effect that the props are giving me from that light, so that's great.
Now let's duplicate and work with this light. Now in Unreal, the way to do that is simply hold down Control and W, and it's effectively duplicated that light, and you can see that in our world outliner here. We have a SpotLight and a SpotLight2. I want to put one that's a little more over top of this furniture setup in here, and by all means, certainly explore and place lights where you feel they would work best. I'm just essentially taking our pot light layout, and we're going to address those in a second. I'm essentially faking this. I'm not going to put a light at every single pot light.
You could, but again, you get into performance issues. As I said before, the more lights you have, the lesser performance. So this way, we want to work with just our lighting overall in the scene by essentially placing lights where they kind of make sense based on what I have in this environment here. So I think this is going to work out all right with what I'm doing, but there are a couple of areas that we definitely want a light to be sitting in, and one of them here is this kitchen light. Let's hit Control + W, and duplicate that one again, and actually place this light.
Just hit F to zoom in or to focus on that light, and I'm going to place this light right inside that actual kitchen light. And the reason why is to actually give that effect that the lighting is coming out of that kitchen light there. So something like that is fine. It doesn't have to be set up exactly, but this is going to at least provide the proper effects of a shadow if we're going to cast shadows. We can see what's happening there. It definitely make sense. The light is falling out of that area there and it's providing a shadow.
Now this might be something that we don't want to have as bright, so let's turn the intensity down maybe just a little bit here, not too far, maybe in the upper threes, or maybe it's down of a 4,000. That's fine. And there we have that. And now that I've done this one, this makes it easier just to do the dining room one, because we'll probably use the same setup. We hit Control and W, and we place that one over here again. Let's hit F so that we're focused in on that light it makes it easier to orbit around that. And we'll place it within the scene right into that dining room light.
Now, a couple of things are happening here with that light. I can see that we have a bit of a shadow effect, happening from the overall lighting setup. So what I'm going to do is I'm going to actually click on the light itself, that light geometry, the light actor. And I'm going to go down, and I'm going to make sure that we have Cast Shadow turned off on that one, so that's fine. We're actually getting a bit of a shadow off this object here I believe, so let's turn off Cast Shadow. We can see that that shadow disappears. If you want that there, by all means, leave it there. I'm going to turn that off, so that we just get an overall lighting effect on our dining room table there.
So there we go. We have some nice lights that are working within the scene. We're starting to get more shadows. And this is starting to build upon something that is lit from the ceiling. We can certainly go further and put in more lights. The bedroom would need something in there, and as well as the bathroom. The exact same technique. Keep your light number small though. You'll see at the very end of this project, the furthest I pushed this is to around six, seven spotlights, just to keep it simple and to be able to give the environment the lighting it needs, but keep that light load small, so that's it's easier to bake and the performance overall is better throughout our scene as we work as well.
So there's an overview of providing secondary lighting to bring our visualization to life.
- Defining project goals
- Creating an Unreal Engine 4 (UE4) project
- Adjusting first-person project settings
- Creating effective assets
- Exporting assets for UE4
- Importing assets into UE4
- Placing assets in a scene
- Adding and editing collisions
- Working with textures
- Creating a basic material
- Adding a post-process volume