Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

SEGI (Fully Dynamic Global Illumination)

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

  1. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    I suspect forward rendering support is a particularly difficult challenge right now, but perhaps may become much more feasible, once scriptable render loops are officially released--which is probably a long time coming still.
     
    RB_lashman likes this.
  2. Orion_Reed

    Orion_Reed

    Joined:
    Aug 14, 2012
    Posts:
    39
    The newest 5.6 beta includes Metal Compute shaders and full UAV support (still some issues still with UAV writes in fragment shaders)

    I hope it's an easy enough task to add support for Metal, maybe all the cross-platform SEGI users should band together and buy you a Mac for testing ;)
     
    RB_lashman likes this.
  3. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    I'm not sure forward rendering is on the table. Although, I really cannot use SEGI without it - there is no known AA solution I have seen for Unity that can compete with MSAA for virtual reality development.
     
  4. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Yes Metal would be great if that is possible
     
    RB_lashman likes this.
  5. BeyondTemptation

    BeyondTemptation

    Joined:
    Dec 18, 2016
    Posts:
    4
    Hello, I am new to unity, because I started with UE4, but I searched for realtime GI and stumbled upon this amazing plugin, I am about to buy it but I have one question

    Does SEGI provide some realtime shadowing tech for directional lights?



    In this screenshot there are very smooth shadows, but in realtime GI provided in unity 5 default all shadows are very sharp and looks kinda primitive.
     
    RB_lashman likes this.
  6. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    There's this asset, but it doesn't support directional lights yet. From what I've heard, it's on the roadmap, though.
     
    RB_lashman likes this.
  7. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    60
    Wow, that blue noise is quite the game-changer. That's incredible how much it improves the IQ without having to increase voxel resolution!!

    Most of my Voxel-GI experience is with nVidia's VXGI on UE4. One thing I have noticed is that specular reflections are very, very grainy. Is there a similar issue with SEGI and will the change to blue noise improve that?

    I am in the midst of migrating my development from UE4 to Unity (better support for procedural Houdini models and Substance Materials being one of the biggest factors) so SEGI might be one of the first plugins I get. It would be nice, one the update is released, is to have updated demos as well with a hotkey to turn on/off blue-noise so we can see the difference.

    BTW, in general, from the limited I've seen so far, SEGI is totally superior to VXGI, both in rendering quality and in performance. Not to mention not nvidia specific. Pretty impressive considering it's one man vs. a billion dollar company doing the development!!
     
    Last edited: Feb 13, 2017
  8. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    It's vastly superior to VXGI and UE's DFGI (and SVOGI for that matter)...

    ...F*** it lets be honest. Visually it's the best I've ever seen, and then really? It's that performant for that quality?? Yea this is the legit S***...
     
    RB_lashman and amasinton like this.
  9. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,663

    (around 7:20; it's from sonicether)

    Quite old that video, but you can see SEGI in action there. Though, how well it runs in the end depends highly on your (and your customers/players/users) system configuration. I'd definitely wait for the cascades update, which might improve the performance even more [1].
     
    RB_lashman likes this.
  10. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    60
    I never got around to trying out Crytek's SVOGI. SEGI is even superior to that? That's even more impressive, Crytek has invested a LOT into that technology. They've got some great engine programmers. Have you tried the latest SVOGI from CryEngine V?
     
    RB_lashman and SteveB like this.
  11. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    That's what's crazy about Cody accomplishing this, is that it's indeed without a team of engine programmers.

    That said, yea SVOGI in it's current form looks fantastic, so at the very least I'd say they are very similar (which they are to a degree under the hood). If SEGI can compete with the likes of a dedicated rendering team from a dedicated engine developer, that bodes quite well for us. :D
     
  12. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    As I know SVOTI developed by one man (Vlad4D) inside Crytek...
     
    RB_lashman and SteveB like this.
  13. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Oh well there you go! :D
     
    RB_lashman likes this.
  14. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    All you need is one mad genius o_O
     
    RB_lashman and SteveB like this.
  15. andywatts

    andywatts

    Joined:
    Sep 19, 2015
    Posts:
    110
    This is wonderful. Will buy to play with and support your work.
    I'd like to vote for "forward rendering", so I can also have anti-aliasing and transparency.
     
    RB_lashman likes this.
  16. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    yea, now lets see if we can get a update of anything?
     
    RB_lashman likes this.
  17. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    Hi,

    is it possible that Voxel Resolution can use less Vram when on high settings? like in a future update?
     
    RB_lashman likes this.
  18. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    851
    I have that and let me just say that the shadows are awesome, so far segi and it play very nicely together. When he adds directional lights, it should really be an instabuy for anyone valuing graphical fidelity using unity.
     
    RB_lashman and one_one like this.
  19. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    60
    So that Next-Gen Soft Shadows asset is compatible with SEGI & area lighting with emissive materials? Or Directional lighting only? It does look like a huge improvement over the standard unity shaders which are really quite awful.
     
    RB_lashman likes this.
  20. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    @mykillk, see the post just above yours. :)

    EDIT (since you edited your post): NGSS doesn't support directional lights yet, but it's in the next major version release, I believe. I recommend reading up on and posting questions in that developer's thread. Tatoforever is very responsive.
     
    Last edited: Feb 17, 2017
    RB_lashman and one_one like this.
  21. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    60
    I misread thelebaron's post. For some reason I thought it said directional lights were supported, not that it's coming in the future which obviously would have answered my question. Thanks :)
     
    RB_lashman likes this.
  22. Yasunokun

    Yasunokun

    Joined:
    Feb 20, 2015
    Posts:
    8
    Hey @sonicether , Your main website says it got suspended.. did you forget the bill? :p
     
    RB_lashman likes this.
  23. davide445

    davide445

    Joined:
    Mar 25, 2015
    Posts:
    138
    I'm expecting sooner or later he will be acquired from a bigger organization.
     
    RB_lashman likes this.
  24. Yasunokun

    Yasunokun

    Joined:
    Feb 20, 2015
    Posts:
    8
    If that is the case, let's hope they don't yank SEGI from the store lol..
     
    RB_lashman likes this.
  25. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Hey guys, wanted to post a few more shots of testing with SEGI. Something I have wanted to do in a while. A cave! Made something that sort of resembles one.








    All in the same scene with the same lighting and image effect settings! I love this so frickin much:D. Sorry for posting so many images. Just excited. Also since taking the images I made a few GI only layer planes to substitute the waters contribution. So that looks better now.
     
  26. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    lets hope that sonic is ok and the soon returns
    given that he has not been here for nearly 2 weeks and
    and his homepage suspended :confused:
     
    RB_lashman and amasinton like this.
  27. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Yeah with all that he has been going through lately hope he and his family are okay.
     
  28. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    Hi guys. We went though a bit of a scare with the health condition of my family member, but everything is okay. I'm sorry I've been absent.

    My website is back up. My bill was due just as my host's services went down for maintenance. Unfortunate timing, but everything is resolved now.

    As for development news, yesterday I took a shot at an idea that's been floating around in my mind for a while. I'm not sure if it'll work out yet, but I figured I'd at least share.

    So, in the past I've tried instead of tracing for indirect light in screen-space, doing it in another volume texture. That ended up being quite slow and wasn't worth it, but I had a new idea that would speed that up a lot. It's difficult to explain, but basically I cone trace only a few steps for each cascade level and composite the results.

    There are a few interesting potential benefits for this approach. Firstly, since GI tracing wouldn't be screen-space traced, it would be independent from the main render resolution. So, GI would cost just as much at 720p as 4k, for example. This also has benefits for rendering multiple viewpoints or VR since the only thing that needs to be done to apply the indirect lighting is sample the final GI irradiance texture, which is quite cheap.

    Tracing through the irradiance volume could also be used to render GI-lit fog, and support for forward-rendered objects would be trivial (although it would still require a custom shader).

    And, since the GI result is readily available, infinite bounces would come for free.

    As of now, I've got it working in a really basic form. There are a few problems which I'm unsure whether I'll be able to solve, however.

    As you can see here, basic skylighting/ambient occlusion works quite well.




    The main problem is that the direction of light is preserved poorly between iterations. This, and the fact that for now I'm not using spherical harmonics to encode light values and light direction for GI data yet, causes pretty bad self-bleeding artifacts (that look like sub-surface scattering).

    Here is a visualization of the GI result of indirect light from sunlight with this technique in its current state.


    As you can see, light is just bleeding like crazy. The ground should hardly be receiving indirect light at all. Instead, sunlight on the ground is spreading through the ground as if it were wax or something. This doesn't look like GI at all. This problem would compound if infinite bounces were used.

    It is fairly efficient, however. Even in its infancy, GI tracing only cost 3.1 ms, which is pretty much as low as I could manage screen-space tracing at 1080p, and even then, there were artifacts like noise and streaks from temporal sampling.

    For this to be practical, I need to represent GI data using spherical harmonics, which will add to memory and rendering cost. I may also need another set of irradiance volumes to carry intermediate non-composited tracing results to prevent loss of precision in the direction light is traveling between iterations.

    So, this may not end up being usable, but I figured I'd just share for anyone that finds this stuff interesting and to give an example of the kinds of experiments I do during development. It's better to have an idea, test it, and know it won't work than to leave ideas unexplored!
     
  29. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    Thanks for the update, @sonicether. Sorry to hear about the non-SEGI news, but good that things are more stable for now, at least.

    I probably only grasped like 3% of the technical part of your post, but it sounds promising, even if it means it'll take longer to get SEGI to a production-ready state.

    By any chance, have you looked at scriptable render loops in the 5.6 betas yet? A couple other asset developers I follow have said there are some pretty cool things possible with them. Not sure if you feel like SEGI would benefit yet.
     
    RB_lashman likes this.
  30. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    60
    Personally, I find your postings very interesting. And you never know, some customers might be fairly knowledgeable about this kind of stuff and have some suggestions or answers to the problems you face in development.
     
  31. HolyFireGames

    HolyFireGames

    Joined:
    Apr 23, 2014
    Posts:
    134
    Hi everyone, is SEGI currently in a state that's ready for a game production environment? I have a static Unity terrain that's 2000x2000 for our current project. Is SEGI fast enough to be used right now in a scenario like that to light that size of a terrain?

    Thanks
     
    RB_lashman likes this.
  32. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Nope but that would be wasteful...just render the immediate area where the fidelity is necessary. Sure the lighting could mismatch a bit at the cutoff point, but I can't see it worse than how certain effects are limited by distance (shadows many times) and could be mitigated with some clever use of sky lighting to help blend.

    Cascades will be available soon, and then yea you'll be able to shove SEGI out far enough that you couldn't even tell it isn't lighting the whole terrain...
     
    RB_lashman and HolyFireGames like this.
  33. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    851
    @sonicether is there a chance you could at some point take look at how segi and lux pro interact? reflections appear mucked up when enabled with a lux skin shader. @larsbertram1 (the lux dev)said hes tried to reach out to you without any luck. I know segi is still in beta but just hoping compatibility can be added to the slate for sometime down the road.
     
    Baldinoboy and RB_lashman like this.
  34. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Same with the Custom Tree Importer v3 shaders. I can not use reflections in my scenes. Fortunately the diffuse GI still works but would be nice to add reflections.
     
    RB_lashman likes this.
  35. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Sounds like a 1.1 release fellas. SEGI needs out of Beta with a full compliment of foundation features before we're exploring cross compatibility.

    Remember new techniques are still being tested, which could easily invalidate any support for a 3rd party tool...
     
    chiapet1021, Arganth and RB_lashman like this.
  36. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Definitely. Thinking it is just a snippet of the Deferred Rendering shader that would need changing for compatibility since a recent similar version worked. It is definitely a post official release issue though.
     
    SteveB and RB_lashman like this.
  37. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    I feel stupid for asking, maybe it's more obvious than it seems - Does anyone here know how to make a shader created with Shader Forge work with SEGI? I've got SEGI setup exactly how I want, Perfect bounce lighting and all that goodness, but the shaders I've created in Shader Forge do not show any of the bounce or ambience. Instead the shadow is just flat.
     
    RB_lashman likes this.
  38. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    851
    segi is deferred only, so Im assuming if you used custom lighting in shaderforge as that requires forward it will be incompatible with segi.
     
    RB_lashman likes this.
  39. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Correct. Also all shader forge shaders, even Deferred are not going to work with SEGI. Looks like a disco:confused:. At least for me. For this I made GI visible only layer models using the standard shader with similar color, lighting settings. Then disable the SF models layer from the GI layers. Works great in my scenario which is mainly SF water.

    Edti- Do find it strange though that yours are not receiving the GI light. IT should receive the light but might have issues contributing
     
    Last edited: Mar 3, 2017
    RB_lashman likes this.
  40. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    Yea I completely spaced on the fact that you can switch the shader to deferred shading. Unfortunately, it doesn't allow SSS or Translucency, which might be why I wasn't considering the option in the first place.
     
    RB_lashman likes this.
  41. rainisto

    rainisto

    Joined:
    Jul 19, 2015
    Posts:
    35
    Hi. Here's +1 to getting SEGI working in VR. It would be so great. Even with something that wouldn't be 100% accurate - for light bleeding giving the option to set gamma / curve things away so that in your example where light bleeds on the ground setting small light bleed to be black.
     
    RB_lashman likes this.
  42. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    You can use Alloy or Uber shaders then you have SSS on deferred shaders.
     
    RB_lashman likes this.
  43. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    RB_lashman likes this.
  44. Deleted User

    Deleted User

    Guest

    @Abuthar
    Yup, Alloy uses command buffers and a custom override shader to achieve both effects in deferred mode. You can see them both in action in the upcoming game P.A.M.E.L.A.
     
    vonpixel, Baldinoboy and RB_lashman like this.
  45. yohami

    yohami

    Joined:
    Apr 19, 2009
    Posts:
    124
    SteveB and RB_lashman like this.
  46. P1st3ll1

    P1st3ll1

    Joined:
    Dec 13, 2012
    Posts:
    69
    Is there any way to get Shader Forge's shaders compatible with SEGI?
     
    ftejada and RB_lashman like this.
  47. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    60
    Real-time GI in VR games is rather unrealistic, don't you think guys? High frame rates (90+) are paramount in VR, it's just not a very good match. You'd have to have an absolute monster of a computer to hit that kind of frame rate with real-time GI in a real-world game.
     
    RB_lashman likes this.
  48. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Not at all. While I don't hit 90 fps using SEGI in my VR scenes, it's entirely playable and gorgeous...

    ...but the kicker is that it's being rendered for each eye! When @sonicether is able to get SEGI to be single-pass, then the only issue comes down to GPU power, and at that we're already expected to have 980's to have quality VR, 10 Series for serious performance.

    The reason I'm all in on SEGI for VR IS the simple fact that the machines being used are already quite capable. Just be smart using it and you get amazing results.

    Speaking of Single-Pass rendering...Cody?
     
  49. yohami

    yohami

    Joined:
    Apr 19, 2009
    Posts:
    124
    How do we get @sonicether Cody to speed on this thing? set a gofundme, patreon, send love letters? send the mob?

    This is the single thing that can make Unity be on par with Unreal on the visual front, Im depending on it!
     
    vonpixel, RB_lashman and SteveB like this.
  50. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    I'd participate in all of those, especially the letters...