Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  3. Unity 2017.2 is now released.
    Dismiss Notice
  4. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  5. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  7. Unity 2017.3 beta is now available for download.
    Dismiss Notice

SEGI (Fully Dynamic Global Illumination)

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

  1. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    262
    [​IMG]
    SEGI Webpage
    SEGI GitHub Page


    SEGI has moved to GitHub!
    SEGI has moved to GitHub and is free to download and open-source! If you purchased SEGI on the Asset Store on August 1st, 2017 or later, you will be granted a refund upon request via the contact page on sonicether.com.


    SEGI is a voxel-based Global Illumination effect that aspires to provide 100% dynamic Global Illumination to Unity games and applications. Since it requires no precomputation, SEGI can bring GI to certain situations where precomputed solutions like Enlighten cannot!

    SEGI provides indirect lighting and glossy reflections from a single directional light, the sky, and any emissive materials in the scene. In the future, SEGI will support indirect lighting from point and spot lights. SEGI calculates indirect light visibility for soft indirect shadows, and also calculates soft sky light shadows. It can render either a single bounce or infinite bounces of indirect light.


    Screenshots and Demos
    The only additional effects in these screenshots and demos are bloom, tonemapping, and anti-aliasing. No reflection probes, point/spot lights, or SSAO are used. The screenshots were taken with a render resolution of 1920x1080.

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]


    Demos (Windows)

    Sponza Demo

    Low Poly Demo

    Labyrinth Demo




    Compatibility
    As this is the first beta version of SEGI, compatibility is limited. SEGI has only thoroughly been tested on a Windows PC; behavior on other platforms is unknown. Improving compatibility is of high priority. SEGI requires DX11. SEGI is not compatible with mobile devices, and probably never will be.




    Current Limitations and Known Issues

    Known Issues
    -Infinite bounces can be slow in some complex scenes
    -Incompatible with forward-rendered objects (deferred only)
    -Light cookies on Directional Lights do not affect GI
    -Point and spot lights do not contribute to GI
    -Possible stuttering while playing in editor with the camera inspector visible
    -Undefined behavior with VR
    -Undefined behavior with multiple instances of SEGI
    -Does not work with orthographic camera (since deferred rendering is disabled for orthgraphic cameras)
    -Some voxels are black/too dark when voxel AA and infinite bounces are both enabled
    -Slight changes in positions of some objects in the volume can cause large lighting differences​

    Current Limitations

    Light Leaking
    There are two causes of light leaking under the hood of SEGI. The first is an inherent limitation of cone tracing. The premise of cone tracing is that for each traced "ray", instead of simply sampling a point of information, you get to sample an area of pre-combined information. This keeps rays that are traced in different directions more coherent and allows for tracing far fewer rays to get a smooth result. Simply put, cone tracing samples blurred data.

    [​IMG]
    This diagram compares naive ray tracing (left) with cone tracing (right)

    Now, what happens when we have a one-voxel-wide occluder in front of that light data?

    [​IMG]
    As you can see, with naive "brute force" sampling, each ray encounters full opaque black before it reaches the illuminated voxels, so no light gets through. With cone tracing, however, data is blurred which smears the occluder and the light information such that rays do not encounter full opaque black before reaching the illuminated voxels.

    The other cause of light leaking is a lack of directional light information in the voxel data. This means that, instead light bouncing forward off an illuminated surface, it bounces in all directions. This problem is helped with the Inner Occlusion Layers property and GI Blockers (see Section 4.2 of the User Guide), but is not solved completely. In the future, multiple already explored options will be considered regarding storing and reading directional voxel data to resolve this issue.
    Indoor/Outdoor Hybrid Scenes
    Mostly because of the light leaking discussed above, SEGI can struggle with indoor/outdoor hybrid scenes, especially with interiors that have thin bright walls. The use of GI Blockers (discussed in the User Guide) can help.
    Limited Scene Scale
    Currently, SEGI only uses a single voxel volume to store GI data. This means that large scenes or scenes with greatly varying object scales are not handled well. In the near future, voxel volume cascades (akin to shadow cascades) will be used to extend the GI distance and influence whilst keeping high-density data where it counts--near the camera.
    Redundant Voxelization
    SEGI completely revoxelizes everything inside the GI voxel volume every frame. This obviously is not ideal, especially with mostly static scenes, because a lot of redundant work is being done. This issue will be investigated soon in order to find a way to reduce redundant voxelization and improve performance.


     
    Last edited: Sep 20, 2017
    Alverik, AFrisby, Magiichan and 48 others like this.
  2. Brian-Ryer

    Brian-Ryer

    Joined:
    Mar 5, 2013
    Posts:
    37
    Holy S**t you have just made Unity look like Cryengine, :)
    Great job, following this thread and Once you work on the limitations this will be one of those "Must own assets".
     
    P_Jong, TooManySugar, Ony and 2 others like this.
  3. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,420
    Dude yes looks so damn sweet (yea I sound like a broken record but man I'm not even joking)...

    ...instabuy!
     
    P_Jong and RB_lashman like this.
  4. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    261
    You said It can't be used for big scenes? I have a big terrain with lots of tree can I use this?
     
  5. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,420
    For large, outdoor scenes, objects and the terrain in the distance merely need to appear to be affected by skylighting to look coherent. You wouldn't even really be able to tell there wasn't any bounce lighting or occlusion (bounce could be faked to a degree). Sure large flat surfaces such as buildings could make bounce lighting more apparent, but it isn't a deal breaker.

    I'd compare it to how we really don't have high quality distance-shadows, even with cascades rendering power is limited. Look to GTA 5 is a great example of creating great fidelity yet having to make compromises for the vast draw distances.

    Once GI cascades arrive, large scenes will obviously be less of an issue
     
    RB_lashman likes this.
  6. Unreal-Vision

    Unreal-Vision

    Joined:
    May 6, 2013
    Posts:
    58
    Thanks Sonic for release.
     
    RB_lashman likes this.
  7. christoph_r

    christoph_r

    Joined:
    May 20, 2013
    Posts:
    266
    Sweet baby jesus. This is definitely going to be one of the most important Unity assets.
     
    P_Jong and RB_lashman like this.
  8. Kombiice

    Kombiice

    Joined:
    Jan 20, 2015
    Posts:
    49
    Ow yes!
     
    RB_lashman likes this.
  9. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    805
    Looks fantastic! Congrats.
     
    RB_lashman likes this.
  10. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    202
    I have a question, would it work for emissive material outside of camera view? I am currently using SSRR to simulate realtime emission with obvious drawbacks. I wonder if your post effect can handle emissive material off screen?
     
    RB_lashman likes this.
  11. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,420
    Curious Sonic, but what occurs in VR that may or may not be working correctly?
     
    RB_lashman likes this.
  12. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    262
    Certainly. The lighting calculations are not bound to screen-space data. Any emissive material inside the voxel volume (a large volume centered on the camera) will contribute to indirect lighting and reflections (if they're enabled). SEGI can't do sharp reflections, though.

    Well, I don't have a VR headset to do testing and development (I plan to change that soon), which is the primary reason why functionality with VR is undetermined. Simply having two instances of SEGI (one for each eye) would result in a ton of wasteful calculations. I need to look into how to run only one instance of SEGI and simply do all the on-screen shading twice, sharing the same data between both eyes.
     
    RB_lashman likes this.
  13. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,600
    Nice, perhaps we will be able to choose "static" or "dynamic" Voxelization.
    Anyway good job to listing all limitations and possible future improvments, so we are not fooled about the plugin.
     
    christoph_r likes this.
  14. Haagndaaz

    Haagndaaz

    Joined:
    Feb 20, 2013
    Posts:
    216
    Even if it was possible to prevoxelize to some extent and only revoxelise new objects, although I know that would be fairly complicated to code up
     
  15. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,216
    Awesome, looks incredible Sonic! Congratulations :)
     
    macdude2 and RB_lashman like this.
  16. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    I notice that mouse movement is lagging terribly even though I get a great refresh rate. Could you release a build with the Standard Package FPSController with bobbing turned off? Is the screen space part of the GI having an effect on the update cycle or something?

    This package is absolutely gorgeous though, I can hardly wait for the release of this asset.
     
  17. jaelove

    jaelove

    Joined:
    Jul 5, 2012
    Posts:
    273
    Damn!!!!
     
    RB_lashman likes this.
  18. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    436
    incredible stuff!!! How much will be the price for it
     
    RB_lashman likes this.
  19. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,600
    Perhaps like Nottorus plugin ? above 200$ ?
     
  20. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    262
    $80 as long as it's in beta. $100 once it's been improved past the point of being considered beta.
     
    Computerkid23, Ony, macdude2 and 3 others like this.
  21. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    436
    the only light will be the directional one right
     
  22. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    I hope it doesn't require contributing geometry to be static, otherwise I can't use it.
     
  23. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,507
    Now this is not ready for action game but walking simulator just reached a whole new level of visual mindblowingness :eek:
     
    RB_lashman likes this.
  24. FPires

    FPires

    Joined:
    Jan 5, 2012
    Posts:
    148
    That's a fantastic price.
     
  25. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,600
    A simple walking simulator can use Enlighten, we already have fantastic GI if you look at Unity PAMELA game and it runs very fast as it is baked.
    Sonicether plugin will benefit procedural generated games mainly i think.
    Still if the plugin was able to bake in some second a complete scene, this is what would really matters for me.
     
    christoph_r likes this.
  26. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,507
    But not if that walking generator is procedurally generated:D, For now active element have ghosting so it's almost a no for any action game or heavily animated game (no rotating rotor, no waving vegetation). Architecture is fine though!

    At least with this current state.
     
  27. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    I noticed that movement speed isn't addressed. Is it simply a case of bizarre custom movement logic, or is the dynamic GI impacting the actual update of camera rotation?
     
  28. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,600
    I will be happy when someone will make a SVOGI plugin for Unity, it will run very fast with very good results lot better than plain simple shadows and very good for outdoors and big levels.
     
  29. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    916
    Sponza demo run very fine at 4K resolution... very impressive!
     
  30. Frpmta

    Frpmta

    Joined:
    Nov 30, 2013
    Posts:
    417
  31. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    262
    It's probably my wonky custom movement logic.

    Yeah, that might be a possibility. If the GI can be fully baked into lightmaps, sure.
     
    RB_lashman likes this.
  32. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    What does that mean?
     
  33. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,117
  34. Kombiice

    Kombiice

    Joined:
    Jan 20, 2015
    Posts:
    49
    What about nature scenes with many trees / much grass aso. ?
     
  35. ita333

    ita333

    Joined:
    Mar 28, 2014
    Posts:
    6
    I would like to use for Archiviz visualization.
    1) Can I use Substance material.?
    2) In the image that you have published interior furnishings that are near the window seem to fly . You could use along with your AO plugin ?
    3) Can I have mirror material or similar?
    4) Image seem a little dark , you can adjust the gamma or other parameters without burning colors?

    Your work is incredibile ..... My compliment?
     
  36. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,507
    I don't remember does number of polygon affect performance? I'm interested in low poly aesthetics, not flat shaded like your example, game like ds game.
     
  37. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    532
    Hi Sonic, Congrats on the beta! I've dabbled with some VXGI techniques to see where a naive implementation gets you, and you seem to have squeezed order of magnitudes more out of it than standard techniques. Even low+128 settings look pretty great and runs on a shoddy laptop.
    Ill do some tests in VR when it's out. If you figure out how to share the voxelization & mips per eye this might be feasible for small scenes in VR. Will it come with source?
     
    RB_lashman likes this.
  38. GMM

    GMM

    Joined:
    Sep 24, 2012
    Posts:
    296
    I keep throwing money at the screen and the asset is still not downloading! :)

    I have been following SEGI for quite some time now and i hope that Unity puts it up on the asset store soon, since i would really like to play with it and see how it fits into my projects.

    Keep up the great work.
     
    RB_lashman likes this.
  39. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,214
    Since this doesn't support point lights, would you be able to get a decent-looking torchlight by having the player hold a torch with a highly emissive material? What would be missing compared to a point light?
     
  40. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    @makeshiftwings

    To add to that question. Would it be possible to force an emissive object to occupy at least one voxel at all times?
     
  41. amasinton

    amasinton

    Joined:
    Aug 12, 2006
    Posts:
    117
    I've been watching this for a long time. SOOO excited it has been submitted to the Assett Store!

    Naive question(s): Would a non-DX11 version ever be a possibility? Why is DX11 absolutely required?

    I'm primarily a Mac developer (although I do a bit of PC too) and I just wanted to know what the main thing is that stands in the way of this running on OS X (I suspect Apple's foot-dragging on OpenGL / OpenGL in general...).

    Thanks!
     
  42. Greenwar

    Greenwar

    Joined:
    Oct 11, 2014
    Posts:
    34
    Hey there,

    This is some really cool stuff. I decided to test the sponza demo out, and this is what it looks like to me:
    [​IMG]
    This is on 1920 x 1080. DX11 on a r9 200 series. "Fantastic" quality settings. Switching to any presents below 4 causes the lighting to flicker.

    I've tried most setting and combinations without much luck.

    Am I doing something wrong?
     
  43. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    262
    Perhaps it would be better to have an invisible sphere of a decent size (big enough to occupy a few voxels) that doesn't draw on-screen but contributes to GI, and perhaps additionally a point light with shadows.

    How many voxels an emissive object occupies depends on your voxel volume size and the size of the object... I was thinking about having special non-geometry voxelized objects for special purposes like virtual GI lights... Maybe I'll explore that in the future.

    Voxelization requires Unordered Access Views and applicable atomic functions which are DX11 only features.


    Hmm, looks like I've gotta look into that. If you do end up buying the asset, please PM or email me and we can work together to solve this bug. Of course, make sure your graphics drivers are up to date as well.
     
    amasinton and RB_lashman like this.
  44. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    349
    This looks pretty ;)
     
    RB_lashman likes this.
  45. Zuntatos

    Zuntatos

    Joined:
    Nov 18, 2012
    Posts:
    408
    "Unordered Access Views" are supported by openGL, but not by MAC (they prefer updating metal over a competing openGL). Atomic functions are in openGL too; but I'm not sure how to write them in unity in a crossplatform way.

    @sonicether Are the shaders written in HLSL directly or in unity's shader language?
     
    amasinton likes this.
  46. SAOTA

    SAOTA

    Joined:
    Feb 9, 2015
    Posts:
    220
    So exciting. Thanks SE. Waiting for the Assetstore!!
     
  47. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    781
    This does look amazing, I tried the low poly demo but I am only getting 6fps, is it expected that you need a serious high end 3d card for this to work?
     
  48. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    262
    I simply meant UAVs are not supported by DX9. And they're written in Unity's shader language.

    That's a lot lower than I recall anyone else reporting.. What graphics card are you using?
     
  49. Mad_Fox

    Mad_Fox

    Joined:
    May 27, 2013
    Posts:
    45
    Waiting like a maniac! SE i have a question, we are already using your other two assets in our project, do you plan to make the three work together in a more optimized way, make a suite, or something like that?
    Thanks and really looking forward to this.
     
    RB_lashman likes this.
  50. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    781
    It is a Radeon 6870.