Search Unity

Fully Dynamic Diffuse Global Illumination

Discussion in 'Works In Progress - Archive' started by sonicether, Mar 29, 2015.

Thread Status:
Not open for further replies.
  1. Golesy

    Golesy

    Joined:
    Apr 10, 2013
    Posts:
    35
    When you turn GI off it goes back to using unity's rendering system which just applies sky lighting flatly. You could turn the skybox ambiance off to get pitch black shadows but I suspect the GI system would ignore the sky lighting as well if you did that. Adding darkness where it should be dark is actually exactly what it's supposed to be doing :p
     
    RB_lashman likes this.
  2. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Thanks @Golesy. I still don't understand this though... why would global illumination be adding shadow? I can see what's happening in the demo (that it's just going back to Unity lighting/ambient settings) but this doesn't sound logical to me. GI should be adding to the scene lighting, not taking away from it.

    Are you saying the GI is it's own complete lighting system? So Unity scene lighting is getting completely replaced when GI is turned on? If so then yes I see why the demo would be behaving so... but the demo default lighting settings should then be adjusted to clearly show an apples to apples comparison. </opinion>
     
    ksam2 likes this.
  3. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Yes, for example I have a house in my scene and it's totally dark but other objects outside are bright enough, so I need GI to bounce light to lighting indirect positions ... Can I do that with this GI?
     
  4. Gistix

    Gistix

    Joined:
    Jul 21, 2013
    Posts:
    29
    The GI is probably creating ambient occlusion, that's why it appears darker.
     
    nxrighthere, Vadya_Rus and RB_lashman like this.
  5. ThomasMM

    ThomasMM

    Joined:
    Jan 26, 2016
    Posts:
    1
    This looks incredible! Hope to get my hands on this for a project I wanna start in a couple'o'months. Great work.
    When i move objects quickly I see these kind of traces or fading ghost images though.

    As for performance: In windowed mode have 150 fps without the GI. With the highest quality setting I have 17 frames ... and it scales up to 32 frames when going to the lowest setting.
     
  6. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    So, I have to apologize for the long absence. The absence was caused by a family crisis, but everything is fine now and I'm back to work on this project.

    While it's true that GI adds bounced light, it also calculates light visibility from the sky (how much light from the sky is blocked from other surfaces in the scene). The cave in the demo, for example, gets much darker with GI on. Without GI, there's no calculations being done to stop ambient sky light from filling the cave. With GI, that light from the sky is properly occluded. Imagine rendering a cubemap from inside the cave. In that cubemap, you pretty much wouldn't see any part of the sky. Therefore, very little, if any, light from the sky should reach inside the cave. So, yes, GI adds bounced light, but also property occludes light from the sky, causing a darker result in certain situations.

    Anyway, I'm going to finish setting up the sponza scene and I'll upload it here when it's done.
     
    Slaghton, SteveB, eskovas and 8 others like this.
  7. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    I see. Thanks for the explanation!
     
  8. FPires

    FPires

    Joined:
    Jan 5, 2012
    Posts:
    151
    Out of curiosity, do you intend to add an option to exclude the sky occlusion from the GI algorithm and make GI more "traditional" by just adding the light bounces?

    That doesn't bother me (I actually prefer the way you implemented it, it makes more sense), just curious.
     
  9. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    The absence of light energy is just as important if not more so in Radiosity/GI; you want ambient occlusion. Never mind it's part and parcel to "Global Illumination".

    I think the disconnect here is that IRL, the Universe is dark. Light energy proceeds to bounce all around until things are lit up, subsequently losing it's energy with each bounce. In IFL (In Fake Life :p), when there is no light energy surfaces default to their Albedo (Neutral Lighting; assuming we can discuss this in the current state of Surface/Material shading...PBR). Sure in instances where lights are introduced to an environment, we're now calculating where light is hitting, and thus have surfaces where light is not hitting, all the while understanding the ambient level of light is contributing.

    If you just had accumulating bounced light energy and no occlusion, you'd simply have an infinitely brightening environment that won't look very attractive. Shadows play an equal part, or again if not an even greater part to the whole.
     
    RB_lashman and DMeville like this.
  10. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Can someone please answer my question? I have a house in my scene but inside of house is totally dark! Unity GI didn't help so much so I'm searching for a better solution. Can this GI will help me to equal light of outdoor and indoor?

    I like to make holes and caves as bright as I need! please use a "Indirect Lighting" better than Unity default!
     
  11. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Well it does come down to the number of bounces in a solution. You're sacrificing speed for fidelity with a greater number bounces, exponentially.

    So while the cave in Sonic's scene does a good job of showing his solution should do what you want, consider too that to get a full house lit with fewer portals (windows/doors) for the light to enter, the light bouncing around into the house is going to lose energy quickly, especially if you're on a single bounce. Unlimited bounces is another thing, and I can't speak to that for Sonic.
     
    RB_lashman likes this.
  12. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    @ksam2
    try Scion - Filmic Post Processing - https://www.assetstore.unity3d.com/en/#!/content/41369

    Here are some pics:



    Directional Light only

    **************************************************************************************************************


    Directional Light + Reflection Probes

    **************************************************************************************************************


    Directional Light + SCION

    **************************************************************************************************************




    Directional Light + Reflection Probes + SCION


    **************************************************************************************************************


    Directional Light + Reflection Probes + SCION + and Of course SESSAO (SE Screen-Space Ambient Occlusion)
     
    Last edited: Feb 3, 2016
    Martin_H likes this.
  13. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    scion add tonemapping. notice that.
     
  14. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Scion is post process not realtime GI, i baught it and i still don't have as good post process as Unreal 4 unfortunatelly.
     
  15. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Please don't turn the thread to another engine FlameWars.
    I just pointed Scion has nothing to do in this thread , Scion is post effects ONLY and it can't do or simulate real time GI.
     
    Nyt0x, ksam2 and one_one like this.
  16. captainbenis

    captainbenis

    Joined:
    Dec 28, 2014
    Posts:
    1
    Super interested in this, I tried out the demos on my 750ti and they ran fine at about 50fps. I'm targetting the oculus rift CV1 with low poly worlds (see www.scenevr.com), so this is very relevant to my interests. I really like the tomorrow children asthetic, I'm aiming for the same in Scene.
     
  17. Ryunis

    Ryunis

    Joined:
    Dec 23, 2014
    Posts:
    24
    I think realtime GI with reasonable performance is already great, but being able to quickly bake lighting is huge as well.
     
    zenGarden likes this.
  18. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Ligting baking would need the tool to generate second UV for each model and make a UV packing like Enlighten can do, i am not sure it will be easy or possible for the plugin.
     
    Last edited: Feb 12, 2016
  19. jcarpay

    jcarpay

    Joined:
    Aug 15, 2008
    Posts:
    561
    KyleOlsen likes this.
  20. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Any news?
     
    batman2064 and KyleOlsen like this.
  21. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    "What is this salty discharge?"
    "Oh my God, you're crying."
    "This is horrible. I care."

    I care Sonic! :D
     
  22. Slaghton

    Slaghton

    Joined:
    Sep 9, 2013
    Posts:
    139
    Where out thou sonic D;?
     
  23. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    I ask again, please release the first demo on the asset store! really hate unity default GI!
     
    RB_lashman likes this.
  24. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    Sorry for the wait, guys! I've been working on GUI stuff, preset handling, and documentation, but I think the sponza demo is done and I'll be uploading that later today. I've also improved performance of voxelization and infinite bounces, and fixed a small maths problem in the cone tracing step that basically allows for twice the number of traced cones for the same cost as before the fix.

    I can't help but feel frustrated that this isn't at its full potential yet, the biggest reason being lack of 3D mipmap support. Because of this, not only is cone tracing and infinite bounces slower, but exploring new functionality like cascades and directional voxel data (for reduced light leaking) is just impractical without proper mipmaps. However, I'm going to keep pushing forward with the beta release and hope that everything works out.
     
    rebit, batman2064, KyleOlsen and 11 others like this.
  25. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Again after what we've already seen and understanding exactly what it is we're getting, I don't think you're going to have a problem down the road. :D
     
    KyleOlsen, sonicether and RB_lashman like this.
  26. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Is this Unity missing feature ?
     
    macdude2 likes this.
  27. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    advice: do NOT rush... even ppl around asking about this. just do good stuff. need more time? ok, do it longer, but be sure that it will be good. quality is priority.

    on this forum there is few cases (with GI), which was rushed by ppl and result is... crap or not finished product with angry "zombies" ataced.
     
    zenGarden and RB_lashman like this.
  28. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    I think that one approach to quality is letting the community (consumers/buyers/etc) use, test and give feedback with this asset.
    That being said, please release the "beta" version on Asset Store and let us help you with the feedback.
     
    one_one, Mauri and RB_lashman like this.
  29. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    Alright guys, here's the sponza demo.

    As always, I'd love feedback on how you think it looks and how it runs for you.

    I should mention that I had to add a few boxes with a "voxel GI occluder" material (will be included in the asset) around the outside of the inner area to control light leaking. It works, but obviously I'd like the GI itself to mature to the point where doing that won't be necessary.
     
    ksam2, Elecman, macdude2 and 12 others like this.
  30. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Wow. I don't know what more I can say than what I already have. This is absolutely beautiful, and while I'm not in a position to say it's ready, jeez does it sure look like it is. :D

    As for objects to help support the GI, I think it's great as there are inevitably going to be cases where someone somewhere is going to have a scene that for some reason isn't working correctly. I'm all for this even if the GI is indeed matured.

    Well anyway my money is right here on the table...so um...yea!

    Cheers Sonic

    -Steven

    EDIT: I wanted to add that I'm SO thrilled there's proper skylight emission (or at least a good fake?) :D
     
    Last edited: Feb 24, 2016
    KyleOlsen and RB_lashman like this.
  31. Golesy

    Golesy

    Joined:
    Apr 10, 2013
    Posts:
    35
    This is just frikkin sweet! My gtx 460 can only really run preset 1(44fps) and 2(32fps), but since this looks like it'll replace multiple image effects I'm using now it'll make up most of the difference :D
     
    RB_lashman likes this.
  32. KyleOlsen

    KyleOlsen

    Joined:
    Apr 3, 2012
    Posts:
    237
    It's running great here on my machine! We need this now!

    Windows 10
    GTX 980ti x2
    i7 5960x
     
    ksam2 and RB_lashman like this.
  33. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    This is beautiful. Preset 1(low) runs on my machine at 60+, and looks pretty damn good by itself. Preset 2(med) looks much better( with the included reflections) but drops it between 50-60fps. The other presets are not really useable for me, dropping to 20fps, though not much difference in performance between 3 and 4.

    I wonder if the reflections can be enabled with the low setting, or if they are specific to the medium setting? Talking just about the Gi aspect, it's beautiful and adds so much even to this simple scene. Congrats!
     
    KyleOlsen and RB_lashman like this.
  34. Slaghton

    Slaghton

    Joined:
    Sep 9, 2013
    Posts:
    139
    Very sexy.
    Resolution - 1680x1050 fullscreen
    i7 4790k (stock clock)
    Sapphire Radeon r9 290 Tri x

    1. 100 fps
    2. 79 fps
    3. 53 fps
    4. 45 fps
     
    RB_lashman likes this.
  35. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    Normally, I would agree. Not in this case, however. It has been proven several times now that this tech is already good - performance and graphics wise. People here tested both the LowPoly and Sponza demo and got quite acceptable results. So, why not just throwing it on the Asset Store, labeled as a Beta or Early Access version, and get feedback which is not limited to either LowPoly or Sponza? Even a few users said they wouldn't have any problem with that.
     
    batman2064 likes this.
  36. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    Yep, reflections can be enabled or disabled independently from other settings. I just decided to have them disabled for the low preset in the demo.
     
  37. SAOTA

    SAOTA

    Joined:
    Feb 9, 2015
    Posts:
    220
    Wow, sonicether. This is gonna take archviz in unity to another level. Keep on keeping on.
     
    Martin_H and RB_lashman like this.
  38. batman2064

    batman2064

    Joined:
    Sep 23, 2015
    Posts:
    2
    Very Cool!
    Resolution - 1920x1080 fullscreen
    AMD FX-8320
    GTX750Ti

    1. 49 fps
    2. 35 fps
    3. 23 fps
    4. 19 fps
     
  39. batman2064

    batman2064

    Joined:
    Sep 23, 2015
    Posts:
    2
    When release in Asset Store?
     
  40. MaT227

    MaT227

    Joined:
    Jul 3, 2012
    Posts:
    628
    @sonicether This is a thrilling project and your work is really awesome. I am following your work and I would like to know more about the supported platforms and the required specs (WebGL, PC, Mobile, Consoles, SM 3.0, DX version, etc.), I don't remember that you already mentioned it.
     
  41. MaT227

    MaT227

    Joined:
    Jul 3, 2012
    Posts:
    628
    @sonicether I am also wondering if those kind of issues are avoidable using the occluder you talked about.
    screen.jpg
     
  42. ita333

    ita333

    Joined:
    Mar 28, 2014
    Posts:
    7
    Absolutely fantastic, to get perfection there should be shadows under the banners of the upper floor. CryEngine has solved the problem with path tracing for small objects. I do not remember now the exact name. Still fantastic, much better than the voxel CryEngine.
     
  43. Florian-Nouviale

    Florian-Nouviale

    Joined:
    Mar 14, 2013
    Posts:
    54
    Hi !

    I'm following your work a bit since the last SEUS version and I have a newbie question (as I am not an expert on how GI works).

    At my lab, we work on VR applications and we use various sets of hardware (from Oculus to 13 computers cluster for a large immersive room of 4 walls). So my question main question is : Is your solution suitable for such application ? Not only performance wise, but also regarding the continuity between many viewports computed on different computers ? I think it should be ok, but I'd like to have your opinion on this

    Also, it seems to me like reflections are also disabled in ultra ?

    i7-4900MQ
    Nvidia Quadro k3100m
    1280 x 1024 windowed
    1:43 fps
    2:32 fps
    3:20 fps
    4:17 fps
     
  44. RockSPb

    RockSPb

    Joined:
    Feb 6, 2015
    Posts:
    112
    Looks amazing as usual!=)
    I see, gi still have issues with light leaking.
    Guys, it's looks woderful in the demos, but you need to understand that leaking is gonna be huge problem in production of any sort of complex interious.

    So, I would like to repeat my questions.
    What about forward shaders? (vegetation eg)
    How it's work with transparency, particles, fog etc?

    Thanks!
     
    zenGarden likes this.
  45. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Looks really great, good Job! I'm a bit concerned about the heavy smoothing on the mouselook though. I remember the last demo had some artifacts that might be exposed by rapidly looking around, as you'd do in a third person shooter. Also, are fast moving objects causing issues? There still seems to be some kind of hard edged "ghosting" when you add and remove objects quickly. I understand if the slow fading of the GI can't be avoided. To a certain degree level design could accomodate that limitation, but sometimes you'll just want to have fast moving objects. Any idea yet how to solve such edge cases? Have you tried test cases with things like lights behind moving ventilators and other typical horror/sci-fi shooter tropes?



    I don't have much experience with the static light baker of unity, but my impression is, that even quality wise your's looks better.

    What are the requirements for shaders etc.? Can Alloy or Uber be used? Do terrain meshes work?

    Keep up the great work, I love seeing you make progress on this untrodden path!
     
  46. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Unity can now challenge Cry Engine, almost.


    @sonicether
    It is possible like Cry Engine to use it for large outdoor scenes ?
    It is possible to bake lightmaps almost real time with your plugin or it is too complex to handle the second UV and objects baking ?
     
    Last edited: Feb 24, 2016
    Cascho01 likes this.
  47. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    OK, just wow :eek:
    wow2.png
    wow.png

    wow2.jpg

    This is incredible. Sonic, are you a wizard? :D
     
    rebit, SAOTA and elias_t like this.
  48. ita333

    ita333

    Joined:
    Mar 28, 2014
    Posts:
    7
  49. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    @sonicether – Wow, this is magnificent. Truly unbelievable. So many possibilities, it's ridiculous. Just wondering if there is any chance that you might make it so this tech could be used to generate a light map? I think you said before that it seemed possible, is it anywhere on your roadmap at the moment? The possibility of allowing user generated levels to look as awesome as the one Beast bakes would be absolutely incredible.
     
  50. Haagndaaz

    Haagndaaz

    Joined:
    Feb 20, 2013
    Posts:
    232
    The lightbaking is something I have previously actually done at runtime, similar to Just In Time Lighting from Halo Forge, I could recreate it at home and make that available if that would be a desired thing
     
Thread Status:
Not open for further replies.