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

Global Illumination Proxy - GI approximation for every platform - Atrium DEMO IS UP !

Discussion in 'Works In Progress - Archive' started by nasos_333, Aug 9, 2014.

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

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Hi everyone,

    I have been working on this new lightining propagation system for my non DX11 RPG, since i could not find anything that was fast enough for my game that is already at the edge of 30fps.

    This is a system that does one bounce GI approximation using point lights and have been working on spot lights so far, getting some very good results that will play on every platform.

    This is a fast approximation of GI that will fake it to the extend this is possible and give good result on every platform. The goal is to have a very fast and easy to implement solution, that will be compatible with everything, without the need to change shaders or have complex setups.

    The system works with colliders and will work with dynamic surfaces and color changes etc.

    Here is a video of the spot light system that i plan to release in the beta:



    I would like to see comments and interest on this one, i will be working to extend it far more for my RPG, and i plan to release on the store too.

    Would you be interested in this pack (that could also work for mobile etc i guess) and would you like to see a beta version released soon or a finished product much later ? I think would be best if i got a first version out asap as beta, so comments could direct me faster to things that could be missing.

    Thanks in advance for any input and comments on the above :)

    Just to note that again, this is not for those that want a full radiosity/GI solution, but for those that want a fast cool lighting effect that tries to emulate it without making everything crawl or require DX11 and limit the game platforms. Should be best for mobile and non DX11 only games that want GI to not take much of the fps count.

    Also what do you think the pricing should be ? For the beta and after that.


    Here is a webplayer demo of the effect

    Radiosity proxy demo:
    https://dl.dropboxusercontent.com/u/79230236/RADIOSITY/BETA_1/PDM_RADIOSITY.html
     
  2. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    With and without GI proxy



    UPDATE:


    - Light grid has been added for better coverage of the light hit areas

    - The light balancing has been adjusted for an outside scene and demo level has been added

    - A "hero follow" mode allows to perform GI proxy only near the hero, at adjustable density and distance


    Demos and videos will come soon.

    .
     
  3. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286


    UPDATE:


    Point light GI proxy source has been implemented, plus many extra control variables for further customization
     
  4. mathias234

    mathias234

    Joined:
    Sep 9, 2012
    Posts:
    239
    Looks nice I just hope you don't give up as a lot of people do
     
  5. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Thanks :)

    That is the one thing i can guarantee, since my method is an approximation and i only have to make it look good enough to be used in games.

    And i am already there :)

    The goal is not to have the top quality GI, but a very easy to setup solution for use in games that need something impressive fast enough to be usuable in an actual game environment.

    My system has perks like adjustable speed and great performance (so could actually be used in heavy games and mobile) and ease to setup (basically you add just one script and is done :) ), and these come with some trade off in light smoothness and resolution in dynamic situations (but can always thicken the grid to get smoother results, plus i have added many smoothing tricks).

    For example this is a fast enough solution that i can use in my RPG game, that was the reason i started the development.

    I also have plans to have area lights at some point later after release, this is not 100% sure that will happen though, i am evaluating it right now, but seems like an interesting idea and would be nice to have as option.

    Finally, the system is best described as a light spreading AI to emulate GI, of course this AI can be enchanced in every release.

    This system could also be used potentially to auto spread lights in a scene for GI lightmapping, i may have an editor extension in later releases to allow that in edit mode (it is already possible to copy the created lights from play mode though :) and paste in edit mode for baking). But the main use will be the real time one.
     
    Last edited: Aug 16, 2014
  6. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    UPDATE: GI works very well in open spaces, i have a hero follow mode that will only spread lights around the hero, to further speed up things.

    I am now finished with the functionality of the first version (point and directional lights) and testing it in my RPG to optimize as much as possible. So far i have usuable results even in outdoor spaces using a range of 3-7 bounce lights and 3-8ms in main thread, which is something i can use in my heavy game.

    I can get good results with less lights too (for mobile), but this number seems like a good balance.

    I have tested the hero follow mode too and works like a charm :), the lights will bounce only close to the hero in open spaces and always have the correct angle etc, so it is fully functional.

    Much more testing needs to be done though, so i plan this for early September or late August at best case scenario.
     
    Last edited: Aug 16, 2014
  7. mathias234

    mathias234

    Joined:
    Sep 9, 2012
    Posts:
    239
    have you decided a price yet?

    if not i would suggest somewhere between 10 -20 $ as it will make it available for developers like me with a little amount of money to develop on
     
  8. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    I had a 20$ introductory price in mind, so anyone can help support the pack at that price and then increase later.
     
    dirtybassett likes this.
  9. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Hi nasos.

    I would be intersted to see some benchmarks on a mobile device.
     
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    I will try to test it on my Android device and will post the results and maybe a demo too. I cant say when this will be ready though.

    I use 3-7 bounce lights for good results, so performance will depend on how well mobile can handle that number of (non shadowed) point lights.
     
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Demo sequence pics (running on PC) - 20-40fps (mostly runs at 25-35fps) on my Mobile with 1-5 dynamic bounce point lights



    @elias_t

    Hi Elias, i have tested the system in my Android and get 20-40 fps (mostly runs at 25-35fps) with 1-5 lights created for bounces with smooth effect.

    If you want i can email the apk file so you can test on your phone too (if it is Android), since my phone is rather basic.

    Also this demo is compiled with forward rendering, i dont have Pro so cant tell how it would run with Deffered.

    This is my phone, for reference

    http://www.gsmarena.com/vodafone_smart_iii_975-5464.php

    Chipset Mediatek MT6575
    CPU 1 GHz Cortex-A9
    GPU PowerVR SGX531

    From this comparisson below, i can see that my Phone GPU is not even close to the stronger ones, so i would expect the system to run with far more lights in a good phone

    http://gfxbench.com/result.jsp?benchmark=glpro25&base=gpu
     
    Last edited: Aug 17, 2014
  12. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Hi nasos. Thanks for the results.

    They look good.

    Yes if it is possible sent an apk to test. Thank you.

    When do you plan to release it?
     
  13. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Hi Elias

    I plan to release early September. Also i will send the pack for free to Particle Dynamic Magic reviewers (my other asset), as an offer for August.

    I will PM you two apk files with the demo. Let me know if they look good and perform well :)
     
  14. mathias234

    mathias234

    Joined:
    Sep 9, 2012
    Posts:
    239
    If you want me to give you a benchmark from my Sony Xperia z1 send me a apk
     
  15. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Sure, i will PM the two demos :)

    Thanks
     
  16. mathias234

    mathias234

    Joined:
    Sep 9, 2012
    Posts:
    239
  17. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Wow, thanks, the system seems to have a global near 60fps performance on good mobiles.

    It is very exciting to see it work like that on mobile, cant wait to add more features

    I will put together an outside demo too and post it later, this will use a bit more lights and showcase both directional and point light sources.

    I will also try to make one with the hero mode too, which uses a system that casts GI lights only close to the hero, so can cover outside areas with minimal lights.
     
  18. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    In the first demo I get around 42 fps and on the second I get around 29 fps.

    The second demo performance concerns me because these numbers are no good for a game I want to use it...

    I forgot to say that I tested this on Xperia S
     
  19. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    The 2ond demo uses bumped specular maps everywhere, so i cant tell how much is due to the system and how much due to simply heavy load of shaders, or combination.

    What i can do is export a demo without the effect and see the difference, maybe if the scene is optimized would get better perfrormance.

    What resolution do you use ?

    EDIT: I just noticed that the maps i used were 2048 for both diffuse and bump on those rocks. I do not develop on mobile so i cant say how much that would affect performance, but seems a bit too high. Fixing a bit the demo to be more mobile friendly and will release a new version to cover more phones with the best possible result
     
    Last edited: Aug 18, 2014
  20. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    On the new demo I get 33-39 fps. Seems better!

    I plan to use your solution on underground levels with less polygons then surface levels.

    How many bounces are used in the new demo you sent?
     
  21. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Nice, this is still an unoptimized level, especially the colliders are mostly mesh ones. See pic for example (http://www.imgnow.net/uploads/714081843Demo_colliders.jpg)

    I just put it together fast to showcase the effect

    Everything you see is one bounce and only uses 1-3 point lights, the trick is to use as little as possible to get an effect that looks cool and is fast enough to have actual use.

    I do plan to add more bounces in later releases, initially though the focus will be to get the best result with one bounce and as little lights as possible, by adjusting them with the AI and parameters.
     
  22. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    ok!

    Looking forward for your release.

    This solution is ideal for indoor scenes on mobile!
     
  23. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Thanks :)

    It works well for outside scenes too, but requires more lights and i guess mobiles would not be able to handle it.

    I am finilizing two more outside demos and will send them when they are ready if you like :), i will try to adjust the PC demos i made to use fewer lights and set the AI to cover for the difference. Hopefully i can get a good trade off.
     
  24. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Anyone knows why some of the shadows from a directional light dont appear on the actual mobile phone in an outdoors scene ?

    I have set shadow distance further and nothing seems to fix it, shadows appear wrong, while appear fine in the editor. The wrong shadows happen when light comes from the left, when coming from the right side of the camera shadows appear fine.

    Any ideas ?
     
    Last edited: Aug 18, 2014
  25. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    UPDATE:

    The code is nearly finilized and i will start polishing the demos to cover a wide range of needs, from using very few lights for mobile, to thicker grids for outdoors etc
     
  26. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286


    UPDATE:


    The Palace scene is ready and works very well, it is a showcase of the GI Proxy system when combination of indoors and outdoors lighting is needed.
     
  27. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286



    And another pic with the bounce light radius of the effect turned down for more atmospheric feeling.

    I think the best result will be somewhere in between the two.
     
  28. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286

    UPDATE:


    Many new enchancements have been added to further reduce light usage and allow for thicker local grids. Plus a new example scene and demo with Sponza Atrium.

    To do list so far:

    - Add option for local short raycasts per bounce light, to further reduce the need for thicker grids and give more correct color results if a near color is not grabbed by the registered bounce light.

    - Add option for 2ond bounce lights (this will not come in the first version)

    - Add area lights (this option will hack Unity lights and will be optional and come in a later version, i am not doing screen space area lights)
     
  29. dirtybassett

    dirtybassett

    Joined:
    Oct 3, 2012
    Posts:
    59
    Been after a solution like this. Please actually release this as its looking great, as some have promised GI and gone vapour ware. :)
     
  30. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Glad you like it :)

    The difference is that this is not GI in the classic meaning of the term. So i dont rely on anything that would prohibit the release of this one :)

    Keep in mind that this is not true GI, just a clever approximation and lighting automation to emulate GI in an as cheap as possible way (hopefully). And of course can be expanded to come closer to true multibounce volume calculated GI with every release.

    I have many techniques to tackle each situation, like a special mode for using only 1-3 lights for mobile, hero follow mode for lowering needs in open spaces etc

    So far i get very good results, with a few issues like some flickering here and there, depending on how dynamic the scene is, that needs further adjustment to reduce and i am constantly adding more things to control the behavior to cover more situations.
     
  31. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Atrium using only 4-6 point lights, video and demos will come very soon (without GI PROXY top, with GI PROXY bottom)



    UPDATE:


    Just realized that the reason for the flickering was the point light limit i had set to 3 for mobile :)


    EDIT: I just finished the Atrium with total smooth results and using only 4-6 point lights. I must say i am impressed that i got such a result. This looks like real radiosity and i do nothing but manipulate point lights with the AI :)
     
    Last edited: Aug 23, 2014
  32. mathias234

    mathias234

    Joined:
    Sep 9, 2012
    Posts:
    239
    This looks amazing *_*
     
  33. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286


    Thanks :)

    And is now very smooth too, i am surprised that it looks this good with so few lights :)

    Also i just realized i have already coded an HDR system for the GI, i will start working on more options on that aspect too

    EDIT: The system is fully controllable/adjustable, everything from the light grid that controls the bounces, to the bounce color, intensity, etc can be adjusted easilly for any number of effects and atmosphere

    I post another pic where i changed two parameters, added more bounce intensity, put less ambient light and increased the sun intensity a bit.
     
    Last edited: Aug 23, 2014
  34. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    ok, release it already!
     
  35. mathias234

    mathias234

    Joined:
    Sep 9, 2012
    Posts:
    239
    :D
     
  36. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    cant wait to :)

    I would release it today if i did not have to make a manual, this is killing me everytime :)

    But i have a demo ready, so i am only a few step away from release.

    I will post the demo today if all goes well :), so stay tuned
     
  37. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
  38. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Since you have a topic in the asset store category, I'm closing this one.

    --Eric
     
Thread Status:
Not open for further replies.