Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

SEGI (Fully Dynamic Global Illumination)

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

  1. RockSPb

    RockSPb

    Joined:
    Feb 6, 2015
    Posts:
    111
    Oh man! GI is realy hard thing so you should't say such things!)
    May be you need to take a step back and start you work on point when core visual is corret?
    I think it difficult to fix such complex systems when you don't know what went wrong.
     
    neoshaman likes this.
  2. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    21
    Hey @Ninlilizi ! Cheers from Rio! And a big, fat thank you for all the effort on building this asset!
    I'm having a little trouble on a big environment. My game is a procedural dungeon-crawler on office buildings, and as you can see from the screenshot attached, the distant geometry is kinda glitchy. I messed with all the settings, and all the free and open source fog assets available to try to cover it, but seems like GI is drawn on top of everything, so there's no way my fog covers these parts (and yes, it is set to maximum like 30, and camera clipping on 60 for testing).
    Is there a workaround? Re-order the render or something?
    Oh and I'm using you latest branch on Github.
    Cheers, and thanks!
     

    Attached Files:

  3. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    276
    If you find line 51 of SEGI_NKLI.cs it will look like

      [PostProcess(typeof(SEGIRenderer), PostProcessEvent.AfterStack, "NKLI/SEGI")]


    Change the 'AfterStack' to something something else.... just delete that bit and start typing 'before' .... Intellisense will give some options.... Pick something that sounds super early in there... I forget what the options are..... But that'll let you layer fog effects over the top.
     
    ivanmotta likes this.
  4. jefferytitan

    jefferytitan

    Joined:
    Jul 19, 2012
    Posts:
    87
    I wonder what the best default option for an effect like this would be? My gut feeling is somewhat early, because it occurs in worldspace, which should happen before all the 2D effects like bloom etc. What kind of things should happen before GI?
     
  5. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    276
    That was how I originally had it.... But a bunch of pages of this thread ago there were requests to push it to later in the pipeline so I obliged.
     
  6. jefferytitan

    jefferytitan

    Joined:
    Jul 19, 2012
    Posts:
    87
    Hmm, I'd be curious to know their reasoning and if they still feel it applies. For example with volumetric light included there may be less reasons now?
     
  7. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    276
    I think I'm going to change it back when I get a moment...

    Also, volumetric light?
    Are you confusing SEGI with Nigiri?
     
  8. jefferytitan

    jefferytitan

    Joined:
    Jul 19, 2012
    Posts:
    87
    Oh goodness, I already forgot you were working on both!
     
  9. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    193
    where can we get this asset for testing?
     
  10. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    1,698
    If you mean the new improved SEGI version, see https://github.com/ninlilizi/SEGI .
    Should you mean Ninlilizi's new GI approach (as shown in #2431) instead: it's not yet available.
     
    Alverik and soleron like this.
  11. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,054
    I'm a little confused. SEGI is now broken and this thread has turned into someone else's GI solution?

    I downloaded SEGI. My scene view is corrupted and upside down and the sample scenes look nothing like the screenshots.
     
  12. PROE_

    PROE_

    Joined:
    Feb 20, 2016
    Posts:
    18
    Ninlilizi was working on improving it but nothing new has been made in about 2 weeks so I guess she's working on her own GI solution. SEGI has some problems from what I understand.

    If you want SEGI from screenshots checkout it's original repository @ https://github.com/sonicether/SEGI
     
  13. jefferytitan

    jefferytitan

    Joined:
    Jul 19, 2012
    Posts:
    87
    SEGI was originally by SonicEther, but he has basically abandoned all Unity development from what I understand. Ninlilizi has kindly decided to continue development, however as is natural with a new developer taking over a project and doing a lot of new development, things can break. I believe she has marked some as release builds, so they may be more stable.

    Separately she has decided to build her own GI solution currently called Nigiri because of shortcomings in SEGI which she feels aren't fixable. She hasn't started a new forum thread yet on that, but she plans to. Possibly she's focusing more on that than SEGI right now.
     
    Gekigengar and Alverik like this.
  14. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,054
    Thanks folks. Looks like it's just broke for VR as I've tried multiple versions. Good luck @Ninlilizi !
     
    Gekigengar likes this.
  15. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    193
    Yeah looks like it does not work for VR at this point. Sadly. And does not support SRP either. Pity. BUT for those not interested in using the latest Unity it is still an amazng tool to improve your visuals in ways not yet possible in SRP and new versions of Unity.
     
    Last edited: Dec 14, 2018
  16. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    362
    Nin, any progress update? :D
     
  17. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,990
    holidays, expect progress after the solstice break
     
    jejacks0n likes this.
  18. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    21
    Hey @Ninlilizi any news on the development? I wanted to know if this is still gonna happen, I want to publish my game but would love some extra performance... Just some bug crushing would be lovely.
    BTW, anybody got it working well with 2018.3? I have some strange behaviour: if it is enabled on Post Processing, I get all sort of errors and pink shaders. If I disable it, they go away and it works! But disabled?!?!
     
  19. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    276
    Still alive... Having some general life issues.

    The short list...
    * Everything is broken on 2018.3 onwards, I plan to fix this.
    * SEGI for a while has produced some seriously sub-par results versus SE's code. During my absence I have become upto speed enough to fix this and make it render correctly. So I plan to fix this also.
    * Regarding VR, every new major editor release finds new and interesting way to break anything that intersects VR and shaders. Joy is me.
    * Regarding SEGI, don't expect anything breaking in terms of additional performance. But I do intend to fix the bugs that make my existing innovations problematic.
    * SRP support, I don't plan to make any further effort here till after the SRP's leave their preview state.

    * With Nigiri ... Being quiet here.... But I want to avoid putting myself in a position where I'm obligated to officially support it till after I've got my life together again and can reliably commit to being able to do so.
     
    Gekigengar, Vytek, Alverik and 18 others like this.
  20. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    21
    Hey thank you for the answer! Hope everything gets better, life can be a little Katamari sometimes... I wish I could program shaders to help you, but my c# skills are way lower than required...
     
    RB_lashman likes this.
  21. cerrec

    cerrec

    Joined:
    Jan 19, 2017
    Posts:
    26
    Hi, Just want to let you know you've got another fan here! I love SEGI and anything you can do to improve it is most welcome.
     
    RB_lashman likes this.
  22. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,073
    Hello, I just want to say I have been using Segi for a while and i like it! I used Segi for my renders and videos and performance was alright, however my framerate on video wasn't that great, I have a older video card. I should sure like to see this project improve!

    You don't really notice the gi that well in outdoor scene but it improved the quality of the visuals.


     
    NeatWolf, konsic, Baldinoboy and 3 others like this.
  23. VCDESIGN

    VCDESIGN

    Joined:
    Jul 18, 2017
    Posts:
    43
    Hello, does SEGI works in 2018.3?
     
  24. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,073
    I don't think so not atm, the version I'm using from Github is for Unity 5.
     
  25. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    21
    I got some issues on setting up, but after a little messing with settings and scripts, yes it works! Also confirmed working on PC builds!
     
  26. VCDESIGN

    VCDESIGN

    Joined:
    Jul 18, 2017
    Posts:
    43
    Could you release the one you've fixed?
     
  27. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    21
    Well it was more about scene settings than scripting. Basically my project was ok with 2018.1, upgraded to 2018.3 and started getting HLSL merge errors and pink shaders, so disabled SEGI on post processing stack, and somehow it stayed on even if turned off. One issue I had turn around and forget was reflection probes: sometimes they work, and other just give some high value reflections that mess everything (mostly with standard shaders), so right now I'm only using SSR, way below ideal, but works.
     
    RB_lashman likes this.
  28. dojoman

    dojoman

    Joined:
    Jul 24, 2014
    Posts:
    274
    RB_lashman likes this.
  29. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    I've got a question for anyone out there : I just bought this amazing skin shader but it doesn't work properly with SEGI. Reflections work for some reason, but the GI does not, including light from emissive objects. Would anyone be able to point me into the right direction in making a shader compatible with SEGI? (documentation, examples, etc) I'm new to shader programming but am willing to learn how to do it myself as what the creator of the plugin is asking to make it compatible for me is... out of my budget.
     
    RB_lashman likes this.
  30. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,990
    Both are screenspace this will be hard or as easy as finding the right order to apply the shader
     
    RB_lashman likes this.
  31. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    Where do i start? Like I said Reflectivity works but GI doesn't.
     
    RB_lashman likes this.
  32. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    362
    If anyone is curious, SEGI does work just fine 19.1.6f

    It does get some errors during runtime, but nothing you can't fix quickly.
     
  33. cerrec

    cerrec

    Joined:
    Jan 19, 2017
    Posts:
    26
    What sort of errors?
     
  34. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    276
    Hey guys,

    thought it time I stop by. As I was working on an update, then wasn't, then was again.

    I am still working on GI. As much as I can. Life is mostly having other ideas.
    Regarding future updates for SEGI, due to my currently limited time. And having reached a point where it became clear fixing up SEGI would require more work than just starting from the ground up. So I've been doing that. Downside, it's taking a while and that unending learning curve. Pro's I hope to eventually have something that parallels the beauty of some of those early SEGI screenshots. A level of fidelity that just was not forthcoming from shoehorning the original SEGI code thru the level of refactoring necessary to ever have a change of supporting future render pipelines or much else. Sadly, I'm a solo act. So just don't have the resources to do everything I'd like. Have had to make some more limiting decisions, so I eventually produce something notable at all.

    While it's still a way from being stable enough for general use. The pretty factor is there :D
     
  35. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,073
    Looks pretty good! :D Wish I'd had the skills to code, I'm really interested in lighting so I wish I could help lol. Hope this turns out great!!
     
    RB_lashman likes this.
  36. jefferytitan

    jefferytitan

    Joined:
    Jul 19, 2012
    Posts:
    87
    I imagine that dynamic GI could be quite useful in your modular dungeon, especially with runtime level generation, emissive surfaces, etc.
     
  37. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,073
    Oh yeah, thanks, it would! : ) I have been using SEGI before in my nature, since baking a larger scale environment sounds ridiculous for my specs/time it takes, I just couldn't bring myself to wait for a day to bake. I might use the progressive lightmapper where I have small rooms and scenes but overall I'd prefer something like realtime GI.
     
    RB_lashman and NeatWolf like this.
  38. cerrec

    cerrec

    Joined:
    Jan 19, 2017
    Posts:
    26
    It's BEAUTIFUL! Love it!
     
    RB_lashman likes this.
  39. YouDesign

    YouDesign

    Joined:
    Jun 21, 2017
    Posts:
    55
    Sorry, but what about HDRP support? Required PP2 not work with HDRP and current version can`t work. Any advice?
     
  40. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,099
    Realtime?
     
    RB_lashman likes this.
  41. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    109
    I've seen this post late! My advice is that you finish something that looks more or less acceptable and has a good performance, it isn't necessary that you reach a perfection level of GI, because we are orphans of a realtime GI in Unity and anything that works and doesn't destroy the performance will be very welcome.
     
  42. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,073
    I tried the 2017 version of SEGI from Github and I must say the screenshots don't lie! This is more than good enough for me. I was using a broken version of SEGI before. I gotta admit it's pretty hard to find the right settings that look right, still figuring it out! All I'm here for is to say I love this lol! Btw Ninlilizi, it looks really great!

    screen_3840x1818_2019-10-11_13-07-43.jpg

    screen_3840x1818_2019-10-11_13-05-40.jpg
     

    Attached Files:

  43. madrobotMK

    madrobotMK

    Joined:
    Nov 19, 2013
    Posts:
    9
    RB_lashman likes this.
  44. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    1,698
    I'm no GI developer, but basically this:

    "Voxel Cone Tracing GI" is an old technique from 2011 that has serious flaws - e.g. high memory usage, light leaking, etc. There were attempts made in the Unreal Engine 4, as well as in Unity (in form of SEGI), but these implementations all had their issues due to the limited nature of "Voxel Cone Tracing GI" itself. Eventually, people gave up on it.
     
    x4000 likes this.
  45. jefferytitan

    jefferytitan

    Joined:
    Jul 19, 2012
    Posts:
    87
    I gather it's a quote, so I'm not going to ask you to defend it. ;) Just curious what is considered the path forward these days if VCT GI is considered obsolete. My perspective is that RTX can't be considered ready for primetime yet, between old PCs, consoles and mobile devices. From what I've seen VCT is workable with assistance, e.g. cascades, anisotropic light modelling, octrees, etc.
     
    RB_lashman likes this.
  46. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,990
    Voxel cone tracing is basically just the update method, the problem above is link to the support structure as an approximation of geometry, that is work great when the approximated geometry line up with the structure, which is true of all techniques. A segi variant mixed with ddgi would work equally well, especially since not hardware support hardware raytrace update, as ddgi solve the bleeding problem. I'm working on another type of update without hardware raytrace too.
     
  47. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,073
    Voxel GI, It's better than nothing, I can't afford a RTX and the progressive lightmapper is just horrible in my opinion. I don't have any reason to use it aside from bullshots and waiting half an hour for a bake that looks like mush doesn't do it for me.
     
    x4000 likes this.
  48. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    I think the future is likely to be some form or DDGI as it solves the light bleeding and bandwidth issues of Voxel Cone tracing and can use multiple mesh formats rather than just voxels. Interestingly DDGI does work better with voxel structures than polygons even using rtx hardware.

    Unity is working on RTXGI with Nvidia for the HDRP so I am assuming they think that is the future. RTXGI just looks like an Nvidia rebranding of DDGI. They do say it will work on all hardware though.

    HDRP is clearly targeting the performance levels of the next gen consoles and from the deliberate leaks made by AMD and Sony regarding ray tracing it is fairly clear they have a similar plan. Sony has already announced that the PS5 can do ray trace accelerated ao in hardware. Even most RTX games don't use ray traced ao as screen spaced ao is more efficient and usually looks good enough. Ray traced ao is very important for DDGI though as it doesn't capture any fine grain detail unlike path tracing and so needs accurate world space ao to be added in to look realistic.

    Amd have announced that second gen navi will do specific ray traced functions in hardware and others will be cloud accelerated. The only cloud accelerated ray tracing that makes any sense is DDGI as any other form would have two high a bandwidth to transfer over the internet to be of any benefit to be done over the cloud.

    I am guessing that the next gen consoles will do ray traced shadows and ao in hardware as they can be de noised easily with few samples and providing the hardware is up to the job ray traced shadows would be more efficient than high resolution cascade shadow maps on a console anyway because it wouldn't use up a consoles memory bandwidth with the shadow cascades then. Reflections would then be either screen space or ray traced depending on how capable the ray tracing hardware was. Lastly Diffuse GI would be based on DDGI based probes that were either baked or streamed and updated in real time in a multiplayer game.

    I just hope the industry moves away from trying to brute force path tracing and then baking all the maps. It just makes game file sizes so large and limits game play because then everything has to be static. I also don't see ray tracing hardware becoming fast enough to do it at high resolution in real time anytime soon.

    The future is real time path tracing but that future is 10 years away probably. I would love to be proved wrong and have that possible sooner so that we could path trace something more detailed than quake 2.
     
    Seith, jefferytitan and RB_lashman like this.
  49. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,073
    Still, love Segi pretty much!

    3.jpg
     

    Attached Files:

    RB_lashman likes this.
  50. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,990
    Deleted User, RB_lashman and x4000 like this.
unityunity