Lighting streamed levels located at the same place

My goal is to have two levels at the same physical location containing the
same static environment but totally different lighting conditions. I’d like to
switch them under/around the player (and other objects in the persistent
level) at will.

Before building lighting I make sure that only one of the streamed levels is
visible so only that gets recalculated. The problem is that the distant light
in the hidden level affect the other one. How could I prevent that?

I’m on 4.5.1 binary.

EDIT: Only the distant light sun causes the problem, the skylight seems
to stay contained. Yet to try other types of lights.

Hi ZoltanE,

I just tested this method to see what was possible.

It’s easily doable to set something like this up. I set up a map with multiple levels. Three in total. I had my persistent (which only held my BP to load the streaming levels and my player start along with a platform for my character to stand on while testing), Map 1 which I had setup as a day time with it’s own platform, Directional Light, and sky sphere, and finally in Map 2 I had the same thing I just switched it to be a night/dusk version.

The key thing to remember here is that anything in the persistent level will be baked/present into all levels below it. Having the lights in my individual levels allowed me to bake lighting for only those maps while they are visible then I would hide Map 1 and only make Map 2 visible to bake the lighting for that level. This of course is assuming you’re not strictly using movable/dynamic lighting.

Here is the sample I made using the switch. The default level that loads is the Persistent with nothing but the playerstart and platform. When you hit Play you can toggle Map1 on and off by pressing F. Toggle Map2 with G.

Project link (Built with 4.5.1): https://www.dropbox.com/s/feyftu37at5guio/Day_Night_LevelSwitch.zip?dl=0

I hope this helps!

Tim

Thank you for the thorough answer, the example project works great! However I still have trouble with distant lights: The sun on one level is lighting up the other level and I just can’t figure out why that doesn’t happen in your project.

I copied the “Light Source” distant light from your project to my “day” level but the “night” level still got indirect light from it. This means that the light actor itself is not the problem, maybe a world or project setting, I don’t know… Could you think of anything which might cause this?

Oh this happens even on your example project it was just not immediately obvious until I placed a few vertical walls and a brightly colored ground.

Building lighting works fine when each level is opened separately.

After trying for a few days I stopped looking for hackfix and settled with the following workflow:
First I hide all levels and rebuild lighting in persistent. (It only contains dynamic or non rendered stuff so the process is really quick.)
Then I open each streamed level separately and rebuild lighting on them one by one.

1 Like

Did you find any solution? I’m trying to do exactly the same work. Distant light cause the issue too. :frowning:

Ahh~! Thank you.
I will do this by your solution. Do you think you get the best result you want?

This way there is absolutely no crosstalk between the levels because they are rebuilt separately and that’s what I was after. As a workflow however it’s less than ideal since I have to manually start the light calculation for each level. The engine lacks batch map rebuilding so I can’t get done the whole process unattended.