Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Lightmapping in WebGL much darker

Discussion in 'WebGL' started by Matt_at_mindtrigger, Jun 17, 2017.

  1. Matt_at_mindtrigger

    Matt_at_mindtrigger

    Joined:
    Jan 20, 2014
    Posts:
    57
    I use Unity 5.5 and bake non-directional lightmaps for the indoor-parts of my WebGL-scene. Those parts are also excluded from my main realtime light-source (Time of Day) via layers. I disable the Time of Day light-source and sky-sphere during baking so it will not interfere with the process and only the many lights I've placed indoors are taken into account. After baking is complete I enable the Time of Day objects again, hide the baking-lights and take a walk through the scene inside the editor... everything looks fine there, the baking is bright and inviting as it should be.

    Then I build the scene to webGL and try the same online... the baking is definately there but it is MUCH darker (and consequently looks much less inviting).

    Does anybody know what happens there? Why do the results vary? This makes baking pretty unpredictable and hard to grasp.
     
  2. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,067
    Tried this with a simple setup right now but can't repro this. Can you submit a bug report with a repro project that shows what you are seeing? Thanks!
     
  3. Matt_at_mindtrigger

    Matt_at_mindtrigger

    Joined:
    Jan 20, 2014
    Posts:
    57


    I don't think it's necessarily a bug, maybe I am just overlooking something in regards to lightbaking...

    Okay it seems setting the Light-source of Time of Day to Realtime instead of Mixed had it lighten up even those parts of my scene that where Layer-excluded from it via its Culling Mask (which is a bit weird). This only had an effect inside the editor of course since GI doesn't work in WebGL.
     
    Last edited: Jun 20, 2017
  4. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,067
    Glad to hear it worked out :)