1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  4. Unity 2017.1 is now released.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice

Assets HXGI Realtime Dynamic GI

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

  1. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    336
    It would mean you'd have to place a script on every game object you want to be voxelized. Also I've written a faster octree culling system that I could use if i wanted to go the route of a culling system. But id rather this was a drop in system. having to add a script to every game object is a little too much to ask IMO. Although it offers the best speed/control.

    A method that is simple to intergrate is having a layer/s for static voxelized object and layers for dynamic voxelized objects. but that can be pretty restrictive.

    another one is having shaders for static objects and shaders for dynamic voxelized objects so I can use the shader replacement tags to seperate them using unity's inbuilt culling system. But this would make it a lot harder to intergrate with custom shaders.

    If i can get the voxelization process to be fast then its not really an issue and voxelizing everything over X frames would be the easiest for users to integrate into their game.

    If anyone has any other ideas id love to hear them.
     
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,090
    Have you considered froxel (frustrum voxel, ie basically a depth map at lower rez)? I don't know, I have just seen media molecule use it, but I know nothing about it. There was also this talk at unite 2017 I have yet to parse or wrap my mind around.
     
    DMeville likes this.
  3. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    149
    In Archviz you allready fake this sky-light behavior with the method of placing illuminating planes in the window. Some RenderEngines recommend to use a kind of "portals" you place into the window space to reduce calculating time. So its a common technique :)
     
  4. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    160
    I agree that it's super important that this be easy to add to an existing project. Having to add a script to every object is too much.

    I definitely don't think anything that makes integrating it with custom shaders harder is a good idea. That'd be a pain in the ass forever.

    I don't particularly like layers. It seems like everything in a project that uses them makes everything else that uses them harder to work with. They'd certainly work in a pinch, though.

    Adding scripts to everything wouldn't be so bad if I could set a default that would be added to every other renderer at run time. That way you could set it up to either
    - Just re-voxelize everything as if it were dynamic, trading some performance for very easy setup (probably the default setting)
    - Voxelize everything as if it were static, and then you have to add a script to your dynamic objects and anything you don't want voxelized at all. (Or the opposite, if it means doing less by hand.)
    - Not voxelize anything except the things that you've added a script to, for total control over what gets voxelized and what doesn't

    If the performance gains would be very minor it might not be worth the complexity, but in general I feel like even small performance gains can make a big difference in a system like this because they mean a user can push the limits a little farther somewhere else. If (for example) 10% faster voxelization means someone can turn up the max view distance 10%, that will make a difference to somebody.
     
    Last edited: Jul 13, 2017
  5. rea

    rea

    Joined:
    Oct 10, 2009
    Posts:
    1,824
    ah yeah, good point. That would not user friendly adding script manually
     
  6. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    336
    Didn't seen any froxel use in that video. Froxels are generally used for calculating onscreen effects/data. My GI is all calculated independently of the camera. So froxels arn't useful for my use case.
     
  7. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,090
    No that video and the froxel are two independent idea lol, but they are just on the nose suggestion, not deeply thought out.

    So I guess this video was no use either lol.

    The mediamolecule video is there, he use voxels and then switch to froxel at 19:20, he use also distance field. He spend time talking about voxel strategy.

    In case it gives you idea
     
    DMeville likes this.
  8. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    336
    Thanks for the video, the ambient lighting is pretty similar to what i intend on doing. But ill try to do it in voxel space rather then screen space so you dont get temporal artifacts. Some cool ideas in here.
     
    fisj, SirTwistedStorm and neoshaman like this.
  9. yohami

    yohami

    Joined:
    Apr 19, 2009
    Posts:
    99
    Wow, SEGI's got a contender. This looks great. Any estimate release date, beta, something to play with?
     
  10. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    879
     
  11. yohami

    yohami

    Joined:
    Apr 19, 2009
    Posts:
    99
    Well I'd buy it for sure. Alternatively I'd like to hire you to do a custom version. Unity lighting sucks so much Im always tempted to move to Unreal, so no matter if this costs real money, it should still be cheaper than redoing the game from scratch elsewhere. Im sure Im not the only one with this problem.
     
    SirTwistedStorm and DMeville like this.
  12. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    247
    I would get a copy. even with no support.
     
    Arganth likes this.
  13. cerrec

    cerrec

    Joined:
    Jan 19, 2017
    Posts:
    17
    Me, too.
     
    DMeville likes this.
  14. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    28
    I hope you do sell this Asset even if it's expensive many of us would still buy it.
     
  15. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    879
    matteumayo and LennartJohansen like this.
  16. vonpixel

    vonpixel

    Joined:
    Oct 2, 2012
    Posts:
    25
    This is looking really fantastic. The attention to detail for reflections is really great to see. This is an intstant buy for me as soon as its out (even though I also have segi).

    How is this with lots of moving geometry? Ive been working on a procedural(ish) music visualizer that uses GI to light everything- but lots of the stuff is moving.
     
  17. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    336
    [​IMG]

    Cascade Voxelization is close to finished. Right now each cascade is twice the scale as the previous. With 4 cascade it increases the view distance by 8x. The different colors in the middle frame shows what cascade it's pulling from.

    It needs a little more clean up and then I can move onto adding cascades to the GI calculations. The system will support 1, 2 or 4 cascades.

    Moving GI geometry creates ripples of light and shadow depending on your settings. increasing the calculation speed can alleviate that effect. SEGI is more suited for fast moving GI contributing geometry.
     
    vonpixel, SteveB, brisingre and 6 others like this.
  18. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    14
    Random thought: could this be used as a performance friendly solution for medium/large scale ambient occlusion e.g. darkness in occluded outdoor areas canyons, forests etc. (performance friendly meaning having a negligible performance hit by using very slow calculation speed and not caring about moving objects)?
     
  19. rea

    rea

    Joined:
    Oct 10, 2009
    Posts:
    1,824
    Assuming this is similar tech as in CE SVOTI, indirect occlusion should be included already.
    @Lexie let me know if i'm wrong :p
     
  20. PhilippG

    PhilippG

    Joined:
    Jan 7, 2014
    Posts:
    196
    Hey, I'm also looking for a runtime lighting solution for procedurally generated levels! Following!

    What a Frankenstein with the asset bundle trickery. Both genius and horrible :eek:
     
    Lexie and neoshaman like this.
  21. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    160
    Cascades seem to be coming along nicely. I can't see any sign of a border between them in this screenshot, which is great.

    How does faraway stuff lit by emissive surfaces look?
     
  22. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    336
    It's going to be a while before i can show any results from the cascade GI, The voxelization was just the first step.

    Right now I don't have a working solution for skybox contribution, the majority of the occlusion your talking about comes from the shadows skybox lighting would contribute. I have a few ideas on how to solve this but I'm not sure how performance friendly they would be.
     
    brisingre likes this.
  23. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    336
    [​IMG]
    I got the rendering of the GI data figured out today. on the left is the UVW position used to sample the GI data, Middle is the cascade number. There is some blending of data between the boarders on higher settings.

    Hopefully i'll have defuse cascade GI calculating by the end of the week.
     
    tweedie, nxrighthere, pcg and 8 others like this.
  24. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    201
    This is looking really promising, and its great to see such regular updates. I'm an avid SEGI user, but once cascades are wrapped up this looks like it'd be a much more performant solution for any project not requiring fast changes to GI-affecting geo. Skybox contribution would be fab, and if support for forward rendered objects is viable I think you'd have the best contender on the market. The specular / reflections testing looks great so far, though I'd be interested in seeing some shots from a non-static camera. SEGI's reflections are pretty good from static views, but tend to flicker a fair bit when the camera's in motion so I tend not to use them. This wouldn't be an issue for our current project however. How straight forward is it to get custom shaders playing right with this?

    Anyways, long way of just chiming in to say, even as a SEGI user, I'd happily still pay good money for this. Moreover, if compatibility with custom shaders is reasonably straightforward, I don't think most people would need to make much use of support either. We all appreciate the awesome work, please keep it up :)