Search Unity

Completely Real Time Global Illumination Using Light Propagations

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

  1. Phelan-Simpson

    Phelan-Simpson

    Joined:
    Jan 1, 2014
    Posts:
    31
    Quick Question Brilliant Games

    Are the reflections fully real-time and reflect both diffuse colour and specular? Also, if I wanted to, could I take this system and combine it with enlighten? Could I get the benefits of enlighten as well as the real-time reflections and GI from your package at the same time? If not, Is there a way to use the reflections with enlighten?

    Cheers and Thanks,
     
  2. chiblue3D

    chiblue3D

    Joined:
    Apr 25, 2012
    Posts:
    19
    Nice solution, very impressed but given the support Brilliant Games provides on their other assets I would seriously not consider purchasing this asset. The Dynamic Navigation has no support, no documentation or responses on the forum... very sad really as the solutions appear to be well thought out.
     
  3. angelodelvecchio

    angelodelvecchio

    Joined:
    Nov 15, 2012
    Posts:
    170
    i remember people
    condemning you! hell yeah ! make them pay !
     
  4. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    Any new cool screenshots you can share?
     
  5. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,682
    When is this releasing ?
     
  6. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    I apologize for my silence. I have been secretly working on a large transformation in this system. It involves porting the entire system to use 2d textures. I have the basics working already as we speak. This means the system will now work on Unity free, and for Unity pro, everything is now done on the video card because of render textures. No more CPU work. Using render textures also means resolution has very little effect on performance. On top of everything, it now has really no similarities to Cryteks Light Propagation Volumes, so it's now a completely original solution. I will have more details and screenshots on this when it's ready to show. I apologize for how long this has all taken, but I truly believe this transformation was necessary.
     
    jason-fisher and blueivy like this.
  7. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    You're doing some really cool and innovative stuff with unity. No worries! :D I can't wait to see what this transformation has allowed visually.
     
  8. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    Thank you. Right now diffuse lighting is going to be the most difficult adjustment so that's what I'm working on now. However I already know specular reflections are going to look glorious with the ability for uber high resolution. :) Another improvement with increased resolution is less flicker.
     
    blueivy likes this.
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,682
    Is there a way to eliminate the flicker completly by using a bigger impact on performance ? Will this be adjustable ? Or is the overall performance affecting this flickering ?

    Also is there a release date ?
     
  10. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926

    Flickering is mostly cause by the fact that real time GI is low resolution.. When an object or light changes position, the light reflected is a large block(because it's low resolution), when that large block suddenly moves a whole block over, it can be seen as a significant change in lighting, basically you are seeing the result of aliasing within the lighting. And sorry, I still can't give a release date.
     
  11. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    Are you sure everything is going to play nice with the transformation to 2d textures? As in, has it been tested or is it ongoing?
     
  12. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    It is on going. I have diffuse working somewhat but I can't say for sure it's going to be good enough. Either way if it doesn't work out I would probably still release it as a separate asset for Unity free users. :)
     
  13. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    915
    Hey "Brilliant Games", it seems you are much closer to a solid GI solution. Me Happy. But no any news for quite a while now at least for me :D. I am worried(Oh NO). Share something :) ?
     
  14. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    Yes I apologize, It's not because I am having difficulties with the project itself, it is because I am currently working 7 days a week. Yes I know it's bad timing considering I am near the end, but this is why I haven't given a release date. My schedule is very unpredictable and I need to make a living. Things should be clearing up in the next 2-3 weeks hopefully.
     
    blueivy likes this.
  15. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    915
    It is ok don't rush it ;). Really good work!
     
  16. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    Would love to see this scene with the new 2D texture technique whenever your schedule permits! Just for comparisons sake :D
     
  17. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    When it's ready to show. Though in the process I did create a more faked GI with a single 2D texture. It sorta treats the ground like a giant area light, only really works as an accurate 'ground light' though.

    This is what it looked like. This method is VERY fast. Yes it would work with Unity free. But keep in mind this method is very limited. The GI can only be projected from a single direction. Reflections could be possible doing simplified raytracing. It's unlikely I would ever build on this method, though someday I might release it as a separate solution for mobile and people who want a very fast and simply dynamic GI for outdoor environments.

     
    Last edited: Dec 23, 2014
  18. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    I definitely can see that as a mobile solution. One thing i do wonder ever since I played around with the cornell demo, can all objects cast indirect shadows? And could that replace standard ao?
     
  19. angelodelvecchio

    angelodelvecchio

    Joined:
    Nov 15, 2012
    Posts:
    170
    hi brilliant games! any news !? version 1 could be our new years gift ! uniyt5 gi is not convincing, please help us!


    Many thanks !
     
    blueivy likes this.
  20. CWolf

    CWolf

    Joined:
    Oct 24, 2011
    Posts:
    106
    Just asset looks excellent. Eagerly waiting for updates =).
     
  21. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    Looks like I'm finally going to have some time to work on this in the next week or so! A special thanks to those who have waited so patiently! I apologize for the wait but I had to pay bills, I am an indie just like you guys.
     
    jason-fisher, CWolf, blueivy and 2 others like this.
  22. JecoGames

    JecoGames

    Joined:
    Jan 10, 2013
    Posts:
    135
    Any updates to share? It looks like with unity 5 you'll be able to support unity free since it now has all the features of unity pro.
     
    Baldinoboy likes this.
  23. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,305
    3D texture support! Should work in personal.
     
  24. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    Hey everyone. I have been hard at work on this project the past few weeks. I don't want to give anything away at this point but I will say, all is going well. Yes I am very aware of the situation with Unity 5. Though I have decided to stick with 2D textures for this release. I have not yet found a way to modify/create 3d textures on the GPU in real time. I'm sure there may be a way to do it in DX11 but I am very happy with the results I am getting with 2D textures. It's fast enough to run on mobile and looks very nice, full diffuse and specular reflections. I am currently on vacation in Hawaii but have still been working on this system on my laptop. This will also run on Unity 4 free. I will post screenshots and updates soon. More likely closer to release.
     
  25. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    Dynamic GI From 2D Textures


    Nearly done guys. Completely dynamic GI with specular & diffuse reflections, plus pre computed indirect shadows and high resolution skylight occlusion/shadows all which can dynamically move with their parent once calculated.

    I will give you more information on how this system works soon.

    In the mean time, I'll let these beautiful screenshots speak for themselves.










     
    Venryx, Vagabond_, Baldinoboy and 2 others like this.
  26. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,174
    The screenshots rock.

    Have you resolved the hiccup every xx frames that the previous demo had?
     
  27. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    525
    so is this possible on direct x 9 ?
     
  28. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    Oh my lord :O it's beautiful!
     
  29. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,305
    Great job brilliantgames. What makes me excited is the performance benefit of 2d textures. I think the last demo you showcased used 3d textures and my machine struggled with it. So looking forward to a demo with the new system.
     
  30. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    This is looking good.;)
     
  31. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    Thanks guys. I will admit there are a few draw backs to how this system works, but the final result looks better and runs around 20 times faster than the volume GI did. I will go over its features and limitations.

    Features:

    -Full, completely real time diffuse and specular reflections.

    -Pre computed indirect shadows for occluded areas, which are dynamically cast and once computed can follow the occluded area(So you could compute indirect shadows for an entire building, then make it into a prefab and drag into any scene).

    -Roughness and specular maps.

    -Extremely high resolution reflect textures at almost no extra cost.(Whatever the cost is for the render texture, I've rendered complex scenes at 2048x2048 and it ran fine).



    Drawbacks:

    - Real time specular and diffuse reflections are limited to being below the horizon line. This was the largest draw back to this system but in outdoor environment is not noticeable because the rest is then filled in with a background cubemap which can be auto-generated with this system.

    - Limited to mostly outdoor areas. Occlusion maps are a life saver for this problem though. They enable proper transitions from indoor to outdoor with beautiful soft indirect shadows coming through windows and doors.


    After release my first objective will be to find solutions for diffuse and specular for indoor areas.

    Obviously the 2 things which count the most with a complex problem like dynamic GI is: It looks beautiful; it runs fast. Both are a big YES, which I am very pleased with. :)


    I will leave you with some comparison shots of the car scene with my GI and with Unity standard shaders(Note the indirect shadows from the car and the tunnel).

    Brilliant Games GI:




    Standard Unity shaders:

     
    Vagabond_, elias_t and blueivy like this.
  32. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    That comparison shot looks amazing. I can't imagine what It would look like with some shiny physically based shaders :D
     
  33. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    These shaders are as physically based as they come. :p The whole system relies on physically based lightning. As something to note, those mountains you see in the background, are not in the background. They are there and the GI is even taking them into account. The GI texture in this scene is 2048*2048(Look very closesly and you can see the reflection of the lines on the road on the car).
     
    Last edited: Mar 15, 2015
  34. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,682
    Super cool :)

    Is there any planned release date ? I would love to use this instead of baking for sure.

    How does it perform in extreme detail environments ? (forests etc). Is it affected a lot by the environment detail ?
     
  35. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    The difference is brutal.
     
  36. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    379
    difference is not correct... U5 do same precompute task and do same picture with light and shadow.
     
  37. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,682
    A Unity 5 comparisson would be nice to have as well, though this system does not need any precompute if i underastand right.

    Even more interesting would be a detailed comparisson of performance between the two and what extra features can be done with this approach vs Unity 5 real time pre-compute based one.
     
    Last edited: Mar 16, 2015
  38. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    What? Why is this?
     
  39. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,305
    Unity 5s' precompute does not work on my computer. A small scene with 1-3 objects takes about half an hour. I have not had the patience to wait for a full scene to precompute. 16+ hours is ridiculous and to me not considered Real-Time. So no Unity 5 GI for me. I still love the new lighting. The scene with no GI still looks amazing but it would be nice to try it out with this GI.
     
  40. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    915
    Precomputing in U5 is really slow for me too... It is almost unusable. Waiting for BG Light Engine : )))))
     
  41. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    @zelmund The main differences between the 2 systems is that one is completely dynamic, and the other is not. The only thing that needs to be computed are the indirect shadows. That tunnel took about 5 seconds to compute, plus I can now move that tunnel around and the indirect shadows move with it.

    Real time high resolution specular reflections are also a huge plus with this GI. Get high resolution real time reflections on any surface with roughness and specular maps at almost zero cost to performance(This is because specular is a direct result of the GI), I personally think that feature alone makes this package worth it. No bake time, no 'reflection probes', no 'light probes, can work with procedurally generated scenes. There's no end to the possibilities.

    Don't get me wrong here, Enlighten looks beautiful, but they should not have labelled it 'dynamic'. :)

    @Zeblote It's a sacrifice that was made mostly for performance. I admit this is the biggest downfall of this system but my main concerns were beauty + performance, and I think the end result handles both quite well. :) In the end I created a completely Unique method for completely dynamic GI, fast enough to run on mobile.
     
    blueivy likes this.
  42. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    It looks phenomenal and the speed of it is a big plus! :D do you think this asset woul be compatible with Jove?
     
  43. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,682
    Enlighten can be dynamic if you have access to a Super computer :)

    For anything else i cant wait to test your system :). You think it would work nice with a custom shader for Unity 5 skybox, like the one i use in Sky Master ?

    Also will it handle any new incoming lights or on/off point lights in the scene in real time ?
     
  44. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    333
    What would the performance hit be if you got rid of the horizon constraint. If I were you I would deal with performance how Unity 5 does in that it has quality levels so performance isn't an issue. I think most people wanting dynamic GI will probably not be on mobile anyway. I would be inclined to set the performance level you are targeting to be around the spec of the xbox one with options to turn down the effect so that for example if they are on a lower spec machine they get no gi but higher performance.

    Also any chance you can put up a web demo. The performance of your previous demo actually wasn't too bad in terms of processing I think there was something else going on with it giving inconsistent frame rates resulting in judder or it wasn't sending and updating the lighting at the same interval. It was strange that it often seemed to run smoother on lower end hardware for example which made little sense.

    The screenshots look great I would love to see it in motion. Also are you saying that your technique allows dynamic objects to contribute to the gi not just static ones like with enlighten ?
     
  45. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Alright, well, how much is the performance difference? What if you add a toggle option so you can have full version on desktop gpus and half version on mobile?
     
  46. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    I don't even know what a horizon constraint is so I didn't even question it, but does it make a big difference visually?
     
  47. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    525
    any chance for a video or web demo ?
     
  48. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926

    Basically the diffuse and specular are projected upwards while at the same time, smoothly approximating the general direction the indirect light is coming from. This solution makes it ideal for outdoor areas because most indirect bounces will be coming from the ground. The rest of the indirect light comes from the sky or background cubemap. Because of the simplicity of this system, the light looks very smooth and natural with no 'voxel' type artifacts. An example of a limitation is that light would not bounce off of a vertical wall.

    I am working on improving this system and I'm sure we will see less constraints in the future. However I think this is just about ready for release because it looks beautiful and runs lightning fast. :) And you know how high my expectations have been. ;)

    Note: I have been asked many times about compatibility with other physically based shaders. Yes I will do my best to make integration with other shaders as easy as possible. But physically based is.. You know.. Physically based.. It's simple math which the global illumination handles perfectly on its own. It wouldn't make sense to use another physically based solution because they revolve around static cube maps.. Would be very pointless to have static cubemaps pasted over top of real time diffuse and specular reflections...
     
    Last edited: Mar 16, 2015
    blueivy likes this.
  49. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Being fast will make the difference with the fancy built in GI of u5.
     
  50. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    So, the indirect light in teh tunnel comming from the tunel tube would not work right?