Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

SEGI (Fully Dynamic Global Illumination)

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

  1. HellsPlumber

    HellsPlumber

    Joined:
    Aug 17, 2014
    Posts:
    33
    Yep!
    I just came here to see if Forward-rendering has been added yet, sad to see it's still not compatible.
    Our game's main shader requires forward rendering, so although SEGI looks beautiful in use we're unable to use it until Forward Rendering is added :(
     
    RB_lashman likes this.
  2. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    604
    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.
  3. 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.
  4. 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.
     
    RB_lashman and claudiubarsan like this.
  5. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,780
    Yes Metal would be great if that is possible
     
    RB_lashman likes this.
  6. 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.
  7. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    552
    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.
  8. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    59
    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
  9. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    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.
  10. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    1,914

    (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.
  11. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    59
    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.
  12. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    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
     
    RB_lashman, AlteredPlanet and ftejada like this.
  13. Lex4art

    Lex4art

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

    SteveB

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

    Baldinoboy

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

    andywatts

    Joined:
    Sep 19, 2015
    Posts:
    91
    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.
  17. AlteredPlanet

    AlteredPlanet

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

    AlteredPlanet

    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.
  19. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    529
    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.
  20. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    59
    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.
  21. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    604
    @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.
  22. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    59
    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.
  23. 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.
  24. 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.
  25. 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.
  26. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,398
    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.
     
  27. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    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.
  28. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,398
    Yeah with all that he has been going through lately hope he and his family are okay.
     
  29. 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!
     
  30. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    604
    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.
  31. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    59
    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.
     
  32. HolyFireGames

    HolyFireGames

    Joined:
    Apr 23, 2014
    Posts:
    119
    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.
  33. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    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.
  34. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    529
    @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.
  35. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,398
    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.
  36. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    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.
  37. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,398
    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.
  38. 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.
  39. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    529
    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.
  40. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,398
    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.
  41. 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.
  42. rainisto

    rainisto

    Joined:
    Jul 19, 2015
    Posts:
    41
    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.
  43. ksam2

    ksam2

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

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    RB_lashman likes this.
  45. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @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.
  46. yohami

    yohami

    Joined:
    Apr 19, 2009
    Posts:
    124
    SteveB and RB_lashman like this.
  47. HenriqueGomez

    HenriqueGomez

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

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    59
    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.
  49. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    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?
     
  50. 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.
unityunity