Search Unity

What I see is not what I get... Baking Light

Discussion in 'Global Illumination' started by twetzel2k, Nov 19, 2016.

  1. twetzel2k

    twetzel2k

    Joined:
    Jan 26, 2015
    Posts:
    11
    Please take a look at the images attached. One the lighting I establish in the scene. The second is what I get after baking.

    Lights are set to Baked. and soft shadows.
    All objects are Static.

    What am I doing wrong?

    NoBake.jpg

    WithBake.jpg
     
  2. y4m0

    y4m0

    Joined:
    Jan 6, 2016
    Posts:
    10
    Hi,

    Same problem and same question here : my baked scene is much darker than the realtime one, no matter what I try.

    Here's what I did :
    - All lights are baked
    - All objects are static
    - "Generate Lightmap UVs" is checked for the concerned meshes
    - Realtime GI is disabled
    - I put a big Baked resolution
    - I put a big Pixel Light Count
    - All concerned objects are "Important GI"
    - General GI Default Parameters is on "Default-HighResolution"
    - And countless other settings I tried back and forth according to lots of threads I read to find a solution...

    ... and still I've got the same result as twetzel2k (see below).
    A precision : Like his, my scene is an "interior" one, and I've got no Skybox at all.

    Worst of all, it litterally seems that almost every light in my scene is just off when baked, as I can just delete several of them and see almost no difference.
    On its side, the lightmap .exr file DOES show the difference, so the lights ARE backed. It's just like something is wrong somewhere beetween the building of the lightmap and it's application on the meshes...

    Been on this for 2 days... Does someone have a clue ?
     

    Attached Files:

    Last edited: Nov 20, 2016
  3. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    Stop using Mixed.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    You are misunderstanding something I think.

    If you are baking the lights, they should be off. Otherwise what would be the point of baking them?
     
  5. y4m0

    y4m0

    Joined:
    Jan 6, 2016
    Posts:
    10
    No, I think it's my wording which is confusing (I'm not native english-speaker so sorry for that).
    I understand what you say. What I was trying to explain is that, with some (most in fact) of my lights, should they be there, and baked into the lightmap, or totally deleted and not included in the lightmap, the result is quite the same.

    Stardog > I'm not sure what you're talking about. As I said, all my lights are already set to Baked, not Mixed or Realtime.
    Or maybe you're talking about something else ?
     
  6. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    It says mixed in the screenshot, that's all.

    To bake:
    • All lights set to Baked
    • Mesh import settings > Generate Lightmap UV's
    • Mesh gameobject set to Static
    • Lighting window > Baked GI only
    Disable Important GI on everything.

    Try setting your camera to Forward rendering.
     
  7. y4m0

    y4m0

    Joined:
    Jan 6, 2016
    Posts:
    10
    That's alerady my setup, so the problem may be somewhere else.
    And you may just have given me a clue about it :

    When I set all my lights' Render mode to Not Important, my realtime lighting is as bad (and even a little bit worse) than the baked lighting : its all dark.

    So I'm starting thinking that for some reason baking my lights make them act as if they were all set to Not Important.
    Could it be the problem ?
    Is there a way to bake Important lights and keep them looking as they should ?

    Thank you very much for your help.
     
  8. Hagen

    Hagen

    Joined:
    Aug 16, 2014
    Posts:
    36
    Same issue here, however, I started to get this strange behavior after switching to Unity 5.5.
    On 5.4 I didn't had this issue at all.
     
  9. pitzegluck

    pitzegluck

    Joined:
    Jul 18, 2013
    Posts:
    1
    Baked lightmap has much darker look in 5.5. Changing to detail UV2*2 shader fixes problem. Looks like lightmap is not unpacking in 5.5 on builtin shaders.
     
    Last edited: Dec 1, 2016
  10. Hagen

    Hagen

    Joined:
    Aug 16, 2014
    Posts:
    36
    pitzegluck How do I do that?
    I actually believe that the lightmap is not being applied neither in the editor nor the game window.
    If I go to the scene window and change to Baked. I can see all the baking very well. But when switching back to Shaded view my scene has no lightmap or maybe it is there but extremely dark.
     
  11. polygonspaceship

    polygonspaceship

    Joined:
    Feb 9, 2017
    Posts:
    3
    Hagen did you ever figure this out?
     
  12. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Im confused by this, lights should be off? If they are set to baked, then surely they should be still on?
    I am having same issue, baked lights not showing up at all when the bake is completed.
    Does anyone have any tips?
     
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    Kinda hard to remember the context from 2016, maybe open a new thread describing your issue, but, from the original post:

    If you have set your lights as baked, and then finish baking your scene, then all the light information has been converted into one lightmap. As it's converted to a lightmap, deleting or moving the already existing doesn't really change anything in the scene (at least until you bake again).

    Does that make it a bit clearer?
     
  14. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    In the Unity 4 and the beast lightmapper everything was 100% same between realtime and baked mode
    This is the Unity 5 and newer versions problem
    Progressive lightmapper helps you to find proper settings when using lightmapping mode
    URP makes the work a bit harder than built in pipeline in lightmapping lights intensity after bake

    I couldn't find any solution. the only solution is that you must use the different intensity settings for the baked and realtime modes lighting
     
  15. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    This is no longer the case in URP and HDRP. Both realtime and baked lighting now match. When using URP, make sure that you are in Linear color space, otherwise you will experience discrepancies in light intensities.