Search Unity

Different Lighting Setups for Different (Active) Scenes

Discussion in 'Global Illumination' started by jashan, Oct 12, 2019.

  1. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    In our project, we have wildly different environments. Some are particle based and don't use any lighting at all, others have fairly complex lighting where baking would be ideal. I remember that in earlier versions of Unity, there was a warning and still found this thread about it (would have loved to reply there - but it's a beta-forum, so not open to further replies):

    Warning: Your current multi-scene setup has inconsistent Lighting settings...

    I tried to find enlightenment through the manual but it seems there's no information about mixing lighting in different scenes available.

    The issue I now ran into and why I'm posting here: One new scene that uses baked lighting works well in the editor - but in a build, the baked lighting just doesn't show up.

    The way our setup works is like this: We load one scene that basically has managers and the player and then loads in the different environments. Each environment consists of one "management scene" and one that has the actual environment (where the lighting actually matters). That one is always loaded last. Also, that one is set to active once everything has been loaded.

    So the question is: Why is my baked lighting not showing up in the build? This is in Unity 2019.1.14f1. That specific scene uses Subtractive Baked lighting and the GPU progressive lightmapper.

    Maybe @thefranke, could you shed some light on this? ;-)
     
  2. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    This issue is starting to drive me crazy: First, I tried setting all scenes that are loaded to Mixed Lighting. Still the same issue. Now I just did a build with only this scene. Still the same issue!

    Then I switched from GPU, to CPU, to Enlighten. I also tried removing all quality settings except the maximum (after reading Lights in build looks different from editor).

    Here's a screenshot of lighting in the editor (this is the way it should look), and lighting in the built player:

    UnityBakedLightingIssue.jpg
     
    konsic likes this.
  3. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Also, I just tried replacing the shaders for the houses (they were still using legacy diffuse) with the Standard-Shader, and just to be sure, I disabled GPU Instancing (which wasn't used, anyways, due to static batching). Again, same results.

    Here are my lighting settings:

    Capture_LightingSetup.PNG

    Capture_LightingSetup_2.PNG
     
  4. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    So, I tried that scene in a new, empty project - and there it worked. And then I remembered that a long time ago, I added shader stripping, and at that time, I didn't use baked lights ... so, most likely, in the next build it should be working:

    Capture_BakedSubtractiveReactivated.PNG
     
  5. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Probably I would have also needed "Baked Directional" active. I went with "Automatic" now and it finally works.
     
    kristijonas_unity likes this.
  6. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Hey! So I assume the issue you were having is fixed? Did this result in some undesirable output in your game, or is everything working as expected?