Search Unity

Why does lightmap baking system is so upsetting? Ugly results.

Discussion in 'Global Illumination' started by pagan_poetry, Sep 15, 2018.

  1. pagan_poetry

    pagan_poetry

    Joined:
    Feb 15, 2017
    Posts:
    107
    Don't blame me please because it's not the first day i'm trying to bake desirable lightmaps in my low-poly 3d game and i'm getting desperate with it. Is it me or why Unity3d can't bake normal-quality lightmaps without being ugly as hell?

    My target: to bake lightmaps for mobile game level.
    My result:
    1. First variant I get baked and compressed lightmaps with ugly artefacts and noise because of compression. And i can't find the option of how much shold Unity compress it.
    2. Second one is uncompressed lightmaps. They look great but it's 150-200mb of weight which is too much for simple low-poly scene.

    Is it me or what? Is this situation common for Unity Engine? I'm getting really upset... Is there any straight tutorial for baking simple but pretty (not ugly)?
    There is a lot of nuances in Unity that probably blocking my way to a good lightmaps so I think the time has come to ask for help there.
     
  2. Findus

    Findus

    Joined:
    Jun 23, 2012
    Posts:
    111
    How big are your lightmaps? How sharp do your shadows and details need to be? First thing I'd do is to make the lightmaps as big as necessary, but not bigger. Adjust the lightmap size of objects according to how big they'll be visible etc.

    Perhaps post example images, so people can take a look at the artefacts you are seeing.
     
  3. pagan_poetry

    pagan_poetry

    Joined:
    Feb 15, 2017
    Posts:
    107
    This is what i have as an example. The problem is seen on the walls. Seeking for the way to reduce (smooth, blur etc) this ugly "waves" of pixelated cubic lightmaps.
    My upper level of the lightmap resolution is 2048 but it really doesn't reduce the problem.
     

    Attached Files:

  4. bart_the_13th

    bart_the_13th

    Joined:
    Jan 16, 2012
    Posts:
    498
    try to disable compression on the lightmap by setting compression to none
     
  5. pagan_poetry

    pagan_poetry

    Joined:
    Feb 15, 2017
    Posts:
    107
    Yes it works, but as i mentioned before it makes the final size of lightmaps too big.
     
  6. bart_the_13th

    bart_the_13th

    Joined:
    Jan 16, 2012
    Posts:
    498
    if that the case, maybe you could also try to reduce lightmap resolution with a trade of less sharp lightmap
     
  7. pagan_poetry

    pagan_poetry

    Joined:
    Feb 15, 2017
    Posts:
    107
    Thanks, i would try.
    But anyways, is it normal how baking looks on my screenshot for compressed lightmaps? Because i think "compression" is the feature that most people use.
     
  8. fguinier

    fguinier

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    146
    Once you have bake your lightmaps you can go to the folder of the scene and override the compression scheme used. Might be working better than the default setting for your scene:
    https://i.imgur.com/zCFmKuR.png
     
    Danielpunct likes this.
  9. hanisherif1997_unity

    hanisherif1997_unity

    Joined:
    Jun 25, 2021
    Posts:
    14
    could you elaborate the process. having a hard time figuring out what u said
     
  10. cogito09

    cogito09

    Joined:
    Aug 30, 2017
    Posts:
    4
    upload_2022-4-12_17-8-29.png
     
    blueivy likes this.
  11. Unlogical-Game-Studios

    Unlogical-Game-Studios

    Joined:
    Jan 7, 2016
    Posts:
    12
    i also get this ugly artifacts, no matter if I use Lightmap Compression or not
     
  12. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,735
    What artifacts? Start a new thread and post images.
     
  13. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    Try enabling HDR on the camera.
     
  14. Unlogical-Game-Studios

    Unlogical-Game-Studios

    Joined:
    Jan 7, 2016
    Posts:
    12
    Ok, i had some OV Overlapping in the scene. So I think, this could be the reason for the artifacts. I need some days for the bake process(slow computer), if this is not the reason, I will create my own thread and will post here a link to it.