Search Unity

[SOLVED] Light probe results are too dark

Discussion in 'Global Illumination' started by blueJgrrl, Sep 10, 2018.

  1. blueJgrrl

    blueJgrrl

    Joined:
    Oct 3, 2012
    Posts:
    19
    I have a scene using precomputed realtime GI. Anything that uses light probes in this scene is way too dark. The following image is a comparison of a door lit with static light, versus light probes:

    lightprobeproblem.jpg

    Light probes are visible in the shot, and they appear to capture the correct light values (though some have weird artifacts in them, such as the probe immediately below the ceiling light). As you can see, though, the dynamically-lit version is much too dark. This problem persists regardless of what object is being lit, whether the object is set to blend probes or use a proxy volume, and regardless of how I configure a proxy volume. It appears to be scene-wide with any object lit using probes.

    I have tried clearing the GI cache and rebaking. I also rebaked after importing the project into the latest Unity version. Neither of these have helped. Any idea what the problem is?
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    Double click the door and see from which probes it picks up light from. Are there any probes from the other side of the door?
     
  3. blueJgrrl

    blueJgrrl

    Joined:
    Oct 3, 2012
    Posts:
    19
    Again, as stated, the problem persists regardless of whether I'm blending probes or using a proxy volume. It also happens with every mesh in the scene, regardless of location. Thanks.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    So if you place a default cube in the middle of that room, it's that dark as well?
     
  5. blueJgrrl

    blueJgrrl

    Joined:
    Oct 3, 2012
    Posts:
    19
    Yep. And it turns out, as an object gets closer to a static emissive light source, it actually gets too bright, with extreme contrast, and then goes black. Here are some images illustrating the lighting response to probes, first with a cube set to blend probes, and then a stretched cube with a grid of probes via a proxy volume:

    probeproblem2.jpg

    It definitely seems to be something going weird with how the engine is applying probe lights. Especially since the probes themselves appear to show accurate light capture. For more context: I'm running the Mac version of the editor, using Metal. This problem is happening on the latest version of Unity, and was also present when I had the project running in version 2018.1.0f2.
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    The first three images with the cube look reasonable to me, no?

    The reason it gets dark when you go that high up, is because the center of the cube gets outside the lightprobe volume. In order for the probes to work correctly, the meshes should be inside the probe volume. (if you notice, unity shows you which probes it's using (the yellow lines))

    Same with the proxy volume, the top vertices and the bottom vertices, are outside the probe volume, so they default to the scene probe, which is too dark. Place a few probes closer to the ceiling, and place a few probes on the other side of the door, if you want to the door to pick up better lighting.

    The weird "ringing" artifact that some of the probes show that are close to the light, is a limitation of the light probe method and right now there is not much you can do. They will introduce a way to reduce it in 2018.3.
     
  7. blueJgrrl

    blueJgrrl

    Joined:
    Oct 3, 2012
    Posts:
    19
    Unfortunately, this is not accurate. If what's happening in my scene is a result of that artifact, and that's inherent to their probe system, then probes are flat-out broken right now. Compare these two cubes side-by-side, the first dynamically lit, and the second static lit:

    Screen Shot 2018-09-09 at 8.32.08 PM.jpg

    (Note that the albedo of the wall is darker than the default material on the cubes.)

    I doubled out my light probe coverage, just to make sure my bases were covered. It's still all wrong.

    There is a small range where the probe results *appear* to be correct, because that's in the middle sweet spot where the wonky contrast of the probe output coincidentally lines up with expected results. But the light falloff is completely wrong on both ends of that tiny little sweet spot.

    If a Unity dev could confirm that this is just how light probes work right now, that would help. If that's the case, they're just straight-up broken. I don't think that's likely, because, again, the probes themselves appear to show accurate light capture.
     
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    Is the first cube lit with blend? If it's with blend, then the probe it gets lit from is the interpolated probe that is somewhere outside the room (since it's calculated at the center of the mesh), so it makes sense that it doesn't get as much light as it should.

    If it's by proxy volume, the top and bottom vertices still look like they're outside the lightprobes to me.
     
  9. blueJgrrl

    blueJgrrl

    Joined:
    Oct 3, 2012
    Posts:
    19
    I looked into this a little further and I think this is separate from the ringing issue. I get the same problem with emitter intensities set to 1 instead of within the HDR range. While the ringing problem from their spherical harmonic implementation is contributing, I don't think it's the only thing going on here. The light falloff is still wonky even when I drop everything to low dynamic range.
     
  10. blueJgrrl

    blueJgrrl

    Joined:
    Oct 3, 2012
    Posts:
    19
    No, they are not. As stated, I extended my light probe coverage beyond the room just to cover my bases. There's something else going on. Thank you so much for your input, by the way, this is helping me nail down the problem.
     
  11. blueJgrrl

    blueJgrrl

    Joined:
    Oct 3, 2012
    Posts:
    19
    I was able to use your tips with probe placement to at least make the problem less severe, thank you very much for that. Dynamic objects are still lighting improperly, but it's less severe now. I even tried dropping all lights to a max intensity of 1 and turning off HDR post-process, but the default white material is still appearing darker than the walls when objects are lit with probes. Dangit.
     
  12. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    The ringing is not the source for all your issues (as you figured out). It's only really noticeable in the probes that are very near the light sources.

    Another thing you can try to "cheat" a bit, is to do an anchor override and place it to somewhere a bit closer to the center of the room (like, make a child gameobject, and move that a little away from the wall). I don't know what your use case is exactly, it may not work for you, but it's another tool you can use.
     
  13. blueJgrrl

    blueJgrrl

    Joined:
    Oct 3, 2012
    Posts:
    19
    Yeah I may have to do that for the time being, until I get this all figured out. Definitely not a good permanent solution but it'll make things presentable for now. Thanks again!
     
  14. blueJgrrl

    blueJgrrl

    Joined:
    Oct 3, 2012
    Posts:
    19
    AHA! I FIGURED IT OUT! It wasn't even the probes.

    Screen Shot 2018-09-09 at 9.41.33 PM.jpg

    I made my static emitters larger and boom, lighting evened out. (Emitters are on a hidden layer so they haven't been visible in my screenshots.) Their size was matched to the ceiling light model before, but I had to make 'em nice and big, and then drop the emission intensity. I guess the resolution for light probe capture isn't high enough to catch smaller emitters. I have to tweak my probe placement a bit more, but the root cause has been determined.

    Thanks again for helping me troubleshoot this!
     
    thefranke, Findus and AcidArrow like this.
  15. galdor2000

    galdor2000

    Joined:
    Apr 16, 2016
    Posts:
    1

    What do you mean by static emitters? Where did you change this? I'm having all my dynamic objects too dark too, even with probes.