Search Unity

Assets HXGI Realtime Dynamic GI

Discussion in 'Works In Progress' started by Lexie, May 24, 2017.

  1. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Your system only handles GI from the ground plane right? At least I remember one GI system that someone was working on that had that limitation. My system uses 3D volumes so its not limited to only upwards facing GI. We have a lot of indoor areas with multi levels and emissive surfaces on walls/roofs. Needed to go a route that didn't have that limitation.
     
  2. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    Yep, it's extremely fast and effective for outdoor open world environments, but doesnt have much occlusion or ability to work indoor. But my new one is volume based. I've done other volume based methods and had trouble with them cause I was using LODS which causes major light leakage. Now the latest solution(which is similar to yours) is working really well. I likely won't be selling it though.
     
    Lexie likes this.
  3. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Do you have any videos of it in action? I'm still trying to find a good way to approximate the skybox contribution with out having to do a bunch of cone traces. I could fake it by putting an invisible emissive surface on the bounds of the volume but that looks pretty gross. I'm hopping that adding cascades will speed up the voxel tracer so i might be able to do a bunch of cone traces with out impacting speed too much.
     
    Last edited: Jun 13, 2017
  4. IronDuke

    IronDuke

    Joined:
    May 13, 2014
    Posts:
    132
    @Lexie Something that makes me very happy is that every day, there's new posts from you. I mostly skim them, but I'm delighted to see how much communication you're providing. Keep it up! :)

    --IronDuke
     
    buttmatrix and Arganth like this.
  5. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    @Lexie PM me and we can share some thoughts.
     
    buttmatrix likes this.
  6. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    Well, we are only visualizing single products per VR scene, so in our case, we don't care about draw distance at all. What we do care about is how detailed and realistic we can get the product itself to look (products using in VR right now for us vary from 6 - 12 meters in size).
     
  7. S_Darkwell

    S_Darkwell

    Joined:
    Oct 20, 2013
    Posts:
    318
    Please do consider that in some situations, only a very limited view distance is required. Such is the case with my current project, where I'm working with a top-down isometric perspective. The light simulation only needs to be within a very specific area.

    Hoping that this will see some release, as it certainly seems beneficial for my own uses!
     
    Martin_H likes this.
  8. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,310
    I also have some projects where even a limited size would be great.
     
  9. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    There will be a setting to set how many cascades you want, so you could set it to one if you wanted to. I understand that there is a subset of games/projects that could probably use it as is, but id rather release it when it's ready to work with more use cases.
     
  10. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    604
    Just as long as you are releasing it. ;) Half-kidding! Sorta...
     
    Acissathar and Arganth like this.
  11. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Proof of concept for reusing screen data during the voxel traced reflections. The image on the left does a much better job at reconstructing the vase and the detailed trim at the bottom of the curtain. where as the image on the right is just reflecting the voxel data so everything is very blocky and loses any pixel data. This ended up costing very little to add as i just reproject the hit postion into screen space and sample the Gbuffer for the screen space data instead of the data in the voxel grid.



    Here is a gif of it on a mirror reflective surface. It's a lot easier to see what it's doing in this gif. most of the strange artifacts gets hidden by the roughness blurring, Ill add some blending on the boarder of the screen though just in case.


    Getting the detail of the bricks in this reflection would be impossible with out this.
     
    Last edited: Jun 15, 2017
    ftejada, DasBiot, buttmatrix and 15 others like this.
  12. Tzan

    Tzan

    Joined:
    Apr 5, 2009
    Posts:
    711
    I'm doing a procedural project with vertex colors in the mesh.
    Does your project support vertex colors?
     
  13. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Yes.
     
  14. Tzan

    Tzan

    Joined:
    Apr 5, 2009
    Posts:
    711
    Cool! :)
     
  15. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Here is a quick video of some specular smoothness test. It accurately calculates the specular contribution now. I'm in the process of cleaning up all this new code and exposing some settings so it can run on lower end machines. Ill also expose the ability to just use the old specular approximation version for even lower end machines. After that ill move onto cascade and skybox contribution.

     
  16. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    400
    This keeps looking better and better every day. Awesome work!!
     
    Arganth and hopeful like this.
  17. thejturner

    thejturner

    Joined:
    Jun 14, 2016
    Posts:
    2
    Amazing work (especially the recent reflection advances) and would definitely buy if you release it. Also grateful for the deluge of communication and updates.

    I've enjoyed experimenting with SEGI but ultimately couldn't use it for lack of VR support and the dreaded light leakage didn't help either. I only point that out because I'm personally willing to financially support projects like this that seek to raise the bar graphically, even if they don't turn out to be viable solutions in the end.

    Total aside but is it pretty arduous to port this over to Unreal? I just know there is a significant community of people over there begging for a similar solution (especially the archviz side of things). If the code was remotely portable it would give you an additional market.
     
  18. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    ^Agreed. Let's get this bad boy released and finally be the first to have workable realtime GI.

    Speaking of VR, @Lexie will this have single-pass stereo rendering support?
     
    chiapet1021 and Arganth like this.
  19. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    94
     
    SteveB likes this.
  20. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Admittedly @ronjart I did only peruse the thread, so I do appreciate you pointing that out for me! :D
     
    ronjart likes this.
  21. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,364
    Metal in Unity supports writing to 3D textures. No geometry shaders though. Metal tessellation is on Unity's roadmap in the research section but nothing else as far as I know.

    Current state of play as of Unity 5.6:

    #pragma target 4.5 (or es3.1)
    • OpenGL ES 3.1 capabilities (DX11 SM5.0 on D3D platforms, just without tessellation shaders).
    • Not supported on DX9, DX11 before SM5.0, OpenGL before 4.3 (i.e. Mac), OpenGL ES 2.0/3.0.
    • Supported on DX11+ SM5.0, OpenGL 4.3+, OpenGL ES 3.1, Metal, Vulkan, PS4/XB1 consoles.
    • Has compute shaders, random access texture writes, atomics etc. No geometry or tessellation shaders.
    https://docs.unity3d.com/Manual/SL-ShaderCompileTargets.html
     
  22. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Yeah I was talking to one of the unity devs and he was saying the same stuff. Should be able to get it working on mac, Ill have to use a 3 pass shader for voxelization though. I still need to test if a geometry shader is even faster then just doing a 3 pass shader.

    I'm currently on holidays right now so progress wont pick up again for another week. still cleaning up specular reflections and making them run faster. Cascades and skybox occlusion are next.
     
    elbows likes this.
  23. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    I dont think i could charge money for a solution that isnt viable, So although it is nice of you to support people trying things out, It's not something i feel comfortable doing. Once the system meets the standards ive set ill look into releasing.

    Should be pretty simple to port to unreal. Although id probably hand it off to a friend with experience of unreal, I've never used it.
     
  24. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    375
    Hi. There is a compatibility issue between your volumetric lighting asset and Segi GI I've posted to your thread. Please check that and see if there is a fix for that.
     
  25. rrahim

    rrahim

    Joined:
    Nov 30, 2015
    Posts:
    161
    I'm quite excited for this, since the HXVolumetric Light Asset is my go to for any volumetric lighting (and the core of many effects in my game).
    I really hope this gets released some day.
    Keep up the awesome work!
     
    fisj likes this.
  26. OnlyVR

    OnlyVR

    Joined:
    Oct 5, 2015
    Posts:
    53
    Please, keep developing! I am playing with SEGI a lot, but your light looks more realistic. If it works in VR with a reasonable fps then it will be the best GI solution for Unity. I love it!
     
    Nobrega_ and SteveB like this.
  27. ThomasVeil

    ThomasVeil

    Joined:
    Aug 7, 2014
    Posts:
    4
    +1 to being very excited about this (and Segi also). Would support it too if there is a usable and somewhat fast running version - even if it's not perfect.

    One idea that came up in the other thread: If you could bake the results to a lightmap, that would be super useful for the workflow. Basically no waiting lightbake updates anymore to see if the end result will look well, just work in real-time and bake it when it's done.
     
    buttmatrix, DGordon and Ogdy like this.
  28. Ogdy

    Ogdy

    Joined:
    Dec 26, 2014
    Posts:
    18
    +1 I would buy this even if it is not perfect or finished. Even without a documentation.

    I also do think it is in your advantage releasing this before having a "Final Release", because you won't have a "Final Release" without the users feedback.
     
    Misciagno, DMeville and Nobrega_ like this.
  29. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    364
    This looks very interesting. My project is 100% procedural and hence am looking at solutions such as SEGI, and now this.

    I'm more interested in a viable lighting solution that's fast, rather than one with high accuracy. The 'atmosphere' of the game is what I need, not perfection of lighting.

    The community is waiting for that first viable realtime GI solution! I'm sure you'd get a lot of sales.
    Price it fairly for expected support effort.
     
    neoshaman, IronDuke, one_one and 4 others like this.
  30. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    272
    I've been away from this thread for a couple weeks b/c the forums stopped notifying me.

    Reflections have come a long way, they look really good. Does the transition between parts of a surface that have screenspace data available and those that don't look okay? That's often a problem area for screenspace reflections.
     
    matteumayo likes this.
  31. MariskaA

    MariskaA

    Joined:
    Feb 17, 2017
    Posts:
    11
    Hey there! This is very nice and could be life-saving for me as i'm not satisfied with Segi! It's not optimize for littl interior scenes I think. Could you tell me where I could get.buy your asset? Thanks a lot this seems to be a very good work!
     
  32. MariskaA

    MariskaA

    Joined:
    Feb 17, 2017
    Posts:
    11
    Sorry I'm new on Unity/this forum I just saw it was a work in progress and no available yet^^ So I change my question with: Do you know huw much time we still have to wait so we can buy it? :D Thank you!
     
  33. IronDuke

    IronDuke

    Joined:
    May 13, 2014
    Posts:
    132
    My thoughts exactly!:cool:

    --IronDuke
     
  34. Ogdy

    Ogdy

    Joined:
    Dec 26, 2014
    Posts:
    18
    If you finished reading the first post of this thread you would have an anwser to your question, which it : nobody knows, since the creator hesitates to release it.
     
    Last edited: Jul 4, 2017
  35. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    There is an interpolation transition between screen data and offscreen, it hides the transition pretty well. specular reflections are still a little slow. I'm working on temporal sampling a few frames of data to better construct the reflections at half or even quarter resolution to speed them up and be able to support rougher surfaces while still being fast.
    The data is stored in a way that upsampling wont look bad or aliased.
     
    nxrighthere, Ogdy, fisj and 2 others like this.
  36. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,587
    This looks fantastic. I just purchased HX Volumetric Lighting and love it already. This is definitely a must buy when it's released. Do you have plans for a beta test cycle?
     
  37. Murad-Khafizov

    Murad-Khafizov

    Joined:
    Dec 11, 2012
    Posts:
    2
    Oh god! Looking so great!
    @Unity, buy this guy for millons and make his assets free! We need such fantastic stuff, not the text -___-
     
    DGordon, hopeful and John-G like this.
  38. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    I have been able to create pretty accurate specular over the full range of smoothness. It supports lower resolution reflections with good upsampling to support a wider range of hardware.


    (I should have taken a straight on version but you get the point.)

    Even with the low resolution rendering the speed isn't as fast as id like it to be. For now I'm going to move over to working on Cascades to increase the view distance of the effect.

    I'm hoping that ray tracing the cascades will speed up the realtime specular reflections as the ray's will be able to skip over large portions of air by looking at the lower resolution grid. This should also allow me to test out a more cone traced specular approach which generally reconstructs a good enough result faster then ray tracing could.
     
    ftejada, DasBiot, buttmatrix and 17 others like this.
  39. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,587
    Looks great. Even at quarter resolution it's very nice. Eight is a bit noisy.
     
  40. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    364
    Thanks for your update! Your graphics chops are impressive, it's looking sweet!
     
  41. Tenebris_Lab

    Tenebris_Lab

    Joined:
    May 23, 2017
    Posts:
    35
    Looks great Lexie!
     
  42. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    I'm going through a full rewrite of the system to enable cascades support so i'll probably be slow with updates. I'm going to take this time to write out everything cleanly as I now have a full scope of what everything needs to look like.

    I've also figured out a way to cut the memory usage in half by being a little smarter with how I use my textures. which is really important for cascades as they where going to take up an unreasonable amount of space before.
     
  43. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    213
    This is really looking fantastic, look forward to seeing it come out. :)
     
  44. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    I know I sound like a broken record on this (well moreso in the SEGI thread) but if this bad boy is Forward Rendered and Single-Pass Stereo for VR it's going to be unbelievable...

    ...gorgeous.
     
    matteumayo and chiapet1021 like this.
  45. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    604
    And hopefully, we'll get to play with it! :p
     
    SirTwistedStorm likes this.
  46. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Thatswhatshesaid
     
    SirTwistedStorm likes this.
  47. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    373
    Curious if its usefull for archviz stuff...
     
  48. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Right now I don't have a solution for calculating skybox lighting. But I have some ideas for it. That is pretty critical for archviz stuff imo. Although you can simulate it by just putting emissive objects outside of all the windows.
     
  49. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    So one of the big issues with adding cascades to the system is that the voxelizeation process now has to voxelize a huge area. Ideally you would only voxelize static objects once, and then voxelize the dynamic objects each frame. Unfortunately unity doesn't give you access to the culling system to be able to sort what objects need to be voxelized or not. (I've asking for access with the scriptable render loop, but we will see) Most likely these limitations will mean that everything ends up being revoxelized.

    With a single cascade I only needed to voxelize things around the player, so voxelization speed wasn't a huge issue. But with cascade this whole scene gets completely voxelized... >600k tris + many draw calls



    So I'm working on a new method and I've also added instancing to the voxelization shader. Before this whole scene would take 9ms just to voxelize the largest cascade (whole map). The new method only takes around 2-3ms but also makes the other cascades extremely cheap to calculate. This new method coupled with voxelizing the scene over a few frames will speed up the voxelization to the point where it shouldn't be noticeable at all.

    It also has the added bonus of being able to store the voxel data in a way that can be interpolated by the GPU, This should speed up a bunch of the other shaders that access this data as well as give a lot nicer results on the voxel traced reflections. Also the stored colors can now be a correct average of all the data inside it, rather then using a max blend mode.
     
    Last edited: Jul 13, 2017
    ftejada, DasBiot, buttmatrix and 8 others like this.
  50. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,374
    How about Culling Group?