Search Unity

SEGI (Fully Dynamic Global Illumination)

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

  1. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    Looks impressive, but is it forward rendered yet? This still isn't viable for VR, it seems?
     
    RB_lashman and buttmatrix like this.
  2. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I bet VR will be kind of last thing, first is to build a solid foundation
     
    P_Jong and RB_lashman like this.
  3. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    The way SEGI is using the G buffer to apply light it will not work for Forward rendering.
     
    P_Jong and RB_lashman like this.
  4. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    OnlyVR and RB_lashman like this.
  5. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    This. I have complained about lack of progress in the past and dont want to repeat the complaint too often. For me its not at all been a complaint that a final destination hasnt been reached yet, its the amount of time that passes between updates we actually get our hands on. Even if they are unpolished steps in the journey rather than major milestones, heck thats half the fun with beta releases and I didnt get anything like what I expected on this front when I bought segi.
     
  6. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I wish I was better at putting more positives into the few posts where I moan, sorry that I failed. If you hadnt made something with great potential I wouldnt moan so much so, ahem, nervous shuffling, try to take it as a compliment?
     
  7. BruceBarratt

    BruceBarratt

    Joined:
    Jun 20, 2015
    Posts:
    57
    Thanks for the update! Looks great!

    I too would absolutely love to have cascades even if there are many downsides.

    Getting it tested more would surely be beneficial to understand how it works in our use cases.
     
    RB_lashman likes this.
  8. MarcoAM

    MarcoAM

    Joined:
    Jan 20, 2015
    Posts:
    1
    The cascades and increased voxelisation speed look fantastic! Being able to control the bounced light intensity with the albedo alpha value would be incredibly helpful for me.

    On a different note, I believe I once read that SEGI reflections could never work on transparent shaders. Is that correct? I have a body of water that would benefit greatly from being able to utilise the reflections SEGI generates.

    Again, awesome work!
     
    RB_lashman likes this.
  9. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Sonic I have an idea! Today I've tested segi on my town scene and everything looks cool but there was a problem with far distance view it's really bad when you lighting up your scene with segi but just a little far distance looks dark or without occlution.

    Is that possible to place a second and basic voxel cube next to main one only for far distance? Then we can use segi for open world games too

    I can't use SEGI for more than 300 distance cause it lose detail but if there was second voxel cube with lower setting only for distance that could be cool. for example from distance 300 to 1000 or more...
     
    Last edited: Jun 24, 2017
    OnlyVR and RB_lashman like this.
  10. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    That's cascade voxels and that's what's he is been working on presenting in his update. In your case it's just a cascade of two.

    Won't make any miracles though it will just be shy from perfect, there will always be someone asking for just a little more. IMHO you should treat it like shadow, have baked stuff at a distance and have dynamic GI up close, or any cheat and approximation you can think off. Shadow is there for a long time and we still have the same problem in some game where dynamic shadow is only upclose and everything far is lighted.

    In other words just be patient and start to be clever.
     
    RB_lashman and hopeful like this.
  11. BruceBarratt

    BruceBarratt

    Joined:
    Jun 20, 2015
    Posts:
    57
    I think that idea does make a lot of sense. As well as that would it be possible to change cascade sizes on the fly intelligenty depending on the amount of geometry in the area? Could that be done fast automatically?
     
    RB_lashman likes this.
  12. BruceBarratt

    BruceBarratt

    Joined:
    Jun 20, 2015
    Posts:
    57
    It seems like a good plan to me. Giving extra control on a per object basis seems like the best strategy in general for maximising performance and quality.
     
    RB_lashman likes this.
  13. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    134
    Hello, nice to see you moved your sliders about progress. I am waiting on cascades, as I have 1km^2 terrain (where you can move around on 750*750m area, what I think is still too big for segi without cascades right? As I have building in runtime, I cannot bake lighting so you are my only hope :) Do you know when circa will be segi suitaible also for such size scenes? And point lights (torches) does not cast any lighting (even direct) until you finish their support?

    Thanks for answers :) I am very happy you work on this, and once I will know I can use it, it will be instabuy. Just it is enough money, and would like to be sure, I can use it in my project :)
     
    RB_lashman likes this.
  14. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    As has been mentioned many times before, SEGI really is not suitable for this type of use case, even with cascades I'd imagine. You can download the executable demos and see the type of performance that is available even for relatively simple dynamic scenes. The idea of using SEGI to render a terrain with vegetation, post processing, etc. - probably not going to happen.
     
    RB_lashman likes this.
  15. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    134
    Well not sure if it is a nonsense, but theoretically vegetation and terrain does not need indirect lighting as much as structures , so not sure if it would be possible to make two separated layer groups for one for segi and other for unity GI. I undeerstand the problem to set both lightnings look similiar. But there is impossible to make inside parts and outside which are built in runtime, to have dark in room without windows... And that lighting makes a huge different in look.
     
    yohami and RB_lashman like this.
  16. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Yeah, I don't mean to insinuate that it would be impossible, but probably not easy. As the SEGI docs indicate, it is possible to optimize even further by using low poly proxy GI objects. I suppose it depends on your scene composition as well, e.g. desert probably more manageable than a dense forest, art style, etc.
     
    RB_lashman likes this.
  17. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Vegetation would mostly benefit from large-scale occlusion, e. g. in forests.
     
    RB_lashman likes this.
  18. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    when is it ready?
     
  19. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    when it is ready!:p
     
    P_Jong, gmatthews and RB_lashman like this.
  20. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    @sonicether Latest update is extremely promising :) Great to see the gradual improvements have really stacked up, quite a serious improvement!

    Would it be possible to somehow render SEGI into reflection probes so forward rendered objects had some vague GI?
     
    RB_lashman likes this.
  21. mrbdrm

    mrbdrm

    Joined:
    Mar 22, 2009
    Posts:
    510
    is there anyway to include spot light into GI?
    i don't have any directional light in my scene, only one spot light
     
    RB_lashman likes this.
  22. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    bump?
     
    gmatthews, arnoob and RB_lashman like this.
  23. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,665
    It's currently limited to Directional Lights. (See Known Issues)
     
  24. Sp-ce

    Sp-ce

    Joined:
    Feb 2, 2015
    Posts:
    65
    @sonicether

    Wow, this really looks amazing. Fantastic work.

    How does this work with time of day sky solutions, TrueSky Alpha, tenkoku dynmaic sky, ect?

    Does anyone have any experience with these assets and SEGI?

    Thanks!
     
    RB_lashman likes this.
  25. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    @sonicether SEGI had an honorable mention (6:29) at Unite Europe 2017, and since Unity 2017.1 was released today, I think that marks a good opportunity to have a fair dialogue regarding the development cadence and future for SEGI.

    The blue noise implementation was mentioned in January (!), and unless I missed something, that feature was never officially published to the Asset Store. In fact, apart from the features that have been teased on the forums, SEGI has largely remained unchanged; with the exception of 5.4 motion vector support and 5.5 inverted depth buffer fix. I'm excited about the performance optimizations mentioned in your most recent post, but for an asset that commands the price that SEGI does, I would really expect more frequent version updates and perhaps greater forum presence, wherever possible; I appreciate that SEGI has approached an impasse with respect to performance and visual quality. I am reluctant to say any of this, as I have no knowledge of your life circumstances or the challenges that you face day-to-day. I hope all is well, and I look forward to hearing from you.
     
    Last edited: Jul 12, 2017
  26. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    But then remember it was the public who ask for an early beta released when @sonicether said he wasn't sure about it, now it feel like you are guilt tripping him for something he didn't want to do to begin with :p I would say what we have is already a lot, the impatience would have been worse if he had stick to his initial idea of releasing when it's ready. Given that RTGI is a complex cutting edge features to design, and everyone is still deep in R&D, I can't fault him, he is one of the pioneer. Other people have tried and have faltered, other are in similar place BUT haven't released (hello hxgi). Patience is only what you have now.

    Now that video where he is mentioned is some awesome hack lol
     
    RB_lashman and TeagansDad like this.
  27. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    That was some seriously next level GI hacking in Unity, really incredible stuff. The community very often comments something like, "This should be added to Unity", but I will be very surprised if some derivative of that implementation isn't actually added in the future.
     
    RB_lashman likes this.
  28. Sp-ce

    Sp-ce

    Joined:
    Feb 2, 2015
    Posts:
    65
    That was how I found out about the asset, as well.
     
    RB_lashman likes this.
  29. amasinton

    amasinton

    Joined:
    Aug 12, 2006
    Posts:
    138
    NANFClose800.png Just finished this. No baking. No lightmaps. Fully dynamic GI. Lit only by the sun and emissive textures on the windows. SEGI makes me very happy. It has replaced my normal rendering workflow.

    I just thought the forum could use a little boost of positivity.
     
  30. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    The "Infinite Bounces" effects is really low! I can't see any change for an indoor scene with an open windows. is that possible to increase it by a parameter to a desire amount in the next version?

    For example we have a totally dark room. But placing a windows for this room doesn't change anything! (can't bounces the light inside the room)
     
    Last edited: Jul 13, 2017
    RB_lashman likes this.
  31. amasinton

    amasinton

    Joined:
    Aug 12, 2006
    Posts:
    138
    Hmmm. The image I posted above is a room with no interior lighting of its own. Everything is lit by just the sun outside coming through the window openings and by emissive, single-sided planes in the windows themselves. If I turn off the glass, the sunlight still illuminates the interior pretty well (and it's a very big interior).

    Do you have glass in your window openings? If so, is it single-sided facing in? If it's two-sided then it will block the light.
     
    Crossway and RB_lashman like this.
  32. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    It's not coming through your windows! if you block all your windows your interior lighting will not change even a bit.
     
    Last edited: Jul 13, 2017
    RB_lashman likes this.
  33. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    It's about some SEGI parameters - cone tracing distance & radius plus a lot of parameters related to occlusion.
     
    Crossway and RB_lashman like this.
  34. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    I know but on any setup still there is no difference between a totally sealed room and a room with a windows.
     
    RB_lashman likes this.
  35. vonpixel

    vonpixel

    Joined:
    Oct 2, 2012
    Posts:
    31
    you can cull the windows from the gi so light passes through still and still keep them visible in the camera. Helpful because you might want more light- but not necessarily have those emmisive surfaces be so bright they blow out the scene.

    As for your scene set up- I would maybe guess that its not in deferred mode? You shut off all the regular light (except the directional light?)
     
    RB_lashman likes this.
  36. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    That isn't how segi works. I mentioned before there is no difference between a sealed room and a room with a big hole on it.
    Anyway Segi still looks cool.
     
    RB_lashman likes this.
  37. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    You should read the documentation again and make sure you've got it set up correctly. Some things you may have missed: you have to use Deferred rendering, you have to use Directional lights, you have to turn down or turn off Unity's default lightmapping and ambient lighting.
     
    vonpixel and RB_lashman like this.
  38. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    To give an example:

    Room with windows:
    Capture2.JPG


    Same room, but with a big cube outside the windows blocking the sun:
    Capture1.JPG

    Maybe you've got the "Soft Sunlight" and "Sky Strength" too high. If you're indoors with few windows, you'd want those to be zero or very low.
     
    P_Jong, SteveB, Baldinoboy and 2 others like this.
  39. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I've been using SEGI on large outdoor scenes with dynamic building in my game and so far it's been working pretty well. It will definitely impact your frame rate, so you need to tweak it and not go crazy and try to max all the settings. You can keep the GI range close to the player, only have it voxelize layers with "big" objects, and slow how often it updates. Not sure what you mean by your point light question: they still cast light normally, they just don't contribute to GI bounces. Also you can combine a point light with an emissive texture on a torch, and then you'll get both the point light and GI bouncing.
     
    RB_lashman, buttmatrix and ftejada like this.
  40. vonpixel

    vonpixel

    Joined:
    Oct 2, 2012
    Posts:
    31

    I dont know what to tell you then- you might want to read over how to set SEGI up properly. I can tell you that what I said absolutely works. Ive used it in multiple projects already.
     
    P_Jong and RB_lashman like this.
  41. Yuki-Taiyo

    Yuki-Taiyo

    Joined:
    Jun 7, 2016
    Posts:
    72
    Yo guys,

    I have two questions regarding SEGI before getting it :

    1) Can you only use emissive materials, for lighting interiors with neons for exemple ? How the performance gets affected when you use emissive materials ? Is it per mesh or per lenght ?

    2) Any chance for SEGI to work on console systems (Xbox One, PS4, Switch) in a near future ?

    Thanks.

    - Taiyo
     
    RB_lashman likes this.
  42. yohami

    yohami

    Joined:
    Apr 19, 2009
    Posts:
    124
    1) Yes and it doesn't have any issues with it

    2) Nope
     
    RB_lashman likes this.
  43. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,665
    You will never see any realtime GI on consoles for now. Mainly because all those techniques are too hardware hungry.

    However, the devs of The Tomorrow Children somehow managed to utilize realtime GI based on voxel cone tracing (pdf).
     
    arnoob likes this.
  44. Yuki-Taiyo

    Yuki-Taiyo

    Joined:
    Jun 7, 2016
    Posts:
    72
    Too bad for Consoles. I will have to find another way but I hate lightmaping and my current project requires generating levels.

    Would SEGI be compatible with the asset called Next-Gen Soft-Shadows ? It looks like it's for unity lights only...
     
    RB_lashman likes this.
  45. scheichs

    scheichs

    Joined:
    Sep 7, 2013
    Posts:
    77
    RB_lashman likes this.
  46. Yuki-Taiyo

    Yuki-Taiyo

    Joined:
    Jun 7, 2016
    Posts:
    72
    Thanks for this report !

    My console target is the Switch or the Xbox One (I never was so Playstation in my youth), but knowing you're experimenting on the PS4 along with the SEGI developper (is that right ?) is reassuring. Still have to know how powerful the Switch is, otherwise I guess it will be for the next Nintendo console in 5 years now, lol (unless they want to stay in the sandboxes or something...)

    Now, do you set all the settings to somehow Low to get like 60 FPS or do you aim for the best performances / visual quality setups not under 30 FPS ?

    Also, would someone think it would be possible to use clipping for these voxels ? Like, setting a distance where the GI works (like shadows with a directional light) so that it doesn't use ressources for nothing in interior scenes for example ?

    I'm thinking about using clipping on the meshes using emissive materials for lighting (neons, light bulbs, etc...), so that they disappear at a certain range and stop generating GI. Would it be a possible and clever solution for (console) performances ?
     
    Last edited: Jul 26, 2017
    RB_lashman likes this.
  47. yohami

    yohami

    Joined:
    Apr 19, 2009
    Posts:
    124
    So when is the next update with cascades is going to be out?
     
    buttmatrix, Arganth and RB_lashman like this.
  48. scheichs

    scheichs

    Joined:
    Sep 7, 2013
    Posts:
    77
    @Yuki-Taiyo : As written in the post, I set everything to default high quality in SEGI. Performance was 17FPS in FullHD. But it was just a quick test to check if it is compatible at all with PS4 tech (I'm currently not working with SEGI on PS4). I sent my code changes (only a few lines) to Cody to integrate them into SEGI, because AFAIK he has no access to a PS4 devkit. If you follow this thread he has made great performance improvements to SEGI that might be enough to reach 30FPS.

    As for XBoxOne and Switch: They should both work with small changes to code but performance on Switch will presumably not be enough.
     
    RB_lashman likes this.
  49. Yuki-Taiyo

    Yuki-Taiyo

    Joined:
    Jun 7, 2016
    Posts:
    72
    Thanks again.

    Yes, the Switch would only be able to use low or medium settings I guess. Still, it's better than nothing, and even Low looks fair enough in the demos.

    Too bad there is no demos showing emissive materials ; so far they show directional light on exterior scenes.

    I'm eager to get SEGI and test my emissive mesh clipping idea to see the performance results, even if I have a little more than a gaming PC Setup (14 Cores CPU and a GTX 1070), and no consoles devkit for now.
     
    RB_lashman likes this.
  50. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    If you want to test performance on switch, buy a nvidia shield 2, teh switch has the same hardware but with a throttle cap on GPU for constant performance. I don't know if there is a way to verify the gpu speed at any moment on this machine, but google for the rate of the switch and then adjust expectation accordingly.
     
    RB_lashman likes this.