Lighting scenarios affect other sublevels
in a game organized in sublevels with lighting scenarios, why do lighting scenarios which were created in one sublevel affect the geometry of another sublevel?
The main idea for behind all this is to be able to bake static lighting separately for each sub-level and to then load all sub-levels for the game together, without them having an influence on each other. Because in my actual project I do not have enough time to always build lighting for the whole game, also, I am running out of CPU power and RAM if I do the whole thing in one piece.
I have done my research into the normal way of achieving this and believe that "world composition" using levels and sub-levels is the way to go. Only I must be doing something wrong?
Now in more detail:
The test project is set up as follows:
One master level
three sublevels with geometry:
two lighting scenarios were created inside each sublevel, containing a colored point light and a light source:
I first set up each of the "BoxHouse..." levels and baked two lighting scenarios in each of them. So each "BoxHouse..." level contains the persistent (geometry only) and two lighting scenarios. These, of course are created as level assets in the content browser.
Then I created the "Persistent_Main" level, only containing a sky sphere.
Then I dragged each of the "BoxHouse..." levels into the level window of "Persistent_Main", thus creating the three sublevels.
Then I dragged all of the lighting scenarios I had created into the level window as well, thus ending up with the above outlined structure.
At this point, what I see is this, which makes sense to me and is what I would have expected:
But if I now switch on one of the lighting scenarios for one of the BoxHouses, the other BoxHouses are affected as well. I get this, for example (switching on a scenario for the middle BoxHouse):
For reference, when opening up the "BoxHouse2" level and switching on the lighting scenario there looks like this:
I could understand that the lights that belong to that lighting scenario affect the rest of the scene once they are made visible (although this would mean that the whole exercise is futile). But is that the intended result? Why would the lighting scenario have an effect on the whole scene? And more, why does the colored point light only affect the ceiling of the BoxHouse below, leave the rest of it unaffected and the light source illuminates the BoxHouse above completely?
My ultimate goal is to be able to bake static lighting on individual sub-levels, load them all into the scene at begin-play without any interference between them. Please let me know if I am missing a fundamental concept here...
I've not set up anything using your specific use-case here, but the idea behind the lighting scenarios is to only have one loaded at a time, not all or multiple ones. It seems like you're trying to find a way to have lighting channels for static lighting, which is not supported. From what I see I would say that this would be the intended functionality because these lighting scenarios store the lights that are with them. When you load them all you'd likely break lighting for the other levels because those lights now unbuilt for the geometry that is present. I'd suspect also that if you pressed play with all or more than one scenarios loaded you'd get a "Lighting needs to be rebuilt" warning in the top left.
You could always open these levels individually and build lighting, then come back to your persistent and load them there. That should work, but it's a really hacky workaround and isn't a supported workflow. It used to work before lighting scenarios but may not anymore. I've not tried it in a long time. One side effect of that method though is that you will always get the warning about lighting needs to be rebuilt because the persistent level doesn't know if it's been built for these levels that are present. At that point, you can use the command "DisableAllOnscreenMessages".
Hopefully, that helps.
answered Jan 23 '17 at 03:52 PM
Tim Hobson ♦♦ STAFF
I'm trying to do the exactly same workflow, but it don't work yet... Should be great if we could have multiple lighting scenario loaded.
answered Sep 27 '18 at 03:21 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here