Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Light Probe issues in LWRP 2019.2

Discussion in 'Global Illumination' started by berridge, Nov 11, 2019.

  1. berridge

    berridge

    Joined:
    Dec 17, 2018
    Posts:
    9
    Unity version: 2019.2.10f1 using LWRP.

    I'm having issues with light probes and i'm looking for a few pointers to make sure this isn't a bug or error on my part.

    This is a closed room with a single Area Baked light inside of it.
    Lightmaps bake correctly, any object marked static and Contribute GI look fine within the scene.
    However after rigging up light probes and having the objects gather their lighting data from the probes, they are significantly darker. Specifically in lower lighting. The spheres are darker than the baked shadow portion of the room when using probes.

    For comparison, baked with all Unity default Spheres marked as static:
    a.jpg
    Using the light probes.
    b.jpg

    I've tried a massive variation of light probe positions, watched countless tutorials to sanity check and read the unity literature on them. Still i run into this issue. Is there any known issue currently with Light Probes / Area lights / LWRP?


    For testing purposes, here are two of the many Light Probe set ups i've been messing with. One, a minimal rig that creates new volumes where light is dramatically transitioning from light to shadow, and fills the bounds of the room.

    la.jpg

    And as a test, a grid of volumes at short increments. (yielded brighter results). lb.jpg

    Any help with this would be appreciated.
    Surely the difference between baked results and light probes shouldn't be this big?
     
  2. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    90
    Hey berridge,

    one question upfront: Which backend did you use for baking? CPU or GPU?
     
  3. berridge

    berridge

    Joined:
    Dec 17, 2018
    Posts:
    9
    Thanks for having a look, thefranke.
    I'm using the Progressive GPU, however results are almost identical on both progressive CPU and GPU.
    Enlighten has a slightly brighter hot spot, but the spheres are still darker than their baked surroundings in shadow.

    Bakes from each option and their settings;
    GPU: GPU.jpg
    CPU: CPU.jpg
    ENLIGHTEN: enlighten.jpg

    I'd imagine people could be curious about the ambient colour being full black in this set up.
    The results are the same regardless of the environmental lighting options. Darker than surrounding baked shadows. Darker than they would be if baked as static.

    Example: ambient colour.jpg

    If i can provide any more info to pick this apart, let me know.
     
  4. berridge

    berridge

    Joined:
    Dec 17, 2018
    Posts:
    9
    Ah, it seems to be related to whether the project is using Gamma or Linear colour space.

    In a standard 3D template, 2019.2.10f1 - WebGL target platform:
    Linear colour space - light probes give accurate results.
    Gamma - light probes give accurate results.

    In a LWRP template, 2019.2.10f1 - WebGL target platform:
    (testing both WebGL 1.0 and 2.0 graphic API's)
    Linear - light probes give accurate results.
    Gamma - light probes give darker results.

    Is this expected behaviour? Do lightprobes in LWRP fail to give accurate results in Gamma colour space for some reason?

    Last time i checked, Linear colour space is unsupported in OpenGLES2 (WebGL 1.0).
    Some major browsers, ie; Safari and Edge only have partial support for WebGL 2.0. Testing Linear colour space and the OpenGLES3 API gave errors in these browsers and failed to load the content. So this project is restricted to WebGL 1.0 and Gamma colour space.

    Looks like LWRP is a no-go for WebGL 1.0 or Gamma colour space currently?

    Seems i'm not alone :
    https://forum.unity.com/threads/lwr...rrect-vs-old-standard-render-pipeline.775298/
     
    Last edited: Nov 12, 2019
  5. berridge

    berridge

    Joined:
    Dec 17, 2018
    Posts:
    9
    After a bit more testing, this appears to happen with all light sources. It's not specific to just area lights.
    It also happens in 2019.1. Not just specific to 2019.2

    linear.jpg
    gamma.jpg
     
    Last edited: Nov 12, 2019
    hippocoder likes this.
  6. PieterAlbers

    PieterAlbers

    Joined:
    Dec 2, 2014
    Posts:
    138
    I just tested the latest beta (2019.3.0b10) and it is not working either (with my sample scene)
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,118
    2019.3 has an alternative sampling algorithm you can use if you enable it in the editor (I think?) settings, although I think it mostly changes the amount of samples taken so probably shouldn't affect the above test scenes, but it's worth a try.
     
  8. PieterAlbers

    PieterAlbers

    Joined:
    Dec 2, 2014
    Posts:
    138
    I pretty much tried and toggled everything but I am clearly either missing something or running into a bug.

    I can't believe we're the only ones experiencing this. Are we the only ones doing lwrp light baking for low end devices - targeting opengl es 2?
     
    berridge likes this.
  9. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    90
    Hey berridge,

    some more question: Which mode do you use for baking, Indirect or Shadowmask? The spheres in the Gamma picture appear slightly brighter than those in the original picture in your first post. In the first probe picture you posted, the spheres in the shadowed portion on the left seem to gather no indirect light at all. Can you perhaps create a screenshot like the Gamma view with all sphere's lightmapped?

    Cheers
     
  10. berridge

    berridge

    Joined:
    Dec 17, 2018
    Posts:
    9
    Hi thefranke, thanks for taking another look at this.
    I'm pretty sure all previous tests were done with Subtractive Baked GI.

    Here are some more accurate images testing all combinations in your questions. I'll have to split the post into two to get around the file upload limit.

    Firstly the setup:
    16 Unity primitive spheres, equidistant, inside a room made of Unity primitive cubes.
    Area light is used in these images, but other testing shows all light types produce similar results.
    The Light probe component is a grid of equidistant probes. As shown here:
    lightprobesSetup.jpg

    Lightmapper properties and lighting values are consistent across every bake test, and shown in the images below.
    All lighting results below are in Gamma colour space.

    Subtractive - Progressive CPU - Baked spheres
    Sub-CPU-Baked.jpg
    Subtractive - Progressive CPU - Light probe spheres
    Sub-CPU-Lightprobe.jpg
    Subtractive - Progressive GPU - Baked spheres
    Sub-GPU-Bake.jpg
    Substractive - Progressive GPU - Light probe spheres
    Sub-GPU-Lightprobe.jpg
     
    PieterAlbers and thefranke like this.
  11. berridge

    berridge

    Joined:
    Dec 17, 2018
    Posts:
    9
    Baked Indirect - Progressive CPU - Baked spheres
    Indirect-CPU-Baked.jpg
    Baked Indirect - Progressive CPU - Light probe spheres
    Indirect-CPU-Lightprobes.jpg
    Baked Indirect - Progressive GPU - Baked spheres
    Indirect-GPU-Baked.jpg
    Baked Indirect - Progressive GPU - Light probe spheres
    Indirect-GPU-Lightprobe.jpg
     
    PieterAlbers and thefranke like this.
  12. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    875
    berridge, which was the fastest for you:
    1. Baked Indirect - Progressive CPU - Baked spheres
    2. Baked Indirect - Progressive CPU - Light probe spheres
    3. Subtractive - Progressive CPU - Baked spheres
    4. Subtractive - Progressive CPU - Light probe spheres
     
  13. berridge

    berridge

    Joined:
    Dec 17, 2018
    Posts:
    9
    To bake? They were all Sub 20 second bakes for this scene.
    Just quickly timing it now, there is no discernible difference between Baked Indirect or Subtractive in this scene. But it is a simple scene, so i'm not sure if this indicates much.
     
    konsic likes this.
  14. PieterAlbers

    PieterAlbers

    Joined:
    Dec 2, 2014
    Posts:
    138
    @thefranke Sorry for the bump and mention, but is there any news on this? We have been running into similar issues.