Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Question Light artifacts on meshes

Discussion in 'Global Illumination' started by Hazard4U, Jul 19, 2023.

  1. Hazard4U

    Hazard4U

    Joined:
    Oct 15, 2021
    Posts:
    6
    Hello,

    I have unwanted light artifacts on my meshes as you can see on the first screenshot.

    scene-view.png

    Here are few screens for context:
    baked-lightmap.png uv-overlap.png texel-validity.png light-settings.png

    I tried changing a lot of parameters based on what I found on other threads but nothing worked except :
    - Increase the scale of individual lightmaps
    - Activate "Generate Lightmaps UVs".
    - Increase "Min Lightmap Resolution".

    I will add the screens in comments below

    But the result is still not perfect. Should I increase the scale again ? I feel like this is not the right solution.
     
  2. Hazard4U

    Hazard4U

    Joined:
    Oct 15, 2021
    Posts:
    6
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,977
    As long as they are not the same mesh the results will never be perfect, but I would also completely disable filtering and bump up the sample values until the results look clean (which may result in pretty long bakes).
     
  4. Hazard4U

    Hazard4U

    Joined:
    Oct 15, 2021
    Posts:
    6
    Hello,
    Thanks for your reply!
    Disabling filtering is worse as you can see, even if there is an artistic side :
    filtering-removed.png

    Ok for you it's something normal this kind of artifact for a simple mesh like a flat wall.
    I'll try to make a single mesh and remove unnecessary edges.
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,977
    That looks like you need a lot more samples as I said in the previous message.
     
  6. Hazard4U

    Hazard4U

    Joined:
    Oct 15, 2021
    Posts:
    6
    I've tried 60,000 samples, but without filtering, it's still not very good. samples-bumped-result.png samples-bumped-light-settings.png

    I added filtering and it's still not good, but it's better:
    samples-bumped-filtered-light-settings.png

    But I got a new behavior when I am far from the object, which becomes brighter:
    bright-door.png close.png
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,977
    The seam seems less obvious though :)

    Do you have small emissive materials? With 60k indirect rays things should be fairly clean under normal circumstances (although going to a lot higher values than that is not uncommon).

    Don't bump direct samples that high, keep it to, say, 1024.

    Filtering loses informations and blurs the results.
     
  8. Hazard4U

    Hazard4U

    Joined:
    Oct 15, 2021
    Posts:
    6
    I removed emissive materials I had and bumped to 260k indirect samples
    samples-bumped-result-2.png samples-bumped-light-settings-2.png

    Here is the UV charts which was missing in my first post.
    uv-chart.png
     
  9. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,977
    If you move the light 20cm downwards, does the noise go away?
     
    Hazard4U likes this.
  10. Hazard4U

    Hazard4U

    Joined:
    Oct 15, 2021
    Posts:
    6
    Hello,

    Yes it goes away !! Thank you for taking the time to reply.
    Is it because the light makes artifacts as i passes through the mesh ?

    Here's the result, as you can see, I've added a new point light to compensate for the fact that the real light is downwards.
    scene-setup.png

    I still have some minor issues for meshes with borders, I'm trying to increase the "Max Bounces" setting and samples to solve it. I'll keep you in touch.
    samples-bumped-result-3.png
    samples-bumped-result-3-2.png
     
  11. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,977
    Either it intersects with the mesh (especially if you use soft shadows), or it's because it hits the mesh at a real close distance which causes high intensity indirect rays to flood the scenes which are generally a pain to resolve.