Search Unity

2021.3.2 Is Multiple importance sampling broken?

Discussion in 'Global Illumination' started by RevC2, May 11, 2022.

  1. RevC2

    RevC2

    Joined:
    May 2, 2021
    Posts:
    49
    Hi,
    I'm just testing 2021.3.2 to see how much the version is stable and I've noticed that doing a bake with "Multiple importance sampling" activated gives back odd results.

    Image 01 Bake without MIS activated, that's more or less what I expect from the bake
    2022-05-11 18_56_47-Window.png

    Image 02 Bake WITH MIS, informantion in lightmaps looks odd, with weird "brush stroke" look
    2022-05-11 18_58_20-Window.png


    Am I missing something or could someone else confirm this?
     

    Attached Files:

  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,796
  3. RevC2

    RevC2

    Joined:
    May 2, 2021
    Posts:
    49
    Hey AcidArrow,
    thanks for the reply. Yeah I know, the lack of samples and denoising it's just to show a "raw" lightmap, and what looks like to be MIS wrong results. I'm not really confused to why it's noisy beacuse of the low intentional settings ;)

    BTW the artifacts remains with more samples/denoise active

    This is with higher samples + denoising, still the weird artefacts are present. 2022-05-11 21_04_26-Window.png
     
    Last edited: May 11, 2022
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,796
    I guess you didn’t read the post I linked, I’ll quote the relevant part here

     
  5. RevC2

    RevC2

    Joined:
    May 2, 2021
    Posts:
    49
    Well, I did read it and it says nothing new as far as what MIS actually is. The point is that this weird result never occured before in dozens of other Unity versions/projects I've worked on so I'm trying to figure out why the usual "room + sun + simple procedural sky" gave me such bad lightmaps. If you take a look again at "Image02" you'll see an unusable lightmap, not because of the NOISE, but because of the strange gradients, "strokes" and splotches which never ever occurred on a simple setup like this. I did a quick test in 2020.3.33 with same geometry and same lighting setup (Sun + simple procedural sky) and the result it's correct and what to be expected: 2022-05-12 02_51_05-Window.png

    I'll try another couple of tests in the meanwhile, I'm curious to know I maybe my project has issues
     
  6. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    MIS works well with high contrast HDRIs. If the HDRI you are using has mostly homogeneous luminosity values, enabling MIS will result in artifacts and/or noise.

    We have a feature in the backlog which will enable MIS contextually behind the scene. For now, just disable MIS if it results in more artifacts.
     
  7. RevC2

    RevC2

    Joined:
    May 2, 2021
    Posts:
    49
    Ok, i guess. I'd still like to understand why it has worked fine with pbr skies for two years and hasn't in this example (again, same pbr sky I always used)

    Thanks anyway
     
  8. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    If you have clear evidence that the output using MIS has changed recently, while using identical lighting settings/conditions, then please let us know by reporting a bug. It could possibly be a regression