Search Unity

Question Lightmapping Artifacts no matter the treatment

Discussion in 'Global Illumination' started by soleron, Jan 13, 2021.

  1. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    584
    I have done hundreds of assets and possibly thousands of bakings so far.
    Never faced such an issue.

    upload_2021-1-13_14-12-31.png

    No matter the Lightmap UVs, done in my 3d software or letting Unity do it, no matter how much gap between the UV isles, no matter how high the settings, (in fact the higher the settings the worse it is) I get such horrible artifacts.

    I ran out of troubleshooting methods. Any ideas what could be happening?
    I have even broken everything apart etc. etc. no difference whatsoever.

    (Initially the entire room walls were based on a single mesh. I will remodel the walls, no biggie, but it is more like a challenge to find out what happened and fix it, perhaps it will help someone avoid the mistake I may have done.)
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,797
    You say “no matter how high” but what’s the highest number of samples you tried?

    Also high bounce count isn’t helping.
     
  3. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    584
    Let me put it this way.
    I have done far more complex rooms, and entire city blocks, with a lot less than the 70 you see now.

    at 70 this is the resolution which is VERY high for such flat geometry.
    upload_2021-1-13_15-14-54.png


    The bounces are actually extremely helpful.
    It is far worse with less bounces.

    This is with less bounces. (5)

    upload_2021-1-13_15-15-35.png

    This is with 30 bounces
    The more bounces the better (as it should be) but never correct.

    upload_2021-1-13_15-50-33.png
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,797
    I asked about the number of samples (direct / indirect / environment), why are you showing me how high you went in resolution?

    More bounces introduce more noise.

    It would be maybe helpful if you disabled filtering so we can tell what we're looking at.
     
  5. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    584
    You didn't specify which samples you meant.
    I have gone up to 768 which is an overkill.
    As I said, I have done far more complex spaces with less.


    More bounces do not introduce more noise.
    Quite the opposite as it is obvious by the above image and as is expected in offline rendering too and as stated by the feature introduction video by Unity.

    I feel what we see here is a classic GI problem of the past.
    Spaces that were lit from exterior sources, used a lot of the light calculation on the exterior of the object where they were not needed, and less GI samples used inside.

    This was later resolved by an object usualy called "portal" or "skyportal" that helped the GI solver push more photons to the interior than outside. These are usually placed on windows and other large opennings.
     
    Last edited: Jan 13, 2021
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,797
    768 is definitely not overkill.

    This is one of my scenes.

    Screenshot 2021-01-13 at 4.18.36 PM.png

    If you want the artifacts to go, you need a lot more samples.

    Bounces introduce noise, but since you have the filterting set to Auto, you're actually playing a game called "hmm maybe this set of settings will arbitrarily result in the filtering doing a better job somehow".

    The portal methods don't apply to the progressive lightmapper, it's more appropriate to photon mapping style methods, which the progressive lightmapper doesn't use.
     
  7. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    584
    Bounces introduce noise only when they are few (the bounces), and the noise reduction has less to work with. That also results in darker splotches in the corners (like in my case) and high-contrast GI. This is why many of us who come from Offline rendering asked for more bounces and thankfully Unity delivered very fast.

    Increasing the bounces increases the accuracy of the GI solution and reduces the noise giving a much nicer smoother GI result.


    I gave your suggestion a try.
    While it did produce smoother GI it only resulted to a smoother version of the artifacts.

    In any case, thank you very much for your suggestions and precious time.
    The issue is not the samples or the resolution.
    I will keep troubleshoothing just for the heck of it as this is for me an extremely rare case and has ignited my curiosity.

    768/768/768 samples gives almost same result as previously (128/256/512)
    upload_2021-1-13_16-46-29.png


    1024/2048/4096 only resulted in smoother errors.
    upload_2021-1-13_16-59-34.png

    4096/4096/4096
    upload_2021-1-13_17-51-49.png


    8K/8K/8K
    upload_2021-1-13_18-56-29.png
     
  8. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874