Search Unity

Realtime GI: What about a true realtime solution?

Discussion in 'Global Illumination' started by Cascho01, Feb 25, 2019.

  1. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Until now we can use Enlighten to bake lightmaps for realtime GI.
    Although its results are very impressive Enlighten is unusable for me (doing archviz) because of crazy long baking times.

    Next option is the new GPU lightmapper.
    Although the results are becoming better (Bakery is still better today) it still takes some time to bake and
    it´s for static geometry and lights only - so it´s not true realtime.

    What I´m requesting for Unity is a true non precomputed realtime GI solution like SEGI / HXGI / Enscape.
    These products already deliver a very promising quality.

    My question is, how can small companies (like enscape or even an individual like @Lexie) produce such solutions while Unity is not even talking about it?
     
    Last edited: Feb 25, 2019
    konsic, Rich_A, vb2s360 and 2 others like this.
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Hey! Out of curiosity, what makes you prefer Baker over the GPU lightmapper? Keep in mind that GPU PLM is still in a preview stage, and we are busy with adding new features and making it faster as we speak.

    Regarding realtime GI solutions; we can't promise anything yet, but we might have something to reveal during the GDC :)
     
    konsic, newguy123, Mauri and 8 others like this.
  3. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    153
    Hey Cascho01,

    dynamic real time GI is a rather complex topic. Because of the large computational work that is required to calculate GI in a scene, one has to cut corners, which usually involves the following:

    • Only one-bounce indirect diffuse
    • No/limited indirect occlusion
    • Accept a lot of bleeding
    • Large filters required to suppress GI aliasing
    • Limited update rate

    I'm simplifying quite drastically here, but to cut it short, modern dynamic GI methods use two steps to compute GI in every frame: Scatter direct light into the scene and "cache" the bounce somehow, then for each pixel gather the bounced light that was scattered. The cache can for instance be a bunch of extra point lights, a structure like small patches on the geometry or voxels in the scene (SEGI/HXGI do this). Each method comes with a severe problem to solve: Point lights cause aliasing (sometimes called "disco lights") and need large filters to combat the resulting artifacts, structures attached to geometries need precomputation and are not truly dynamic, and voxels either have high memory consumption or cause a lot of hard to control for bleeding.

    Voxelized GI for instance works great with games that are close to being voxelized themselves (style-wise), have very few thin objects and most of the geometry aligned along the axes of the voxel grid. However, what we want is to have a robust method that covers a lot of different use cases and works for most of our users.
     
    Slight0, konsic, Mauri and 3 others like this.
  4. Gladyon

    Gladyon

    Joined:
    Sep 10, 2015
    Posts:
    389
    What could be done, is to have a way to bake GI at runtime.
    I understand that it won't be as beautiful or as precise as baking in the editor, but it could be more beautiful and more precise than realtime GI.
    Some sort of runtime GI baking less precise than the heavy-duty editor baking.

    If it takes about 5-6 seconds, then it's perfectly acceptable for the players, and it would allow procedurally generated worlds to have GI.
    In fact, it could be configurable because some games may accept 5-6s and some others may accept 30-40s because it's only done once when mods are added/removed.
     
    vb2s360, PhilippG and Cascho01 like this.
  5. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    @kristijonas_unity
    Veeeeery interesting news!
    I experience much cleaner maps without any spots / splotches / artifacts in bakery for same rendertimes.
    And it allows to bake selected objects ("Group selector", which doesn´t work.... :confused:)

    Of course I keep comparing bakery vs native and I´m looking forward the progress.

    @thefranke
    Thanks very much for sharing these infos!
     
    Last edited: Feb 27, 2019
  6. PhilippG

    PhilippG

    Joined:
    Jan 7, 2014
    Posts:
    257
    :-O
     
  7. RockSPb

    RockSPb

    Joined:
    Feb 6, 2015
    Posts:
    112
    I think the most important thing is better GI quality, mach better area lights quality, and less seams on lightmaps in general. Also more interesting features like RNM or SH directional lightmaps, per vertex lightmaps, mixing different lightmaps mode in one scene etc)
     
  8. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Latest Unity 2019.2 versions feature Optix and Intel cross platform AI denoisers, which help get rid of the artifacts in the lightmaps. You can enable them by setting filtering preset to Advanced in the lightmapping settings.

    Baking selected objects is in the backlog, but currently, other tasks are taking the priority.
     
    Lars-Steenhoff likes this.
  9. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Great, thanks for sharing!
     
  10. VCDESIGN

    VCDESIGN

    Joined:
    Jul 18, 2017
    Posts:
    43
    VXGI? I hope that it's not raytraced GI, few computers has a RTX gpu.

    Enlighten has lot of problems, looks like it's unfinished

    - Point lights and Spotlights don't has realtime bouncing.
    - Light leaks from wall, making a area that was supposed to be dark being illuminated.
    - Don't has Realtime GI bounces from emissive surfaces.

    Enlighten is not a dynamic realtime GI, It's pre-computed :/
     
    Last edited: Mar 1, 2019
    hippocoder likes this.
  11. Adam-Bailey

    Adam-Bailey

    Joined:
    Feb 17, 2015
    Posts:
    232
    Huh? Spotlights very much do bounce using Enlighten Realtime GI, although it is only from lightmap static geometry.
     
  12. VCDESIGN

    VCDESIGN

    Joined:
    Jul 18, 2017
    Posts:
    43
    Yeah, if there is the need of being lightmap static, It's not dynamic realtime GI
     
  13. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    You tease!!! (but come on , tell us some more ;) )
     
  14. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Tomorrow you will know (probably)
     
  15. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723


    @thefranke
    So if console developers have frame times like this, could we have this in HDRP for PS4 / non RTX gpus in Unity - if not what would be the main issue preventing it? Thanks for any thoughts.

    I like how it removes the requirement to have AO as well, so there's cost savings there.
     
    ftejada, Mauri, konsic and 1 other person like this.
  16. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
  17. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I want the proven one with sick millisecs, not unproven ones :p
     
  18. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347