‫Hello and welcome.
‫In this lecture, we're going to be making the inside of our dungeon completely pitch black by adding
‫some panels around the outside to essentially block out any light from bleeding in to the dungeon.
‫This is a preparatory step for the next one, which is going to be to actually light the dungeon.
‫So let's dive in and see how this works.
‫So when we were playing around with lighting in the last level, you may have seen that we instantly
‫got some updates to the lighting and if we brought in objects, we could instantly see the effects of
‫those lights.
‫And there's lots of scattered and soft bounce lighting.
‫And this is due to a new development in Unreal five called Lumen.
‫It's a real time global illumination light engine and because it's fairly new, there are still some
‫features that are not supported in Lumen and you can see this going on with this material on the wall.
‫You can see how it's kind of got this weird shadowing effect.
‫Well, this is because there are some features being used in its material that are not supported yet
‫by Lumen.
‫So what we need to do is we need to edit this material and we can find the material for this particular
‫segment.
‫Like, so click on the wall.
‫Let's go down to the area where it says materials.
‫And under the materials you can see we've got this stone wall insert.
‫If we select that in the content browser and we scroll down to the stone wall what it means by insert,
‫what does it mean by having that underscore insert at the end?
‫Basically what it's saying is this is not actually the material itself.
‫It doesn't tell it how to render the material.
‫It's just essentially like a blueprint of the material that tells it which textures to use and other
‫settings.
‫So what we need to do is right click on it and click Find Parent.
‫And if we click Find Parent, then open the content draw again.
‫You can see we've got this m tiling master hovering over.
‫That does show us that this is indeed a material this is the master material that the other materials
‫are made from.
‫So we can click this to open it up and we now get the material.
‫Editor It's very much like a blueprint editor.
‫You can see there's all these nodes here except we don't have an execution pin.
‫These are all just data pins.
‫It doesn't really matter as to how this works.
‫Exactly.
‫The important thing is that all the output data is going into this node at the end.
‫And one of the things that isn't supported in Lumen is this pixel depth offset.
‫We basically can't use that, so we need to disconnect it and we can do that by clicking on the pin.
‫It can go away.
‫Then we go to the toolbar and hit Apply and it's going to go ahead and recompile the material code,
‫recompile the shaders and have that available in our level.
‫Now if we go over into the dungeon, you can see that weird shadow effect has gone away and we've got
‫a better looking level.
‫So now it's time to start lighting the interior of our level.
‫You can see there's a lot of light bleeding in to this interior of the level and that is because actually
‫our ceiling is a one sided mesh and so light's kind of coming through in to the room and we'd see this
‫even more if we do the following, because Lumen is a real time system.
‫It really works best when we use real time lights.
‫And what do I mean by that?
‫Well, if we go to our global folder and select the directional light and have a look in the details
‫pane, you can see that there is a mobility setting here and this basically tells Unreal whether we
‫intend to move or modify this object when the game is playing.
‫So static means know nothing is going to change about this object full stop and that allows unreal to
‫bake in a lot of things like lighting settings before you play the game.
‫There's stationary which says you can't move it, but you can change things like the brightness and
‫then there's movable, which basically means anything could change.
‫Now, funnily enough, Lumen, the new unreal lighting system works best when your lights are set to
‫be movable.
‫So if we switch our directional light to movable, you can instantly see the problem here that essentially
‫the light is just coming straight through the ceiling panels because from the lights point of view,
‫they aren't there, they are one sided.
‫And so it doesn't actually create any shadow in here and we can do the same thing, sets the other light
‫in our scene to move ball, which is the skylight.
‫And that's just going to compute all of our lights in real time.
‫That's much easier to deal with lighting.
‫When we're doing everything in real time, we're using lumen.
‫So let's start having a look at how we can block out the light here.
‫I think one of the easiest ways to do this is actually just to take the floor meshes and lift them up
‫to be a roof over the top of our dungeon.
‫That's certainly one way we.
‫Into it.
‫So I'm going to go ahead and search the outline of the floor and then look in the dungeon folder and
‫just select the dungeon floor elements.
‫Then I'm going to go to the four pane view and I'm going to pull the floor up while clicking to duplicate
‫it and bring it up to a level where it can be as ceiling.
‫Here, if we go inside, I just want to check that it is indeed blocking out the light effectively and
‫it seems like it is.
‫If you bring it too close, then you can get some light bleeding in.
‫So we don't want it to close, but we do want it just close enough.
‫Like so perhaps so they would go and knock out any light bleeding into this room except from these corners.
‫And if you pop out, you can see why the edges are not quite meeting the top here.
‫So what we need to do there is put some of that edging meshes around there.
‫So if we look for Edge in our medieval dungeon, we've got the edge stones.
‫Let's drag those in and place them next to these objects and duplicate it along.
‫Maybe changing the grid, snap setting to be one meter and we'll duplicate and duplicate again.
‫And we've got ourselves hopefully the light being blocked inside our dungeon.
‫Yep.
‫Looks like it's being blocked quite effectively.
‫And just for completeness sake, I'm going to take these three edge stones, select them and duplicate
‫them over to the other side like so, and then rotate them 90 degrees with a duplicate and then duplicate
‫it on over here as well.
‫So you can see that inside.
‫Now we've got a very, very dark dungeon.
‫And if you wanted to check that, we can indeed illuminate it at all.
‫Then we could just go to our quickly add go to lights and drag in a point light to see the effect of
‫illuminating the dungeon.
‫So I'd like to challenge you to block out the light.
‫So you've seen how I've been doing it.
‫Add floor and edge stones around the whole of your corridors.
‫You may need to rotate them so that you can cover some of the rounded areas, for example, around that
‫mausoleum.
‫And you might also want to check that all your corridors are dark once you've finished and there's no
‫light bleeding in from any places, you need to cover them all up, make it all dark.
‫So pause the video and have a go and remember that you can use the unlit mode to move around when things
‫are dark.
‫So pause a video and have a go.
‫Okay.
‫Welcome back.
‫So let's remove this light from our scene because we don't need it.
‫We just want to see whether we're making everything nice and dark.
‫So what I'm noticing here is we've got the edge stone here that we don't really need because the edge
‫is actually over here at the end of the staircase.
‫It's a bit of a funny shape.
‫So let's go ahead and move that edge along.
‫Then I'm going to copy a couple of edge stones from the already built section and duplicate them to
‫the other side of this corridor and select a couple of floor panels and move those along to.
‫Now, switching into unlit mode, let's go and position ourselves so we can see the staircase.
‫Then switch back to lit and you can see that the staircase is looking pretty dark in here.
‫We just need to cover up the crypt area now.
‫So we're going to select all of that crypt flooring.
‫So I'm doing that by searching the outline of a crypt floor and then selecting all of it.
‫And I think I just need to be careful to deselect these two bits of floor at the start of the staircase.
‫And it looks like there's this crypt floor wall trim to deselect as well.
‫Then when I'm confident it's all at the same level, I'm going to alt and drag it up to make a duplicate.
‫Looks like I may need to change the grid snapping b 50 because of the height of the ceiling.
‫Then I can bring it up one level more.
‫Now if I switch to unlit mode, I can position myself inside the corridor to have a little look go to
‫lit and I can see that it's starting to look quite dark.
‫These architraves have got a bit of light bleeding, so I think I just need to position them a probably
‫ten centimetres higher altogether so there's not any light bleeding from those architraves and then
‫any of the edge that doesn't quite match up here.
‫We're going to have to put some edging stone around that.
‫So let me just go and check that we've got a little bit of an issue here where light's being let in
‫from the back side of this decorative wall and also from the back side of these mausoleum meshes.
‫So let's try and fix that by duplicating some roof and maybe rotating it down to cover this piece that
‫was bleeding light.
‫And if we want to be safe and have some margin for error, we could actually copy two of them across
‫here so that there is absolutely no way light's coming in there.
‫And we probably want to do roughly about the same thing with our mausoleum.
‫Duplicate some wall down here, rotate it about 90 degrees, and then I'm actually going to duplicate
‫it to be higher as well.
‫And the flooring does need to be higher up on the mausoleum to let the whole roof fit.
‫And I think these walls need to be a smidge further out to not include some of this mesh.
‫Looks like we've still got some light coming in from somewhere, so I'm just going to duplicate a couple
‫more panels like so.
‫And along the top to switch to unlit, let's go inside the mausoleum and have a little look around back
‫to lit.
‫Okay.
‫Looks like it's just the edging stones to do now.
‫Or actually because this area is not going to be visible from the exterior, it doesn't matter how it
‫looks.
‫So we can just add some extra flooring like this and just make it extra wide.
‫Then inside you can see that there's no bleeding going on.
‫So we can do that same procedure with the rest of the corridor, move some of it slightly across, and
‫then the rest over to the right switch to unlit check.
‫I'm inside the corridor and then back to lit and everywhere, apart from that door is looking completely
‫pitch black.
‫Is that true?
‫Even when I'm looking up the staircase, I wonder.
‫Let's have a look at the staircase.
‫Hit lit.
‫Yeah.
‫It's looking pretty dark in here.
‫Very, very dark indeed.
‫So there we go.
‫We've effectively blocked out any light bleed that we were getting inside our dungeon, which will set
‫the stage for lighting it properly in the next video.
‫I'll see you there.