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

Realtime GI System - Indirect Ilumination (WIP)

Discussion in 'Assets and Asset Store' started by CKahler, Jul 23, 2013.

?

Do you need a realtime GI system for your game, and how much money would you spend?

  1. Yes, but only for free !

    97 vote(s)
    36.6%
  2. Yes, I would spend 200 Dollars for it !

    147 vote(s)
    55.5%
  3. No, I don't need it !

    21 vote(s)
    7.9%
  1. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,086
    Could you reduce the VCT update rate to every 5th frame or something?
     
  2. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Woah that's excellent! I'm eagerly waiting for the next sponza demo with no flickering! :D

    Also, in the next demo could you please slow down the camera translation a little so we can see how smooth movements look? Thanks!
     
  3. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I would also like to know (for both the original current technique) how much of the work goes into the cpu, gpgpu, vertex fragment shaders respectively (how well will each one scale with higher poly count vs higher resolution etc).
     
  4. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Good to hear Chris!

    So what is or will be the state of skylighting and ambient occlusion? Essentially the things that made the SH scene so gorgeous...

    ...speaking of which your performance numbers in that video were nice, and unless you were running on a Titan or have awesome, unreleased prototype tech, it seemed quite good for the fidelity you got. Heck half that quality would be fantastic!

    Lastly, have you considered something comparable to what ENB had been able to achieve with Skyrim using SSAO, Skylighting and SSIL? Considering ENB is just a shader wrapper/injector, the game can look damn near photorealistic and runs nicely on my Alienware m17x which is a mere 580m GPU (note the 'm' there!). Point being that there can be alternatives that give a close approximation of GI that looks fantastic without completely sacrificing performance.

    Cheers

    -Steve
     
  5. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,086
    I spent like 20 minutes trying to figure out what ENB stands for. Why do they name something an acronym if its not a real thing!?
     
  6. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Haha, yea ENB itself means nothing (well anecdotally it's perhaps the name of a character in a cartoon the creator watched as a child in his country), but it's become synonymous with the graphics modding scene, notably GTA4 and Skyrim.

    For those interested just Google Image: Skyrim ENB and perhaps throw in Skylight or SSIL. I couldn't decide out of the endless number of images which to choose as so many are so good, I figured it would be easier (and more rewarding) to just Google for yourselves.

    ...but this caught my eye so what the heck!

    $ibce7Ni9HyAntf.jpg
     
  7. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,086
    Last edited: Oct 2, 2013
  8. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Oh rock on Prime and that right there is a great link. Read that a while ago so I'm thrilled you found it for me again! :D
     
  9. the_nomad

    the_nomad

    Joined:
    Jun 22, 2013
    Posts:
    15
    SSDO is a great algorithm, yeah. I've been vaguely considering having someone implement that in Unity for me, so if anyone wants to do so and put it on the Asset Store, you've probably got at least one customer...

    Anyone know what the screen-space algorithm that ENB uses for its SSIL is, btw? I've not been able to track that info down.
     
  10. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    I can add SSDO to the package, if you like... ;-)
     
    Last edited: Oct 4, 2013
  11. krassi

    krassi

    Joined:
    Nov 6, 2012
    Posts:
    19
    like,like,like!! ;) that would be awesome.. im really looking forward for this, it really gives unity the look and realtime light it needs..
     
  12. erana79

    erana79

    Joined:
    Jun 26, 2013
    Posts:
    61
    The more options the better!
    As long as we get an openGL version too :)

    Good job, CKahler! I'm really keen on this asset (once i can fool around with it on my mac).
    And yes, if it has all these nice features, 200$ is totally appropriate.

    There are faaar worse assets around that are more expensive.
     
  13. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    Hi,
    I updated the demo: http://sdrv.ms/GAPFEV

    Next step is to fix the stepping issues when you move the camera and the multiple grids (in the L-shape tunnel level) are not so performant at the moment, however it's getting better :)

     
  14. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Looking real good Chris.

    Any update on a proper skylighting? I noticed there was a blue ambient tint to the world, but no actual sky illumination.

    Getting there!

    -Steve
     
  15. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Yeah, that looks really good now! Flickering is greatly reduced and I can't wait to try that with my own assets. I really, really wonder how this is going to play with all the shaders I use.

    Anyway, I'm sure you already know that but strange things happen in the L-shaped tunel when rotating the camera. This is standing on one spot:

    $ScreenShot041_1.jpg

    And this is standing on the same spot but looking slightly down:

    $ScreenShot042_1.jpg
     
    Last edited: Oct 4, 2013
  16. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    Everything looks great! I know this is so trivial but the lack of ambient occlusion of objects in indirect light was really noticeable.
     
    Last edited: Oct 4, 2013
  17. Loards

    Loards

    Joined:
    May 2, 2013
    Posts:
    112

    This Demo look really amazing this time!!! getting near !

    About the problem in the L shape tunnel, this happen also in the default scene with the ground.
    Also, the sun can pass through the 2 floor to first floor, and that illuminates the first floor too.


    $2floor.JPG

    $1floor.JPG


    Im really excited to get this demo soon D:
     
  18. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,446
    hey Chris, what are the specs of your system? I am still getting below 30FPS in some shots...
     
  19. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    @seith: that's the reason: "Next step is to fix the stepping issues when you move the camera"

    @Loards: in the sun case, it just shows that the occlusion is still missing, I'm working on it.

    @Neptune_Imaging: I'm getting over 190fps in the sponza demo at 1280x720, i have a:
    Intel Core i7-3820 3.60 GHz
    32 GB RAM
    NVIDIA GeForce GTX 770

    However the performance is still not totaly optimized, so don't worry! I still have an extra replacement shader, so the scene gets rendered twice, when I get rid of that, it should double the speed. What are your specs?
     
    Last edited: Oct 5, 2013
  20. phaez

    phaez

    Joined:
    Oct 1, 2013
    Posts:
    30
    @CKahler: I sent you a private message yesterday and haven't heard anything. Would you mind checking your inbox and responding?
     
  21. Seikan1

    Seikan1

    Joined:
    Jul 8, 2013
    Posts:
    49
    Amazing, it runs fast enought for me - 100-120FPS, flickering is no more present. SSDO can be great. I agree that the lack of ambient occulsion in sharp edges is distracting, perhaps you should add SSAO from unity post process effects for the next build. I find that if you shot ball then the light transition from light to dark is not 100% smooth as the ball move in space, it happends only sometimes and should not be considered as major bug but it is there.
    One more thing: I have still feeling like the full color balls are oversaturated, if i shot them in light they are too shiny, did you use default unity shaders? It feels like albedo is multiplied too much.
    And again exelent progress so far.
     
    Last edited: Oct 5, 2013
  22. the_nomad

    the_nomad

    Joined:
    Jun 22, 2013
    Posts:
    15
    I'd be very keen on an SSDO implementation, or some kind of AO / color bleed implementation - currently the areas lit by indirect light only look a bit flat. Please god choose something a bit better than default SSAO if you do that, though - I don't need dark halos everywhere :)

    I'd also be very keen on having the option for the spherical harmonics implementation, even if it's a fair bit slower, provided the number of cameras we need to place isn't massive.

    Nice work - it's looking very good!
     
  23. the_nomad

    the_nomad

    Joined:
    Jun 22, 2013
    Posts:
    15
    As a minor side note, and this is pretty off-topic - has anyone ever tried implementing a full-on path tracer as a shader for Unity? GLSL path tracing is a pretty solved problem these days, and it's comparatively simple to implement - would be interesting to find out just how slow it ran!

    (Reference: http://lousodrome.net/blog/light/2013/09/04/a-glsl-version-of-smallpt/ )
     
    Last edited: Oct 5, 2013
  24. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    Hi,
    I uploaded a linux- and mac version, I don't know if they are working, so maybe someone who has linux or mac could test it ...?
    http://sdrv.ms/1fQxPxV
     
  25. Eriks-indesign

    Eriks-indesign

    Joined:
    Aug 15, 2012
    Posts:
    50
    Seems like the GI ins't working.

    $9ONajTT.jpg

    Mac Specs:

    Macbook pro retina 15 inch - mid 2012
    Processor 2.6 GHz Intel Core i7
    Memory 16 GB 1600 MHz DDR3
    Graphics Intel HD Graphics 4000 512 MB / NVIDIA GeForce GT 650M
     
  26. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Yup no GI on:

    iMac Early 2008
    3 ghz Core2Duo
    Nvidia 8800GS 512 meg
    OSX 10.8.5
     
  27. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    Hm..., I don't have a mac to try it myself, nevertheless I like to get this working on mac too! So, there will be a mac version at some point, you just have to wait a little longer, currently I'm focusing on fixing bugs and adding features.
     
  28. EvilFox

    EvilFox

    Joined:
    Jul 23, 2013
    Posts:
    83
    -force-opengl (and it works with the editor too).
     
    Last edited: Oct 5, 2013
  29. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,446
    Laptop

    Core i7-3630m @2.4Ghz
    12GB DDR3
    GTX 670m

    Workstation

    Core i7 990x @3.8Ghz
    12GB DDR3
    GTX 570
     
  30. phaez

    phaez

    Joined:
    Oct 1, 2013
    Posts:
    30
    Ran the test scene on:
    Intel Xeon E5-2665 @ 2.4Hz (2 processors)
    GTX 690 with 6GB (3gb and 3gb)

    Got about 60FPS on Sponza with Extra GI Sampling and 1920x1200 resolution (Fantastic settings)

    I am excited about this, but really want to test it on one of our 1mile x 1mile urban scenes.

    Did I read correctly that you've submitted this to the Asset store? I'm anxious to buy and run it and provide more feedback.
     
  31. phaez

    phaez

    Joined:
    Oct 1, 2013
    Posts:
    30
    Hey Chris,

    Is the distributed Unity plugin going to have an option to do a vast scene-wide computation and set it to Static mode? We've got massive scenes that let you see long distances and we really don't care about dynamic objects. All we want is to see GI on our static scenes.
     
  32. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hi there,
    I have to say i'm very impressed with this GI system.
    You have a potential buyer here if you can get it to work on linux,mac and pc (with dx9 and dx11) and have it with fairly good performance, and for what i'm seeing here, you will most likelly get it to work with all of this. (i do have some doubts on the performance part, i'm getting some low fps in the sponza scene , i guess i'll have to wait to see how it performs with the optimizations you are making).

    This would work very well in our game.
    I'll keep an eye on this :)
     
  33. phaez

    phaez

    Joined:
    Oct 1, 2013
    Posts:
    30
    Chris,

    Don't bother being worried about people complaining about performance. It's like listening to people complain because CryEngine won't run on their 5 year old card. :p Just make the thing rock quality and expose any variables/controls you can for scalability. The future is high fidelity with monster power.
     
  34. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,086
    It's not like that at all. It's like, listening to people with currently-priced $400 cards complaining that a realtime GI system is pretty much useless when it gets 30 FPS on the 250k tri sponza scene with no AI, animated meshes or other code running. CryEngine 3 does it in multi-million tri scenes and sprawling landscapes with dozens of characters.

    Not saying its fair to compare the work of one man to CryTek, but if he wants to sell this to people that want to do more than create low poly showcase scenes, it needs to be competitive, regardless of his being only person.
     
  35. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Well the other things you mention are cpu bound so odds are they wouldn't slow this down to be fair. He also mentioned performance was likely to double after next optimisation i don't see crysis applying global gi on " multi million poly" scenes either.

    So none of what you say really stands imho
     
  36. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,086
    Isn't the CE3 demo forest scene like 1.5m tris? I know the SHIPS in star citizen (CE3) are 1m-1.5m tris (granted, there'll only be one or two on screen on a time, but they have interiors and S***).

    I wasn't trying to be mean, I'll be first in line to buy this, and I do hope his optimizations yield as much a performance increase as he said. I was mainly arguing with phaez's suggestion, which I took to be suggesting "don't bother optimizing it".
     
  37. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    It's not like that at all.

    What i was saying, performance wise, is that i'm only getting 30fps in the sponza scene.
    I know i don't have a very powerfull pc but i do have an i5 3570k quad core @ 3.4GHz, Nvidia GTX 650 and 8gb ram @ 1333MHz, and only getting 30fps in the sponza scene is really low, considering it doesn't have any scripts, animated meshes, etc and it's a very small scene. If i would implement this in my game, i would probably get an average of 5fps if not less.

    I know he's only one man working on this and i will wait for the optimizations and hope i can run it with good performance. I'm just saying that as it is right now, it's not suitable for me, but i'm sure he will improve it alot, since we was saying he could double the fps with some optimizations he was going to make.
     
  38. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    All the performance talk is why I'm a proponent of Chris offering a full GI solution in this asset, from approximations (SSAO, SSDO, SSIL) to full precision.

    This is why I started talking about Skyrim and the ENB series mods; full precision isn't usually necessary as long as you get proper diffuse sky lighting, amibient occlusion and a reasonably expected light propagation (1 bounce + filtering?).

    Sure I expect lighting accuracy when rendering animations for video, but for gaming, I'm good with a conceptually accurate lighting model, again evidenced by what ENB has been able to achieve with Skyrim and GTA4. Both look stunning, photoreal and completely playable on todays equipment (though don't misunderstand, you do need more powerful setups for the highest quality version of the mod).
     
  39. redmotion_games

    redmotion_games

    Joined:
    May 6, 2013
    Posts:
    83
    What res are you playing it at? Fullscreen 1920x1080? (why don't you drop the resolution?)

    I have a Q6600 (ancient 2007-2008 but good quad CPU) with 4gb ram at 800mhz BUT I have a GTX 670, I'm getting pretty smooth performance on 1400x1050 (max res for me).

    The GPU is key for graphics performance, CPU not so much. A 650 is comparable to a 460 speedwise on GPUbenchmark. The 460 came out in 2010.

    The only reason for me to update the CPU is when I'm finally excluded from the GPU race because the motherboard slots aren't up to it. I'll keep up in the future by upgrading the GPU again.
     
  40. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566
    @redmotion_games "Fullscreen 1920x1080? (why don't you drop the resolution?)"

    I play all my games at that resolution, my monitors native res is 1920x1080 and my card is quite good so it would make more sense in choosing that resolution.

    Also 1920x1080 is becoming very common so I think his benchmark results are important
     
  41. phaez

    phaez

    Joined:
    Oct 1, 2013
    Posts:
    30
    PrimeDirektive said "I was mainly arguing with phaez's suggestion, which I took to be suggesting "don't bother optimizing it"."

    @PrimeDirektive What I wrote was not very clear and could definitely have been interpreted like that. My reason for saying it was that I don't want Chris to spend forever trying to get this thing super optimized. I just want to see the plugin released and purchaseable. We will use it NOW as-is and receive improvements happily as they come along. I just want to get started working with it.

    Additionally, I want to have the option of running it on a high-end hardware with optimal quality and not be locked into a low-end version of the algorithm that doesn't have fidelity in large scenes.
     
  42. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    I think the performance is not the main issue here.

    Right now, I can only judge from the videos. But for me the whole lighting looks pretty off and not correct. Like a bunch of overpowered pointlights scattered around a scene. Not like subtle light that bounces from the surfaces. Not to mention the flickering. Even with a minor flickering, I wouldn't buy a game with it because it is pretty distracting.

    I appreciate Chris' efforts and all. But for me this is still far away from useable, compared to stuff you see in Enlighten, CryEngine, or Kurt's last demo video.

    But again, I can only judge the videos. Maybe it's simply the wrong settings and a bad demo scene for that purpose and it looks absolutly fantastic if you play with it.

    As for the performance. Sure you need beefy hardware for that. But you shouldn't go overboard here. There is a reason why Epic eventually scraped their sparse voxel octree solution in favor for next gen console games.
     
  43. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    You must not have seen his latest video b/c the flickering is all gone. I say the next big thing is performance!
     
  44. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    I gotta admit this one is true, I've overseen his last video.

    It looks way better now.
     
  45. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    Hi guys,

    I had to address some asset store issues, I submitted with a zip file, they didn't like it. I also have to remove my license text (because they have their own license, so I don't need an extra one).

    I used this opportunity to fix some bugs and resent my package again (today), hope it doesn't take that long again. :rolleyes:

    I am now working on occlusion and fixing some grid stepping problems. There will be soon sky lighting and mesh lighting available. I think the best solution for reflections are still screen space reflections, so I will add a shader next time. The SSDO conversion is finished, but I didn't include it in this release, because I have to combine it with the unity lights and that is a bit tricky. I converted and included a CSSGI shader in the release version, however the quality is much worse than VCT. I think, VCT can be faster than LPV, the latest dynamicGI PrePassLighting Test runs with 290 fps on my GPU.
     
    Last edited: Oct 10, 2013
  46. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,086
    Can we see some shots of screen-space only stuff with no realtime GI to see how it looks? :)
     
  47. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    I uploaded a new video of version v0.5 :



    Demo: http://sdrv.ms/180AU8F

    This release version won't have the sponza textures included (as you can see in the video) to save download/upload time.

    Tomorrow,... I'm exhausted for today.
     
    Last edited: Oct 11, 2013
  48. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566
    Looking great CKahler :)
     
  49. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    What are the new additions to this update? It looks fantastic btw!
     
  50. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Yea light propagation looks much better in this version Chris!

    Yay! :D

    -Steve