How do I stop my directional light ("the sun") from penetrating/bleeding into my caves?

Title says it all!

I’m fairly new to UE4 so I’m sure this is a basic issue but I’ve searched and found nothing that was easy to understand/worked.

I have a directional light in the sky, and I have an underground cave…

How can I stop the light from my directional light from bleeding through the walls of my caves? Do I have to put “earth” over top of my cave? Currently my world is very small, as I’m using it to learn, and it has a rock face with a cave entrance in it. Nothing to elaborate but I DO NOT have a landscape texture over the cave. Here is a screen shot.

Outside view:

View from in cave:

Basically I want it to look like this:

So that the only light inside the cave is from the torches/fire, while still being daylight outside.

Thanks in advance!

Can’t you just put the cave in a big black box made from brushes?

I thought about doing that.

I wasn’t sure if there was a more elegant solution though!

I guess this is what I’ll do


For anyone reading this in the future this is what I did:

I placed a hollowed out box, drawn with BSP, around the entire cave. I then cut out the entrance to the cave with a completely subtractive box.

On the inside it’s dark as night :slight_smile:

Yeah the problem is that the back-faces of the cave mesh are facing outwards, and shadowing only occurs through front-faces. This is a pretty common workaround for that, since it’s cheap :slight_smile:

As far as I am aware there is a switch in shadowmapping c++ file which controls the face culling, you could just turn it off and it would fix the light leaking but you would then likely see more shadow acne but it probably wouldn’t be such a big deal.

It worked like a charm and took about 3 minutes to do.

Interesting. I’ll look more into that. But I’m a noob with UE4 and like the easy approach of the box :smiley:

it does not work at all…why would it

bsp’s dont interact with light anyway