Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Completely Real Time Global Illumination Using Light Propagations

Discussion in 'Assets and Asset Store' started by brilliantgames, Oct 24, 2014.

  1. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Vsync is on.. my laptop gets 60 fps. the demo is just capped off at 60fps. Ill take my gtx 980 over all of your titans... just cause your titans wont even support dx 12 :D
     
  2. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    I get it when I move the light, on both left and right walls and the light goes side to side I get the flicker, when the camera rotates no issues at all...
     
  3. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    Yeah well DX12 or no, when I set off a render in Octane or iRay, not only do they burn through the frames but it heats the house as well... 2 for 1!:p
     
  4. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,992
    I suppose the camera rotation would be over the already calculated solution, so it should not give an issue.

    Another interesting thing would be moving objects, does the solution update when objects move like when light moves ?
     
  5. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    If you right click and go to full screen, vsync will turn off and you can see a more accurate FPS reading. Though I'm pretty sure webplayer caps out at 200 FPS. On a PC DX11 build the scene runs around 300 FPS for me, and 500FPS when the GI is static.

    I have seen the 'flicker' happen before. It seems to happen at low performance and I think it happens when a probe goes out of sync with the main volume update. I'm not sure why this would ever happen but I've seen it happen a few times. One thing I do know is it does not happen with a single bounce of lighting.

    Edit: Objects moving have no effect on performance. And yes if any objects in this room demo moved they would update. The reflections won't look that nice with movement though cause they are such low res, so you are essentially getting aliasing on a 32,32,32 texture. :)
     
    Last edited: Nov 5, 2014
  6. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    mm the demo is the room with the ball etc right? What about a bigger scenario such as the village or so.

    I get 59 FPS on my GTX 560Ti
     
  7. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937

    If you want to see your actual FPS, right click and go full screen. But even then it will cap at 200fps.
     
  8. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    question if performance is so good now.. why not make the texture larger?
     
  9. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Because it gets exponentially slower. 64x64x64 is the highest you can currently go before it gets to the point where it's not usable in real time. As soon as you jump to 128x128x128 it lags way too much, though you can easily have static GI up to 256x256x256, and hopefully dynamic GI when I implement DX11 compute shaders. That would be interesting to say the least if it was able to run fast at a crazy resolution like that. Another reason why it gets even slower is because the probes in turn must now render at the higher resolution to make sure the missing pixels are filled in.

    Here's a break down of what we are dealing with and why it gets slow so fast.

    32x32x32 = 32,768 Pixels. Sounds like a lot right?

    64x64x64 = 262,144 Pixels. Wow that's 8 times more?

    128x128x128 = 2,097,152 Pixels. See where I'm going with this? :)
     
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,992
    Is there any plan for release date and price ? Seems trully amazing so far and the performance i see reported above is also great :)
     
  11. Stormbreaker

    Stormbreaker

    Joined:
    Aug 15, 2012
    Posts:
    161
    This is seriously impressive! 40FPS fullscreen with a Macbook Air 2013, integrated graphics. Can't wait to see more.
     
  12. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Any plans for a static gi mode? And would that mode update reflections? Doesnt sound like it would.
     
  13. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Static GI is static, so reflections work, they just don't update. And are you aware the demo has a toggle static gi?
     
  14. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    I see what u mean now. Also i did notice some very minor flickering if try to pay attention.. not on the fullscreen enabled, but when the vsync version is on only..
     
  15. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    In my eyes your way is the only way to do day and night scenarios... screw baking cubemaps for every time of day...

    Curious when will you think you can get into doing the dx 11 stuff.
     
    Baldinoboy likes this.
  16. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    256x256x256 would be really cool to see. Hopefully in the future :D
     
  17. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    OK, 200FPS full screen.
     
    brilliantgames likes this.
  18. Howard-Day

    Howard-Day

    Joined:
    Oct 25, 2013
    Posts:
    137
    Looks awesome! I would like to see a larger scene, perhaps that outdoor village. But from what you've shown so far... really excellent!
     
  19. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    is there cubemaps used on wall and ball? or its realtime reflections? i mean, if i move boxes, i will see changes in reflection?
     
  20. al3d

    al3d

    Joined:
    Feb 7, 2013
    Posts:
    51
    Hi it's awesome !

    zelmund > yes it's real time reflections use the left/right arrow keys in the demo and look the sphere

    Is it possible to have an example with 256x256x256 gi (with static on) ?
    (sorry if my english is bad im french)
     
    Last edited: Nov 6, 2014
  21. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Curious, would it be able to have 1 object or 1 room have higher resolution reflections then others? could work nicely for mirrors.. or places with particular detail.
     
  22. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Hey just noticed the flickering.. if it helps it only lasted for a moment but it was hugely apparent. The way i caused it was i loaded the demo, played with it moving the light around, then went and watched your youtube video in a new window.. clicked the tab to the demo again and the flickering was instantly apparent but then went away in a second or 2.
     
  23. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,444
    DUDE, THIS IS F***ING UNREAL (no pun intended)! I love how clean everything in the level is... I've been wanting a quicker GI solution than Beast (I LOVE LOVE LOVE Enlighten) but this opened my eyes. Will this work with PBR shaders like Alloy?

    And the demo is VERY impressive... I get 150FPS on my laptop, but I will probably get less running my game at 1920x1080...
     
    Last edited: Nov 7, 2014
    brilliantgames likes this.
  24. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Village Benchmark DX11
    Alright everyone. Here is the demo everyone has been requesting. The Village DX11 demo. As a warning, this is an expensive scene(Even without GI). It's meant to push the GI to its limits and I built it as an intentional challenge. I finally feel comfortable enough to share it. Some changes were made to the GI diffuse algorithm and it is currently a bit more expensive than it was, however it is much more accurate. I am working on optimizing so the performance in this demo is definitely not final.

    Enjoy. Happy Friday!


    Some Things To Note Before Playing..

    - GI texture is 64x64x64, which is fairly high resolution.
    - 2 real time probes are active in this scene. One for directional light, and one indoors for emmissive fire light.
    - There is only one direct light which is the directional sun light. The fire light is a completely dynamic result of the GI. There are also no GI volume lights in this scene.
    -There is some flickering in certain areas while the sun is rotating due to aliasing in the low resolution of the 3d volume.


    DX11 Village Demo: https://dl.dropboxusercontent.com/u/65183439/VillageBenchMarkDX11.zip
     
    Last edited: Nov 8, 2014
    8Infinite8 and KRGraphics like this.
  25. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    breath taking, I will say the fps is at around 80-90 for my gtx 980, which i'd like to get some better performance out of it hopefully with one of my scenes.. I dont know how well thato ne is optimized. My product will be on the occulus rift so i need 75 fps solid on weaker machines.
     
    Last edited: Nov 8, 2014
  26. zRedCode

    zRedCode

    Joined:
    Nov 11, 2013
    Posts:
    131
    Tested web player on my HD6450 2GB GDDR5 and my Intel G860 Dual core 4GHz (overclocked) minium 29 FPS, Average 40 FPS, Max 45 FPS. Really lightweight!
     
  27. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,992
    This is one amazing system, very cool.

    Is it possible to have an option in the demo to disable the system completly, to see the exact difference in performance with and without it ?

    Also the file says DX11, but i think it uses DX9
     
  28. Stormbreaker

    Stormbreaker

    Joined:
    Aug 15, 2012
    Posts:
    161
    I second that, having the option to toggle the GI will show a better example of how heavy the GI system is.
     
  29. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    That is a very good idea
     
  30. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    165
    Running on an R9 280x at 60 FPS - looks great but there is a little judder when moving.

    With static GI it's about 70-80 FPS and there is no judder.

    Not really sure what the difference between GI and static GI is atm, they look the same.

    Looking good :)
     
  31. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    165
    Forgot to mention my screen resolution is 2560 x 1440.
     
  32. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    when its static it doesnt update... with the gi mode it updates constantly.. means those reflections change depending on the scene. Truely dynamic.

    Also now that you mention that... i also notice a judder when moving .. almost choppy even though im getting 90 fps. This is only in dynamic mode not static mode.
     
    Freddy888 likes this.
  33. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    I notice the judder in this demo too. I think its a sync issue rather than a performance one though as if I turn off dynamic GI and then turn it back on again it often becomes synced and looks perfect. Also there is less judder when I turn on light rotation which I am assuming if anything would give it more work to do. Also people with more powerful machines than mine seem to notice it more. I think you need to put wait statements in to sync threads or use fixedupdate or lateupdate functions to ensure frametimes are consistent and all rendering processes are synced. You could even make it so that people could choose at what interval the specular reflections were updated so for example have them caped at 30 fps on lower end hardware.

    Also when are you planning to release this ? Is it planned to be an update to your BG Light Engine package ?
     
  34. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Currently in this demo, the GI updates every 10 frames. The jitter happens when the 64x64x64 texture is created on the tenth frame. Keep in mind, once I implement cascading (One of my next tasks) you will be able to have 3 32x32x32 textures that cascade outwards, which will actually be cheaper to process than a single 64x64x64 texture.

    For release date, my goal is to release this before the end of the month. That is all the info I can give you. :)

    Edit: PS, if anyone is feeling board, I have a challenge for you ;). It is possible to parkour your way to the top level of the wooden tower. Whoever posts a screenshot of themselves sitting on the top platform wins!.... My appreciation! :D
     
    Last edited: Nov 8, 2014
  35. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Awesome dude.. i jsut hope theres no studder when u release. that can make or break VR
     
  36. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Oddly enough thats the first thing i did when i was in there... lol... jumpn up the stones and then falling through the structure cause therees no collider and then off the cliff... when the environment is a mile away i get 300-400 fps :D
     
  37. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123

    Thats another idea for the cascading.. if it updates much less with distance :p
     
  38. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
  39. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Exactly. ;) The only thing is, now it will be harder on the video card having to process 3 different volumes. Should still be do-able in a single pass though(As well you will be able to choose per material if you want cascading, then only have large objects have cascades). Though it may be possible to not process the other 2 in DX11 because of dynamic for loops. There are still a ton of limitations for controlling for loops in real time though on DX11.

    @Pulov You parkour pro you. :p
     
  40. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,366
    Perhaps the gi should be updated only if an object that contributes to the volume moves
    or if it is a light, its properties change.
     
  41. 8Infinite8

    8Infinite8

    Joined:
    Jul 27, 2013
    Posts:
    112
    Very cool demo. Shame about Unity's awful shadows. I hope they fix these in U5.

    Have you thought about your own implementation of SSR?
     
  42. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Alls i care about is that the studdering stops if we can. And the less trouble on the gpu the better... Its hard to ask for the best of both worlds(speed and graphics), but this real time stuff will be epic from a developers standpoint.
     
  43. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Yes you are asking a lot hehe..

    @elias_t That wouldn't work. Too many things to keep track of. You would have to monitor every single material for changes in color, emmissive everything, not to mention potentially thousands of object transforms and lights.. This is why I leave this up to the developer, if he has a game with a day night cycle, update the GI in increments throughout the day.. Simple as that.

    @8Infinite8 I actually have made my own shadows before. But I have mentioned before with this current update, don't expect to see anything other than GI. ;)
     
  44. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    will we have the option of using the cascades or the other version? I prefer the version that is best for performance obviously.
     
  45. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,366
    Well, if you consider that the main geometry, trees etc are static and you do not allow characters to contribute to the gi
    then the objects you have to track are not so many.

    But if you made your code so a user can do the above if he wants to, then its ok by me.

    Also, I don;t know how you create the gi volume. But would it be possible to create it progressively along xx frames?
     
  46. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    The user has full control when the GI is updating and when its not, you can see that in the demo with the 'static' button. And no unfortunately you cannot create a texture in a spread out amount of frames. It's a unity function, though maybe I can dig in and find the source code and modify it, who knows.
     
  47. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    A single Titan runs the scene beautifully 90 - 150 fps with dynamic only.

    When sun rotating i see jitter and banding but no affect on fps.

    Looks gorgeous!

    Oh I forgot, 1920x1200, Fantastic
     
    Last edited: Nov 9, 2014
  48. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    Just thought I'd say how the demo ran on my hardware. For me the judder at normal settings (1920x1080, fantastic quality) was really bad, definitely unusable as it is. Turning static on and off did not fix the judder, though of course there was no judder with static on. The displayed frame rate was also very erratic, seeming to jump up and down by 10-20fps constantly (26fps low, ~50fps high). This is on a laptop with an i7 and a 680m. There is also an IGP with Optimus so I checked to make sure it wasn't running on that mistakenly. I also tried lowering the Unity launcher quality to fastest, had little effect. Lowering the resolution however did - I tried it at 720p and the judder was no longer noticeable, or almost so (I was also getting a more consistent 90fps which may have been why).
     
    KRGraphics likes this.
  49. boundingbox

    boundingbox

    Joined:
    Mar 31, 2013
    Posts:
    30
    1280x720 windowed and full screen was very smooth with dynamic GI. displayed 100-200 fps
    1920x1080 windowed and full screen had judders with dynamic GI but was smooth with static GI - displayed 50-120 fps
    i7-4930, 32 gig ram, GTX 770

    The dynamic GI felt like it ran about 10 fps, though it displayed 100 fps at times. Static GI was judder free. I don't know how this works so I'm not sure where the bottleneck could be, it might not even have anything to do with the GI since it was resolution dependent. If it is a slowdown from the GI, using a compute shader may solve the problem. To keep things more compatible have you considered a threaded co-routine? As it only updates once every 10 frames anyway it seems like a good candidate for threading. You may be able to get more updates and remove the judder.
     
  50. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,444
    I was experiencing the same issues as well... i will have to run the demo again with nothing running in the background.