How to enclose area from main light source

I’ve created a cave system and enclosed it within a mesh box - I want to light the inside of the caves with dynamic lights and keep the main light source for another area above the caves.

The problem is that light keeps bleeding through from outside the enclosing box - I’ve upped the lightmap resolution on the enclosing meshes to 1024 but it doesn’t seem very effective.

I thought that excluding areas by using large meshes from the main directional light might help me with light build times - is there any effective way of doing this or anything else I could change to increase the light that’s blocked?

Is this the whole level? The reason i’m asking is if this is the whole level then you dont need a directional light or a skylight at all. From the first screenshot it looks like it is the skylight bothering you so just get rid of it. If this is a streaming level or something just set the intensity of the skylight to 0 when you enter the caves.

Not the whole level - I was planning to use the the skylight for an outside area above these caves, which should be a bit more extensive. Maybe I’ll get rid of the skylight though and see what happens when I get there - it’s really a project to learn how sound works but I’m getting more hung up on lighting! Although I assume getting rid of the skylight will really mess with a sky box. I’ll have to look into streaming, but it’s really just light build times that are getting annoying.

By streaming level i mean something like what you mentioned(caves + outside but only one is visible at a time) and since you are planning to do something like that you can just set the skylight intensity to 0 when you go inside the caves. But also keep in mind that you may not even need a skylight next to a directional light when you are outside. To keep build times at minimum, dont use high resolution lightmaps for the cave - a cave is already a dark environment, so many of the shadowing artifacts wont be clearly visible to the player anyway. And keep the size of the lightmass importance volume as small as possible - it only needs to be as large as the area you want to build the lights for.

Ah ok, I see what you mean - yeah, I’ll try to split the different areas up with different skylight intensities. Lightmap resolutions for the cave meshes are all very low, but I can probably turn off a good few of the shadows anyway. One question though - would it be possible to create the outside area and the caves as two separate projects and eventually merge them together, or copy and paste everything from one into the other? Just so I’m not always building lights for the whole thing.

Basically you need to follow this documentation:

Only common objects(i.e. the sun, sky light, etc.) are in the persistent level and the other loaded/unloaded levels become the child levels. You can then select a child level and when you build the lights it will build the lights for that level only. I dont have much experience on how to stream those levels in game though but i’m sure there is enough explanations out there(answerhub, wiki, documentation) already.

Ok, cool, I’ll get to streaming then - I should be able to figure it out with the available tutorials :slight_smile: Thanks Jacky, seems like you’re answering all my lighting questions!

Edit: Streaming and unstreaming with trigger boxes is much easier than I expected - many of the problems I expected to face are now trivial to solve :smiley: Thanks again!