Multiple Lighting Scenarios with Skylight bake incorrectly

Now this might be “as designed” but there’s not a whole lot of documentation on Lighting Scenarios so I’m not too sure.

I have three lighting scenarios pulled into a persistent level.

Each of these contains a directional light and Skylight that samples a Skydome static mesh.

The static mesh sky dome is contained in each lighting scenario because it is a different color to reflect different times of day so it affects the skylight capture.

In theory I should be able to turn on all the scenarios, bake lighting, and it runs through and individual bakes each scenario. This does happen but the result is different than if i turn on and bake each individually.

It seems there is something from the other scenarios getting mixed in with the bakes. One scenario will bake correctly but the others will be a bit mixed.

I reproduced this by

  • creating a scene with a plane and some basic geometry.
  • Added a sub level containing a skylight and a static mesh for a skydome - half sphere
  • Saved out two extra sub levels from the initial sub level and changed the color of the emissive attached to the skydome
  • Marked all the sublevels as Lighting Scenarios
  • turned all sub levels on and baked.
  • Then turned all off and individually bake on and baked as well

So it really seems to be just sampling the SkyDome from Scenario B. I guess non-lights don’t get turned off for each bake? If I adjust the intensity of each skylight I get a different intensity in each - so it is using different SkyLights - but the color is still the sample from B.

I also had a similar though less extreme results by getting rid of the skylight and switching the skydomes to use emissive for static lighting.

I do get MapCheck errors about having multiple skylights in a level when I start the bake but I figured that’s natural since I do have them all turned on to bake one after the other and that at time of actual baking there would be only one.

When I used only directional lights for the scenarios I couldn’t see any difference between baking the scenarios all at once or individually. Just when I used Sky Lights or emmisive static meshes.

I also tried making the SkyDome meshes “Dynamic” and setting them to “Light as Static” since maybe the system was trying to toggle the visibility and couldn’t because they were marked “Static” but the result was the same.

It’s a slight though not terrible inconvenience to have to bake them all individually but I’m not sure if this is a limitation of the current implementation of the feature or a bug.

I’m almost positive that you are intended to bake each lighting scenario separately, switching between them at run-time. They are never intended to run concurrently.
You should put all your unique lights into each lighting Scenario sub-map, leaving common or shared lights in the persistent or other constantly loaded level.
In this way, each Lighting Scenario can contain vastly different lighting setups while maintaining commonality.

Thanks for your reply and you could be right though here it is mentioned that you shouldn’t need to.

Also Unreal does go through the process of separately running bakes for each scenario so it seems like it is “supported” somewhat.

Additionally it’s only the Skylight contribution that gets messed up directional lights don’t seem to get confused. I can even put a cube in a single lighting scenario and only that scenario bakes shadows for the cube.

This is still happening in 4.16 - if this just isn’t possible is there a way to specify what lighting scenarios to bake from the command line? It would make things a lot easier if i could just queue those up and have them done in the morning before people get in.

Sorry if I missunderstand your question, but I think the answer is this:

UE4 cannot run the lightmaps concurrently EVEN in the editor, if you have 2 light scenarios visible in the editor then it may SEAM like it’s working, but it’s an illusion! When you have 2 lighting scenarios enabled in the editor it simply switches one of them to dynamic, so that you can 'kind of preview it". Skylight might be more difficult than others to preview dynamically.

You can easily test this by observing bitmap artifacts goes away from one scenario when you enable multiple in the editor, which again, is because one of them switched to dynamic preview mode.

“if this just isn’t possible is there a way to specify what lighting scenarios to bake from the command line? It would make things a lot easier if i could just queue those up and have them done in the morning before people get in.”
Simple, just hide them in the levels panel. A warning message will even tell you that the channels you’ve hidden won’t be rebuilt, next time you try to build.