Search Unity

What's causing the "Blotchy" Lightmaps?

Discussion in 'Global Illumination' started by DanPowell, Feb 13, 2018.

  1. DanPowell

    DanPowell

    Joined:
    Jan 25, 2018
    Posts:
    4
    Version: Unity 2017.3.0f3

    Problem: Lightmaps are blotchy in every scene I create.

    What I've tried so far:
    • Increasing Lightmap resolution does not fix the issue.
    • Unchecking "Compress Lightmaps" does not fix the issue.
    • Increasing Indirect samples does not fix the issue.

    This has occurred in previous scenes as well, and even occurs in scenes which use the default settings when switching to the Progressive lightmapper. Need to stick with Progressive because Enlighten is slow, and does not give a bake-time approximation.


    Screenshots:




     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    So you're saying increasing indirect and direct samples does not change anything? Because that image looks like not enough indirect samples to me.
     
  3. DanPowell

    DanPowell

    Joined:
    Jan 25, 2018
    Posts:
    4

    Hello - thanks for the reply.


    I started with Direct samples at 16, and Indirect samples at 500. Bumping these up 32 and 1000, respectfully, didn't appear to make any noticeable difference to the blotchy shadowing.


    On the current settings (32 and 1000) the bake time is also significantly high (~13 hours.) Bumping these up higher will push that lighting build time through the roof I suspect.


    I'm going to try a lighting build again tonight with the settings at Direct set to 64 and Indirect set to 512. (1,000 samples seems too high anyway?)
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    Well, on some scene I use 100000 indirect samples, so I don't know about 1000 being too high.

    (although I generally use much lower resolution than you do)
     
  5. DanPowell

    DanPowell

    Joined:
    Jan 25, 2018
    Posts:
    4
    100,000 indirect samples seems crazy high given that the default value is 500(?)


    For my scene, increasing the samples to 512 Direct and 2048 Indirect pushes the bake time to over 24 hours.


    24+ hours just to get a decent lightmap bake is very slow, and doesn't seem practical in a production environment if you wanted to achieve realistic-standard lighting.


    The scene I'm baking is only two medium-scale rooms so building an entire level with baked lighting could take a week just to build the lighting. Given that Unity has no vanilla support for network-distributed baking this is just too slow.


    Increasing the sample count doesn't actually appear to be solving the underlying problem unfortunately; it's making the blotchiness finer, but it isn't removing it.
     
    Last edited: Feb 15, 2018
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    Default values are very arbitrary, so I'm not sure what you mean.

    To get faster bakes, greatly reduce resolution.

    To reduce noise, greatly increase indirect rays. 2048 is really not a lot.
     
  7. DanPowell

    DanPowell

    Joined:
    Jan 25, 2018
    Posts:
    4
    I'm going to run another bake with settings closer to your recommendation then compare the end results.
    • I've reduced the Lightmap Resolution to 8; previously 64.
    • I've increased the Direct Samples to 2048; previously 512.
    • I've increased the Indirect Samples to 16384, previously 2048.
    Time estimate is 8 hours.


    Finding it extremely difficult to find the right balance, especially given the lack of documented examples for the progressive lightmapper. "Trial and error" is very inefficient given how long the bake times are.


    Cheers.
     
  8. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    If you change the filtering to default it should be fine. You just need to blur the lightmap more.
     
  9. YouDesign

    YouDesign

    Joined:
    Jun 21, 2017
    Posts:
    55
    Set Intensity multimplayer in 0. It`s will remove this blotch and bake will be faster.
    For lighting scene use only spot, point or direction light.

    If you want have ambient light from skybox set direct samples to hight value (2000-3000) but be prepared for the baking hours.
     
  10. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Hey there! Could you please attach your scene/project so that I could take a look? Thanks.
     
  11. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    At first glance it does look like a filtering tweak needed in the PL settings.
     
  12. omarpr1032

    omarpr1032

    Joined:
    Mar 28, 2018
    Posts:
    1
    Hi have the same problem.

    I don't found how fix it
     

    Attached Files: