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. Seikan1

    Seikan1

    Joined:
    Jul 8, 2013
    Posts:
    49
    CKahler working on this full time and we finally have guy who is capable of bringing unity into visual haven so i have an idea on upcoming features.
    - VCT quality as in reference videos. ( perhaps 200 €? )

    I know it is not simple, but what do you think Chris?
     
  2. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    I don't think that's a good goal. I think those concerned with visual quality can switch to the 256x256 grid and change some settings to achieve the reference video quality. But many game designers care for performance as well. And 45 FPS just for lighting is not usable. Ckahlers implementation looks really good and this isn't even version 1 yet! Just give him time to add features and fix some things. That's why I'll ask my question again before the thread went somewhere else.
    can you post ToDo list for what you have planned for future updates, features and optimizations and the like?
     
    Last edited: Nov 6, 2013
  3. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
  4. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566
    @zelmund I was thinking that too
     
  5. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    You say for a 32x32 Voxel grid you can get 400 FPS. Maybe allow the user more bounces with that since it performs well. And also in a 32x32 grid would the reflections be dynamically scaled to a 128 if you need them to? Kind of like the reverse you have going on in the last video.
     
  6. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    I will check that out! since it's a post effect which uses the same camera depth mode as dGI, it should work.

    I haven't tried more bounces, I think that will be a feature for version 0.8 or 0.9. The upscaling is possible but the reflection is very expensive, that's why adding ssr makes sense.

    I'm improving the user ui (make it more user friendly) and doing a full voxelization shader for dx9 which is a bit tricky. So it might take a little longer until the next version is out. This time I don't want to rush it.

    Edit: good news, the dx9 voxelization version is almost finished, thanks to the clever coder, Manuel Kugelmann.
     
    Last edited: Nov 8, 2013
  7. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    the gi implementation that you based off of hadn't taken surface normal into account so maybe that's why you didn't either? do you plan on adding that? do you know why ao is spotty? also would directional voxels help with light leakage?
     
    Last edited: Nov 8, 2013
  8. Seikan1

    Seikan1

    Joined:
    Jul 8, 2013
    Posts:
    49
    I did ask about normal map a weak ago, without answer.

    I did a couple of search about light leaking, it's very common problem, but i did find this:

    Anisotropic Pre-Integration
    In order to get higher quality visibility estimation and to limit leaking of
    light when low resolution mipmap levels are used, we propose to rely on
    an anisotropic pre-integration of voxel values stored in a directiondependant
    way in the structure. We use the 6 main directions and values
    are reconstructed by linear interpolation of the 3 closest directions. It
    provides a better approximation of the volume rendering integral, at
    the cost of 1.75x the storage requirement and a slightly slower sampling.

    Source:
    http://hal.inria.fr/docs/00/65/01/96/PDF/I3D2011_Poster_web.pdf

    Also in the original Cirill implementation he talks about Anisitropic voxels.

    http://perso.telecom-paristech.fr/~...in2011VoxelGlobalPG/VoxelGI_EG-pg2011-sub.pdf

    And an interesting talk about VCT problems:

    http://www.gamedev.net/topic/635640-voxel-cone-tracing-raymarch-collision-testing-problems/

    Chris you should look at it.
     
    Last edited: Nov 9, 2013
  9. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    Yes, that's directional voxels. Why are reflections so expensive? Only when it's mirror like does the frame rate drop. Is there any more optimization to be done? There is a good ssr plugin for unity already but no one is offering completely real time reflections like you are. Ssr isn't much better because a lot of reflections happen off screen.
     
  10. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    Where does it say that? I'm using normals to tell the ray direction.

    Yes. it depends on the voxels, e.g. a voxeled sphere isn't round anymore, it consist of many blocks that create shadows -> spots.
    (just google voxel sphere pics)

    Yes. But there are also other techniques. I'm working on that, the problem was already stated in the unreal4 paper.

    Because you have to use a smaller tracing cone for reflections. The smaller the cone the longer it traces. That's why using glossy reflections in higher mipmap levels are faster.

    I knew it already, but thanks for the link of the talk.
     
    Last edited: Nov 9, 2013
  11. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566
    Just wondering, could using their method for reflections work in combination with yours? (post effect).

    would it be less expensive to separate it?
     
  12. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    In that case I would like to see a 32x32 Voxel grid demo. Does your system allow for 64x64? How fast does that run? I just want highly specular reflections with no cutting corners and I'd take the performance loss.
    Also what are the specs of your system?
     
    Last edited: Nov 9, 2013
  13. Veqtor

    Veqtor

    Joined:
    Apr 17, 2012
    Posts:
    21
    +1 this reflection system seems very powerful, why not combine the best of two worlds if possible?
     
  14. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    i see this being used for planar and water surfaces since all information will be on screen but that's about it.
    i also have some concerns with the performance of your gi.
     
  15. Seikan1

    Seikan1

    Joined:
    Jul 8, 2013
    Posts:
    49
    Last edited: Nov 15, 2013
  16. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149


    - dx9 / openGL version
    - 128x128x128 grid
    - one bounce
    - emissive spheres generate indirect light
    - only materials with specular data have tracing reflections
    - played 2x speed



    (the white part in the background of the sibenik model is out of the voxel grid and gets no AO)
     
    Last edited: Nov 15, 2013
  17. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    Wow! that looks really nice! will you make this a webplayer demo?
    only criticism i have is that at 2:08 there is no reflection of the cube on the floor.
     
  18. EvilFox

    EvilFox

    Joined:
    Jul 23, 2013
    Posts:
    83
    Looks good (if ignore flickering AO).
     
  19. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Made my thingy tingle...
     
  20. Loards

    Loards

    Joined:
    May 2, 2013
    Posts:
    112
    OMG!! awesome!!! look amazin and Dx9!!! everything looks much clean and consistent

    Good Job!
     
  21. Seikan1

    Seikan1

    Joined:
    Jul 8, 2013
    Posts:
    49
    Very nice looking demo. Do you plan to release this version or it is still a WIP?
     
    Last edited: Nov 15, 2013
  22. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    Now that's looks cool,
    -is it possible to interpolate or smoothing out the GI/AO for low res Grid to reduce the flickering?
    -and can you show it with textured scene? not just flat color material, i want to see how it looks in real game environment
    -last thing is can it work with Particle? i'm trying to find something like UE4 lit particle demo
     
  23. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,446
    I am SERIOUSLY looking at this... if you can get it working with Marmoset Skyshop shaders... HOLY S***... this will be a definite purchase...almost want it now
     
  24. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    are you testing this stuff on a gtx 770?
     
  25. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    I will release the new version next friday! ( it will be available in the asset store properly in two weeks, but customers can have it on friday)

    yes, it is possible.

    coming soon.

    you mean get the light from particles?

    currently, but I also have a gt630 for testing here.
     
    Last edited: Nov 18, 2013
  26. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    Hi,

    I found out that you have to pay more when you are living in europe, germany (like me).

    For example, when I login, my asset "dynamic GI" costs 90,25 Euro, which actually costs 95 Dollar (when you are not logged in).

    But the exchange rate is 1 Dollars = 0,74 Euros so the actually price should be 70,36 Euro.

    Isn't that a bit unfair especially for sellers like me, because I don't get 70% from the 90,25 Euro, I get the 70% from the 95 Dollar that means in the end I only get 49,21 Euro (= 95 * 0.7 * 0.74). And than I have to pay german taxes for that.

    I don't like this price policy at all and I'm think about selling my asset only on my own website or double the price in the asset store so I get at least half of it back.
     
  27. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    It's the VAT added on to European sales
     
  28. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    Yes, but they add the VAT because they have to pay them later to their finance authority, but I get 70% from the money without the VAT and than I have to pay VAT to my finance authority too.
     
  29. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    It's the VAT your customers pay.
     
  30. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    yes, that's why you normally add them, but I can't add them. Unity adds and takes them. It can't be that I lose almost 50% of the money before paying taxes.
     
  31. jcarpay

    jcarpay

    Joined:
    Aug 15, 2008
    Posts:
    558
    If you're a company with a valid VAT number, the taxes aren't added to the price.
     
  32. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    yes, but for those companies unity technologies doesn't have to pay the VAT too, so they're not losing anything. From my point of view as a seller, I still have to pay taxes even if companies pay the VAT or not.
     
  33. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Contact your accountant, i'm not sure you need to pay cat on this yourself since vat was already collected on the sale (you're not invoicing unity, just getting dividends)
     
  34. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Few things:

    First off you set the price at 90 euros, correct? Why is it then only 95 dollars? Either way you should be receiving 70% of the sale...whatever was paid for the asset...and of course subtract whatever your tax rate is in Germany, of which shouldn't be much of a surprise.

    If you want to earn more, I suggest a price increase but not removing it from the Asset Store. I myself don't purchase things from 'individuals' from some site on some corner of the internet, mainly for security both financially and for support. In other words I trust Unity to maintain the store, and I have a reasonable expectation of centralized information on an asset and it's updates. I enjoy the ease of loading Unity, starting a fresh scene, hitting command-9 and pulling the assets down. It's why the Appstore works, why Steam works and why the Asset Store works. I may be in the minority but it is something to consider.

    -Steven
     
  35. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    I mean particle received Light/Bounced Light.....
     
  36. Seikan1

    Seikan1

    Joined:
    Jul 8, 2013
    Posts:
    49
    That is sad. You could increase price to 200 dollars as you originally planned. Occlusion and reflections are big improvement i think.
    And you could charge existing customers by releasing new version with features that is worth to purchase v2.
    Physicaly based shaders for GI v2 that are tuned for your GI for example.
     
  37. Moonlight

    Moonlight

    Joined:
    Jun 7, 2010
    Posts:
    41
    I think it would be unfair to charge existing customers
     
  38. pixvertex.de

    pixvertex.de

    Joined:
    Aug 29, 2013
    Posts:
    1
    Iif you have a European VAT number and you make deals with another European company you don't need to pay any vat at all in Germany.
    I don't known where the unity store is located.
    But if he is located in europe. Unity will collect the money for you with or without vat. you get the money and you don't have to pay any VAT (Mwst) in Germany.
    You just to need mention it to the Finazamt ;)

    Great Gi solution so far. Looking testing your next release.

    micha
     
  39. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    Thanks for the support,

    good news with the new unity version 4.3 it is now possible to render into mipmaps which will increase the performance (hopefully). I like to add this feature in my new version v0.7, so this might delay the release a bit (1-2 days)

    Here is the original text from unity:

    Edit:
    I won't charge existing customers
     
    Last edited: Nov 20, 2013
  40. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    You said once that you were using a 32x32 Voxel grid in this video http://youtu.be/_n4VKdI7TSY
    Woul you say that currently it is higher quality than it was in this video?
     
  41. Korda

    Korda

    Joined:
    Jan 3, 2013
    Posts:
    37
    This is great! I have been looking at the progress of various realtime GI solutions for Unity for a while but I had no idea that one was actually out.
    I tried out the demo scene and performance was pretty good on my machine, I was getting up to 180 fps in the sponsa scene on my i7 gtx 680.

    I can't wait to try it out.
     
  42. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I decided to download the digital content for the gpupro books (its all free from the publishers) and i must say i've been hugely inspired, especially given every book has several approaches to GI on top of a bunch of other very interesting topics.

    What it showed me is that GI probably isnt a big wow thing for professional art programmers, its just not been convincing enough an investment given how heavy it is performance-wise thus far. They're otherwise saturated in papers regarding it all, it's good to see finally coming up in Unity though. If the Unity guys implemented it and it wasnt wholly complete, integrated and performing magnificently, all they'd have got for their efforts was a bunch of bitching internet peons. Good going on this, and even with the code in front of me and me attempting to dissect it best I can it still seems totally beyond me right now, so this is good to see.

    Do go and have a poke in the gpu pro books however, gpu gems and shaderx assets are also often very strong, and even nvidia's current crop of source provided examples are pretty inspiring. Makes you realise how many different ways there are to approach it too!
     
  43. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    CKahler this is probably on top of my purchase list, just one question though. Will this work with huge outdoor scenes?
     
  44. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    615
    How's everything going?
     
  45. fermmmm

    fermmmm

    Joined:
    Oct 18, 2013
    Posts:
    129
    man... you are going to change the F***ing world with this plugin. Unity will be on top of UE4
     
  46. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    Hi,
    I'm working on the web demo, my plan is to upload it today.
    Cheers!
     
  47. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    buyed. cool thing. :cool:
    when we can see 0.7 version?
     
  48. CKahler

    CKahler

    Joined:
    May 6, 2013
    Posts:
    149
    should only take me a few days until it's ready (well, without including the weekend)
     
  49. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    save the weekend for yourself please. dont work when you tired. i want to see bright future of that asset without fatal sacrefice ;)
     
  50. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    is it possible to add a Global Gi Desaturate? would be usefull. some times bounce color affecting too much.