Lighting a game scene that is partially lit and partially unlit

In my game about half the map is outdoors getting sunlight and the other half is in a cave that is supposed to be extremely dark. My problem is that I either have zero light bounce and the shadows are all pitch black, or too much light bounce/ambient light and deep inside the cave is extremely well lit. Why is it so hard to find a middle ground?
Here’s what it looks like with the skylight enabled. The cave floor is almost glowing its picking up so much light.


And this is what the outdoors scene looks light in the middle of the night. The skylight has waaaay too many options for some basic ambient lighting.

I am having the main light source, the directional sun light moving so I can’t bake my lighting. Post Process Volume isn’t helping me at all, there is an option under Global Illumination => Indirect Lighting that is almost helpful but not really. And if I turn the skylight off then everything not in direct sunlight is pitch black.

I have looked up tons of lighting tutorial videos but not a single one was helpful to me.

Are you using a landscape?

In affirmative case, try to turn on “Shadow two sided”, it will block the light from below your landscape and could change the result a lot:

1 Like

My level is generated completely random in blueprints, every object used is a hierarchical instanced static mesh. And I did fix some lighting issues by making sure all the materials used are Two Sided.
Hopefully that is useful information to you and answers your question, I’m still quite new to this,

Hi, this is helpful but you didn’t tell me if you are using a landscape or not, if yes, try to toggle the option I mentioned after selecting the landscape. You don’t need to make every material two sided, it could affect negatively both the look and the performances

Okay sorry, I just looked into landscapes and no I did not use the landscape tool. The BP I’m using to build the land doesn’t even have a lighting tab.

Also, I didn’t realize that two sided materials could hurt performance. Some of the meshes I’m using were free assets from the Infinity Blade props and they are one sided so I know a few of them need to be set to two sided but I’ll fix everything else.

1 Like

One problem is that the adaptive exposure will make every scene “reasonably lit” because the whole goal of the feature is to adjust to various lighting conditions.

To make unlit scenes be less well lit, and well lit scenes be more well lit, you can add an exposure compensation curve. Typically, I find that a curve with two linear segments, and a sharp-ish slanted breakpoint in the middle, works best – when you’re “below the line” you get darker lighting, when you’re “above the line” you get normal or brighter lighting. But other curves can work, too.

Exactly where you put the breakpoint depends on your particular world/art.
Also, it’s a little bit annoying to adjust these, because of the gradual reaction of exposure to changes. You may want to crank up the speed with which the auto exposure adjusts up/down, at least while iterating on the curve.

Or turn off automatic exposure entirely, set a fixed exposure level, and light all places of your level to match that setting.

Or add multiple post processing volumes, that change the exposure settings based on where the camera is at.

Or a combination!

1 Like

The default “auto exposure” value it’s always been correct for my scenes, you should try to identify what is causing eccessive lighting in your cave scene.

By the way I think that using post process volumes is the correct way to do it, in this way you are sure that the scene is looking how it’s supposed to look.

If you’re going to use dynamic lighting only it could be a good occasion to try out UE5 too, lumen lighting looks very good!
(However it’s pretty heavy and there still are some bugs, just give it a try and see if it looks better)

If you have time to record a video of how it’s looking right now it could be useful for other users to give you more detailed feedbacks