Search Unity

SEGI (Fully Dynamic Global Illumination)

Discussion in 'Assets and Asset Store' started by sonicether, Jun 10, 2016.

  1. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I would prefer Unity teams to do like Uniengine 2 or CryEngine and make some official good and performant solution.

    Anyway trying UniEngine 2 demo, it looks good indeed but not as performant as Svogi ( or perhaps the demo was too much draw calls or lighting settings was too high ).
    Getting 37 fps in a rooom demo, i am not sure this would translate well on some open world until you get some Gtx 1070 minimum.
     
    Last edited: Oct 31, 2017
    RB_lashman likes this.
  2. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    This one looks exciting! A screenspace solution would be much more likely to fit my usecase. Is anyone working on implementing this kind of approach in Unity?
     
    PhilippG and RB_lashman like this.
  3. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    155
    Just a little question for those who know around here, is there a way to ask segi to update only once the light calculation when needed? I'm not a coder, and so far I only managed to put update GI on and off, but I would like to be more precise when doing it as I know that the update is happening on multiple frames...

    Also, does one of the shader wizards here know a way to dispatch the calculation in more frames? Maybe 4 or 5, considering that there is a low chance that the sampled geometry will be moving at all (I mean, we can sample moving geometry, but it is still very much not recommended). Having some kind of setting that permit us to say through how many frames we want the GI to be updated would be great to adapt to the situation I think.

    Maybe even discarding updates for voxels that have been already sampled, and only sampling the new voxels entering the grid when the camera (or the anchor) is moving could also be a great alternative to sampling all the voxels every frames, and might give us some smoother frame rate.

    I'm simply sharing some things I was thinking about, don't hold yourself if you think that what I am saying is irrealistic to tell me so. Also I hope that there are still some people out there working on the asset now that it's been released on github. The burst of activity here was really heartwarming to see, and I really hope that it will happen again!
     
    Last edited: Nov 3, 2017
    RB_lashman likes this.
  4. Avol

    Avol

    Joined:
    May 27, 2016
    Posts:
    95
    Working on it as we speak, though can't promise a release date yet :)
     
    N00MKRAD, one_one, AndyNeoman and 5 others like this.
  5. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Cool! Let me know if you need a tester. My project is on Unity 5.6, deferred rendering path, perspective is RTS-like and lots of small objects are on screen.
     
    RB_lashman likes this.
  6. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Is there a dev blog or some way to track progress?
     
    RB_lashman, arnoob and blitzvb like this.
  7. Avol

    Avol

    Joined:
    May 27, 2016
    Posts:
    95
    Not yet, as soon as I have a good performing demo and need some testers, will create a forum thread.
     
  8. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I think I missed something. Wasn't SonicEther developing SEGI?
    Is it now on GitHub, developed by the community?
     
    RB_lashman likes this.
  9. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    it's on GitHub anyway
     
    RB_lashman likes this.
  10. dahuilang

    dahuilang

    Joined:
    Jun 5, 2014
    Posts:
    32
    hi , can you give me the preset of this sence , i am very interesting in it , but can not make the effect the same as yours, thank you very much
     
    RB_lashman likes this.
  11. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    It's not a preset that makes this scene look good, it's the lighting. I don't think there is a preset that was shipped for this scene, only Sponza.
     
    RB_lashman likes this.
  12. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    why we should use SEGI ?
    Using enlighten i have 150 fps and 41 fps with SEGI
    Enlighten is fully compatible with all unity lighting workflow
     
  13. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    Enlighten doesn't work with procedurally generated scenes at runtime, or otherwise altered scene geometry at runtime.
     
    N00MKRAD, P_Jong and RB_lashman like this.
  14. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    So only procedurally generated scenes must use SEGI
    But with very low fps
     
  15. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    I'm not going to argue about this. SEGI and Enlighten generally fulfill different use cases. Of course a fully dynamic GI solution is going to cost a lot more in performance, compared to baking lighting calculations for your scene beforehand.
     
  16. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    It depends on the system you use , Svogi is pretty good and fast for example and looking good enought.
     
    RB_lashman likes this.
  17. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    You have it exactly right. That is the trade-off. People should use the baked GI whenever possible because it is more efficient, but it is not always possible to use the baked GI.
     
    SirTwistedStorm and RB_lashman like this.
  18. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Enlighten don't needs long baking. It's needs a few minutes for calculate light GI. After that you can move point lights, spot lights or rotate sun lights
    and finally use light probes for dynamic objects.
    Current AO image effects will helps enlighten to simulate indirect shadows without performance cost for dynamic objects
     
    P_Jong and buttmatrix like this.
  19. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    You must be talking about small demos or archi Viz.
    To lightmap "Pamela" game with a good quality , they needed bunch of PC and and more than 10 hours to bake it, and the game it's lot smaller than a big open world.
    This is all the interest of real time GI systems like Svogi that does not require baking.
     
    nxrighthere, N00MKRAD and RB_lashman like this.
  20. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Small demos like archviz needs long bake time because needs too high resolutions

    Open world games can be baked in a few minutes with proper settings (like my video ~10 min or unity's lighting tutorial)

    Enlighten is a lot faster than other lightmappers when using GI Cache

    We can't kill 3x performance to avoid bake time for realtime games

    Enlighten already has been used in all Frostbite games + some others
     
  21. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    505
    When a player opens a door to a sealed room, light should flood in. Should a player opening a door wait 10 minutes while their CPU focuses on re-baking the scene?

    In my game, there is no geometry at all until players create some. So you see, it 'depends on the case'. Saying we can't kill performance to avoid bake time is missing the point. We sometimes have to, and we are always interested in latest realtime gi techniques that improve performance.
     
  22. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Since all the pro of GI are discussing here, have you seen this one?


    It seems to be a mixed between LPV and enlighten (but instead of having surface to surface there is node that gather the link) but don't quote me on this, I don't think I understand everything in this one, yet ...
     
    RB_lashman likes this.
  23. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
  24. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    DAMN IT ROFL how I missed that I don't know
     
    RB_lashman likes this.
  25. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I would like to see the global quality you can achieve with such settings and 10 minutes baking in a giant open world level that got lot of buildings and structures everywhere :rolleyes:

    Frosbite is a company they can have thousand of servers to calculate lightmaps during 48 hours, this is not a problem for such companies lol

    Anyway about performance you are right until the users likes to wait lot of hours the baking is finished.
    I prefer Svogi for bigger games as you got real time GI always available as you create your level without needing to wait hours for baking.
     
    N00MKRAD and RB_lashman like this.
  26. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    Why are we even having this argument ?

    Of course its slow, it's bleeding edge tech. (Although all things considered, it's impressively fast). Enlighten and SEGI are entirely different packages for very different use cases. If you can't see that, there's not really much point in continuing the conversation.

    Either way, from a purely artistic POV, "a few minutes" starts to add up. If I'm creating scenes that aren't designed as games, but rather just art (or insert anything other than "playable"), I want to iterate as quickly as possible. Enlighten's precomputation gets quicker once the geometry is set, but if you're rebuilding the geo - i.e constructing a scene - it starts over. Every day I make hundreds of changes to the geometry and lighting in my scenes, and that's where SEGI shines; it looks great, and those "few minutes" don't become "a few hours" by the end of the day.
     
    arnoob, nxrighthere, N00MKRAD and 2 others like this.
  27. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    It's not an argument. Enlighten is used in real, published games, SEGI is not - or at least, not to my knowledge.
     
    RB_lashman likes this.
  28. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    I n mirror's edge the whole city was baked in 7 hours with very low- preset (you don't needs any server, i checked it already, ver low preset is about 10-100x faster than high or medium without much quality difference )
    The main work should be done using post processing (bloom for lights and AO for indirect shadows). Most people thinks Bloom is a actual light or AO is indirect shadow
    So we just need to bake a simple Gi for the scene and fix quality using post effects

    My taste :
    Bake GI for building and large models
    Use light probes for small and movable objects + AO
    Use Light Probes+AO + Translucency for foliage
    24 h => 24 seconds


    Also ssr will help us to simulate some GI in a fake way!
    just play Mirror's Edge Catalyst without SSR or post effect and watch the result(GI quality is very low)
    photo_2017-11-05_23-52-12.jpg

    In Frostbite :
    Bloom used to hide Emissive material's GI quality problems:
    Webp.net-gifmaker (17).gif
    AO used to simulate indirect shadows (Like SEGI):
    Webp.net-gifmaker (16).gif
     
    Last edited: Nov 6, 2017
  29. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    ^it took me a long time to accept this, but it's true: visual quality in Unity is heavily drive by post-processing.

    I'm sure this can be said of game development in general, but it seems to be especially true for unity.
     
    RB_lashman likes this.
  30. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    50-70% in Unreal (near to 100%)
    Most people thinks that Auto Exposure is GI in Unreal
    I already made an interior scene lighting without GI. All people thinks that was baked. (I can't share the image because of the its copyright)

    GI is a small part of the lighting. The more important part is Indirect Shadows that we can simulate it using current AO solutions
     
  31. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    That's right, the auto-exposure in UE4 is really heavy-handed.
     
    RB_lashman likes this.
  32. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    210
    That's because SEGI is in development and not finished.
     
    RB_lashman likes this.
  33. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Without post effects: (fully realtime scene)

    Webp.net-gifmaker (21).gif
     
    buttmatrix likes this.
  34. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Enlighten GI (10 min very low) vs fully realtime:
    Webp.net-gifmaker (22).gif

    Enlighten Post on vs Post off
    Webp.net-gifmaker (22).gif
    SEGI on vs SEGI Off without post effects
    Webp.net-gifmaker (22).gif

    SEGI On vs SEGI off using post production
    Webp.net-gifmaker (23).gif

    Performance in SEGI is near to zero
     
    buttmatrix likes this.
  35. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    This can be a good work around, and a good compromise between baking times and quality.
    But you'll got longer baking time than 24s , as your game open world will have million of light probes to bake.

    It looks better without post effects, with Post on the shadows looks too black like not receiving GI ?
     
    Last edited: Nov 6, 2017
    RB_lashman likes this.
  36. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Auto exposure will fix the issue
     
  37. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    When using a GI system shadows always get brighter like in your pictures.

    The issue is mainly with the first picture , with 10 minutes baking at low quality it looks worst than full time.

    You should compare instead a scene with some builings and Segi Vs light probes + Enlighten for some static objects.
     
    RB_lashman likes this.
  38. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    SEGI has been in beta for a little over a year, hardly a fair comparison with the 6 years Enlighten's had since its first AAA use, and also totally irrelevant to any of my points. The argument is analogous to comparing a Volkswagen to a Tesla, where one side says the VW is the better car because it's cheaper; failing to realise of course that the new, groundbreaking tech in the Tesla is precisely what makes it more expensive.

    Post seems to be much more of a deal breaker in unity because it comes with none enabled out of the box. Unreal comes with a whole stack of things preconfigured. Bloom shouldn't be used like this to hide lighting artefacts - firstly it's complete abuse of the effect "bloom" is trying to replicate - but also it makes it look like you've taken a ball of kryptonite out into Stephen King's The Mist, casting a 10ft aura in every direction. A halo that size doesn't fit the rest of your environment.

    That last cave gif is also an unfair "example"; as we can see between that and the image before it, SEGI is contributing a great amount of GI which you're eradicating with, frankly, terrible tonemapping / colour grading in the final gif. Anything's going to look terrible if you slam the blackpoint like that.

    If you're using SEGI as intended, where only proxy geometry is being voxelised, and on hardware suitable for this tech, its totally feasible to get playable framerates, as I have regularly on a 980Ti. Of course, as always, depends on the project. But if that cave scene is getting near-zero framerate, its certainly not the fault of segi.
     
    RB_lashman and N00MKRAD like this.
  39. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    So SEGI is beta and Enlighten is out of the box. I'm not a beta tester and when i found any better option, i will switch to that one. Currently Enlighten is the best choice from my opinion. Enlighten GI can cast to longer distance compare to segi. This is the reason of the too brighter enlighten's lighting

    This is the reason that i made Lighting Box to reach the an out of the box prefiguration post processing settings in U E way. Today i tried to configure post stack 2 manually, but i couldn't reach to same quality level of the unreal. So this job needs long time experience. Epic has such experience in AAA game development. I'm trying to fill this hole in unity.

    Without post processing nothing looks good. For example SEGI quality without post processing is comparable with Enlighten only with post processing. Enlighten without post processing (color,contrast,loom,AO) is a jock.
    But SEGI looks good even without post processing (because has own post processing internally). This is one of the main reasons that people thinks Enlighten is not to much good.

    Or UE has better GI. I already compared Unreal Engine without any effect with lowest quality with Unity in lowest quality. The unreal engine's native render has higher contrast, and some color grading even without any effects applied:
    Webp.net-gifmaker (22).gif

    About GTX980ti
    Is about ~3~4x more powerful than ps4 and 1.5~2 x more than ps4 pro
     
    Abuthar and ftejada like this.
  40. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    UNreal as better "contact" for shadow in that image
     
    RB_lashman likes this.
  41. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    I think you can absolutely rival Unreal's post quality in Unity - I personally find Post Stack V2 a lot more flexible and user friendly than Unreal's post. (I will also point out here that I frequently use both engines). I think people tend to find it looks bad because, honestly, they're just bad at setting up post. I realise that's perhaps an unpopular opinion, but whilst people might be aware of what makes a good model, texture etc, they aren't as well versed in post (especially given how new an out-of-the-box solution is in Unity), so they configure poor settings. It's often forgotten that the quality of content (both assets and post settings) plays as big a part in the quality of an image as the technical "grafix" running behind the scenes. Just because you've enabled SSR, Bloom, Tonemapping, etc in both Unity and Unreal doesn't mean they're correctly configured, technically or artistically. But I don't think a discussion about Post really belongs in the SEGI thread.

    Yeah - exactly my point over the last two posts though - current gen consoles aren't really the target platform for realtime GI in a photorealistic setting. (I say photorealistic as the Tomorrow Children did realtime GI on console). It's unreasonable to expect a package to do what currently needs to be precomputed in "a matter of minutes", in under a few milliseconds - especially on console.
     
  42. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    I just want to tell that Unreal render is not DX or GL native rendering. And we need Color grading to compare unity with default render of the unreal
     
  43. Giuseppe

    Giuseppe

    Joined:
    Dec 4, 2011
    Posts:
    26
    lol.
     
    RB_lashman and tweedie like this.
  44. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    I don't think the problem is technical, but in this image comparison I don't know if the the lighting is different due to technical disparity or the person replicating the lighting don't understand what contribute to the final image effect. Which is the main problem in these discussion in general, GI is just a way to achieve a visual goal, assuming you understand what visual goal to achieve and how elements interact together.

    In that image unity lack the transition from floor to wall that gave the unreal version a fuller look, that transition can be achieve by a variety of technique, as simple as adding a baked vertex AO to achieve the same effect, who know what's happening really?

    And that's kind of the crux of these discussion, unreal has generally better artist TOO, and they drive the technique not the other way around.
     
    RB_lashman and tweedie like this.
  45. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    Exactly this.

    And exactly that. Uncharted 4 looks great not just because there's some great tech behind it, but because there was a whole team of artists that understood how to use those tools. Unreal demos tend to look better than people's attempts in Unity simply because the quality of artistic content in them is significantly better.
     
  46. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    No need another useless Unity Vs UE4 , if you are so much amazed by Unreal graphics, simly use it.

    The thread is about Segi and not about Enlighten or Unreal 4 :rolleyes:
     
    Zuntatos, Abuthar, RB_lashman and 4 others like this.
  47. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Good god, then just use Enlighten and stop filling the thread with nonsense!

    As it was said earlier, then entire point of SEGI is that it's REALTIME instead of baked. Baked anything is always going to be superior to realtime anything at the cost of needing to spend time baking. It's true of lighting, navmeshes, and even cake. Have you ever tried to eat a realtime cake? It's just hot batter, dude! IT'S JUST HOT BATTER.

    Annnnnyway, if all of your levels are static geometry then yeah, pre-bake as much data as you can. If your levels are all/mostly dynamic, then you simply can't use Enlighten because there is nothing to bake, and that's really where SEGI is supposed to be used.
     
  48. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    I just sent a few comparisons from the bake time and the final quality
    Bake one time, and save people's GPU load in all the time. OK? (if you are a real game developer and not beta tester)
    I don't think it's a problem

    Understanding the reality is very difficult

    The problem is from Fan boys side.
     
  49. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    But you are the one fanboying when people have clearly spell out their use case don't match your solution (like dynamics world or actual artistic workflow). :(

    Silver bullet is the root of all evil! :eek:
     
  50. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    I'm just a fan boy for comparison and not Enlighten or SEGI
    Just Comparisons

    But when a tool lost in a comparison, its fanboys start attaching the comparison

    I ALREADY WROTE THAT segi IS GOOD for procedural and fully dynamic worlds. But in performance ...
    155 fps => 41 fps
    10 min => realtime