Search Unity

Poor quality baked lightmaps

Discussion in 'Global Illumination' started by Myrmidou, Oct 23, 2017.

  1. Myrmidou

    Myrmidou

    Joined:
    Jun 7, 2014
    Posts:
    30
    Hi,

    I'm doing some VR mobile stuff and I have a pretty big issue with my lights.

    First I used realtime spots to light a corridor but it caused a fps drop so I changed it to bake mode.

    Here's the result:

    light1.PNG

    As you can see the result is pretty dirty. The problem is not only with those spots, the ceiling also has some weird stuff happening to it.

    Do you have any idea of what can cause something like this to happen?

    Thanks :)
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Bad UVs.
     
  3. Myrmidou

    Myrmidou

    Joined:
    Jun 7, 2014
    Posts:
    30
    Thanks for your quick response :)

    I uploaded the lightmap where the spotlights are baked, it seems pretty fine to me.
    The next screenshot is the light baked on a cube with a standard material, the light is also poorly baked here.

    It seems I'm missing something, can you explain to me what the problem is?
     

    Attached Files:

  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Nope, hopefully someone else will step up. Looks like it could just be your lightmapping settings.
     
  5. Myrmidou

    Myrmidou

    Joined:
    Jun 7, 2014
    Posts:
    30
    Okay problem solved.
    It was a lightmap compression issue. I just had to go to my lightmaps import settings and change Compression to None. Hope it doesn't take too much on my framerate.

    Anyway thanks :)
     
  6. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    210
    It won't Change the framerate, but it will consume way more storage space.
     
  7. sylon

    sylon

    Joined:
    Mar 5, 2017
    Posts:
    246
    You can manually compress them.
    I bake my lightmaps 'uncompressed' and then compress them in the import settings before a build.
    You can experiment to see what compression works best for you.
     
  8. hanisherif1997_unity

    hanisherif1997_unity

    Joined:
    Jun 25, 2021
    Posts:
    14
    how do u compress in the import settings before a build?
     
  9. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Select your lightmap textures (find its location from lighting window) then change the import settings (compression section)
    Note: after compressing the lightmap textures manually, your dirty will come back again!!! Especially on mobile platforms

    Also your lightmap has too much noise
    Increase direct samples from lightmapping settings to reduce noise for your spot light
     
    Last edited: Feb 15, 2022