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.

Showcase MF SSGI for URP - Realtime Screen Space Global Illumination - DirectX 11 | OpenGL

Discussion in 'Universal Render Pipeline' started by Michiel-Frankfort, Sep 9, 2022.

  1. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    --------------
    Update: V1.0 is live in the store! V1.1. coming soon!
    --------------

    Do you want to take your Unity URP project to HDRP level? Do you want High-quality lighting on dynamic objects?

    Then check out my new Assetstore tool! Still wip, but I want to share my progress and hear your thoughts!

    Play the VIDEO!!

    MF.SSGI - V1.1 - WebGL demo scene - Compare.jpg

    MF.SSGI - Kowloon - Props shadows.png


    Or go to my other forum post with a lot more work-in-progress images and video's:
    Go to thread!

    MF SSGI will soon be released on the Asset Store and is ideal for dynamic games like: City-builders, games with level-chunks, customizable interiors, etc. Since it runs on DirectX 11 and OpenGL, I will also port it to the Built-in render pipeline once everything is ready!

    What are we looking at?
    - Highly optimized handwritten shaders
    - ZERO bake times, nothing is static, no Unity GI
    - DirectX 11 and OpenGL support!
    - Runs on WebGL and (modern) mobile phones
    - No RTX/DXR Raytracing required, works any GPU that supports Shader model 3.0

    MF.SSGI - SampleScene - 2022-09-08-17-15-16 - ON.png


    MF SSGI unique features
    - Raymarched shadows from/to each pixel on the screen! Most other SSGI solutions need lightsources to be assigned. Not this one, each pixel is considered a lightsource, each with their own shadow trace. This creates super natural and smooth occlusion.

    - Realtime Thickness map: Most SSGI solutions just have a default 2.5D object "thickness". As the depth-buffer is just flat, a thickness is needed to predict if light can move 'behind' an foreground object. Other solutions have a fixed value or mask for this, making 2 different props the same thickness. MF SSGI outputs a realtime thickness-map so that shadows are natural and accurate.

    Current build: Unity 2021.3.0f1 - Universal Render Pipeline - Forward/Deferred rendered
     

    Attached Files:

    Last edited: Jan 12, 2023
    Kin0min, NotaNaN, AasifHaque and 9 others like this.
  2. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    849
    Very exciting. How well suited do you think it is to large outdoor scenes? I saw that you're testing with the Viking village sample, so hopefully large spaces are well handled.

    We have environments that are 64 square kilometers. Since you are working in screen space, does that mean this should be ok?

    What are the important environmental constraints on your solution?

    Keep up the great work. I look forward to purchasing it.
     
  3. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186

    Hi!

    I think there aren't any constraints in that regard. A lot of GI tools use voxels etc, this is all screenspace. I did test it at Viking Village and everything worked without any noticable artifacts. I did notice that even the mountains in the background were lit, that would be a bit overkill I think, so I will add a max-distance feature to it.

    Thanks for the great question!
     
    hkalterkait and Claytonious like this.
  4. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    849
    In that case, I'm ready to give it a try. Be sure to charge enough to make it worth your time to properly support it and continue to improve it in the future.
     
    Michiel-Frankfort likes this.
  5. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Hi!

    Yeah I'm still wondering what this asset should cost. What would you consider a fair price for such a tool?

    I do agree with your advice; I've launched 2 assets (multi threading and debugger) way back nearly 8 years ago and supported it for over 3 years before I deprecated it due to new Jobs-system and piracy.

    I hope times have changed a bit, so I want this tool to be a success for many years as URP is not going anywhere and will be the default once built-in is deprecated.

    Please let me know what would be a fair price, I could use some input here.

    Thanks!!
     
  6. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    972
    Something between $60 and $200 :)
    If it will support Vulkan and mobile devices and will have performance/quality slider that I more for 200 than for 60 :)

    Do you have some stat on how many ms/frame system costs for different devices/screen resolutions?
     
    Michiel-Frankfort likes this.
  7. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,036
    to $200 is crazy, there's already SSGI for URP, fairly new and from known asset store members.
    They sell it for $49.

    I'll say it mostly depends on the quality. How does it compare to other SSGI assets for URP?

    something in the range of $30 to $90 is reasonable, depending on quality & stability.
    Can we get a built demo? Ideally with two scenes, interiors & exteriors (open world/vegetation/terrain). Or even better one that mixes the two, so you can see how interiors look when there's skybox lighting and exteriors without any baked lighting.
     
    Michiel-Frankfort likes this.
  8. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    I have a WebGL demo ready. Its still WIP as I will add more showcases to the build over time.

    You can play it here!

    Controls
    - Space = Toggle Orthographic cam
    - Enter = Enable/Disable SSGI
    - WASD = movement
    - Right-mouse drag = camera rotate
    - Shift = speedup

    Note: If performance is poor and you are running on a laptop, please make sure your webbrowser runs on your NVidia/AMD GPU, and not the Intel integrated graphics!
     
    greene_tea92, Stardog and adamgolden like this.
  9. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    I don't mind the price as long as things stay updated, imo too many major assets sometimes seem to struggle with income to keep updating.

    I tried the other asset though and was dissapointed in the results (but their SSR asset was phenominal). so we'll see.
     
    Michiel-Frankfort likes this.
  10. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    I tried the demo, the effect of the light passing through the curtain and creating light on the floor was supurb!

    One thing i've been curious about is if solutions like this can also work as SSAO solutions. I saw this in Ghost Wire Tokyo where there was an SSGI and and SSAO option and the SSGI did both which complemented the rendering very well.

    It kind of seems like such a thing would work well here...
     
    Michiel-Frankfort likes this.
  11. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    849
    $200 or even higher would be just fine if the solution is robust, well documented, and supported for the long run. We use Jason Booth's Microsplat extensively for those reasons. He has built himself a model where every major new version of URP causes a new $20 charge (or something in that neighborhood), so he can continue to support it over time with ongoing revenue. Seems fair to me.
     
    mgear, Michiel-Frankfort and Jes28 like this.
  12. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186

    Yeah that's fair game; if an asset is pirated or doesn't sell enough units its obvious devs stop developing it. I hope it sells well when I release, lots of work still ahead.

    Perhaps I will start low, a friendly early-access version. Once all bugs are ironed out and people are happy I can up the price over time.

    Thank you guys for your input, much appreciated!
     
    hkalterkait likes this.
  13. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186

    Thanks for the kind words!!
    SSAO would indeed be possible as all the required math/tech is already build. I could use the raymarching to do some very fancy AO indeed, I could add it as an option for sure! Thanks for that great idea!
     
    hkalterkait and Jes28 like this.
  14. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    Awesome!

    Just to show what I mean here's a screenshot comparison from ghostwire, all other graphics settings being the same

    SSGI


    SSAO


    Integration with URP12's SSAO shader implementation would also be nice.
     
  15. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186

    To get back at your question; I will do another full fledged Viking Village test soon and I'll capture it.

    I'm roughly one week away from an early release, if you are interested I could send you a version to try out.
     
    Claytonious likes this.
  16. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    849
    @PutridEx , which $49 asset were your referring to, btw?
     
    Michiel-Frankfort likes this.
  17. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186

    Yeah I know there are a few SSGI assets out there, but most require either some sort of baking, or are DX12 only due to raytracing. I did find a URP SSGI/colorbleed asset but it only supports Deferred.

    My closest competition is Upgen and it is different in many ways. Its not SSGI, it even requires colliders for surfaces to produce bounce lights. Lights require additional components, etc. It also requires manual setups per scene, where fast lights and other components need to be setup. Raytraced shadows only come from Unity-lights, not other emissive surfaces like my raymarched shadows do. Also I think for the HQ raytraced results lights should even be static/not moving it appears, but I could be wrong about that.

    In general my asset is meant to be hands-off: just add the renderfeature, tweak some artistic and quality settings, and done. It doesn't matter if you use dynamic lights that move, emissive objects that change constantly, all of it is contributing to the final result, each pixel is a lightsource and has super fast raymarched shadows.

    The WebGL demo I put online is just one single Renderfeature, no scene tweaks or additional setup/baking/components/workarounds. All lights and props are dynamic and can move around freely with zero baking/setup.
     
    Jes28 likes this.
  18. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,036
    Claytonious likes this.
  19. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    I have updated the WebGL demo with improved shadows, colorbleeding & performance.

    You can play it here!

    Controls
    - Enter = Enable/Disable SSGI
    - WASD = movement
    - QE = Up/Down
    - Right-mouse drag = camera rotate
    - Shift = speedup
    - Space = Toggle Orthographic cam

    Note: If performance is poor, make sure your webbrowser targets an NVidia or Amd gpu as Intel integrated graphics doesn't like WebGL all that much...

    MF.SSGI - SampleScene - 2022-09-12-13-23-07 - Compare.png
     
    PutridEx likes this.
  20. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,036
    link gives 403 error, no permission to access
    A desktop demo would be ideal, something like the viking demo with SSGI toggle.
    Ideally no changes to skybox lighting or anything, just SSGI on/off
     
    Michiel-Frankfort likes this.
  21. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186

    Hi! Its back online, I just uploaded a little change.
    Quick note: If you've played it before, please clear your browser cache before launching it.
     
  22. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    Nice it kind of looks like it's creating SSAO and shadows now :O

    Or maybe thats just cause the scene is dark?

    Thats pretty crazy XD

    Now here's a question, one issue i had with the other asset is it didn't look right on my character which was one of the main reasons I considered SSGI. You should add a demo for that.

    The impact on environments seems easier to pull off than on characters somewhat.
     
    Last edited: Sep 12, 2022
    Michiel-Frankfort likes this.
  23. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    No you're absolutely right, foreach pixel shadows are ray-marched to each light-source. And since every other pixel is potential light source, its super soft and accurate AO.

    I love the character idea, I will find some nice assets and add some animating characters to it!
     
    sacb0y likes this.
  24. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,286
    Nice work!!I like that it will also come to build in !
     
    Michiel-Frankfort likes this.
  25. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    upload_2022-9-12_21-6-47.png

    Hm, I do think i would expect darker shading inbetween the barrels here.

    But maybe that depends on settings?
     
    Michiel-Frankfort likes this.
  26. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Yes for sure its based on the settings. I picked a setting that works well for all showcases in the scene. From Toony interrior to gritty Viking Village. I can easily boost the shadows and occlusion, but its also personal taste ofcourse. I don't like it when shadows are fully black, but that's up to the user eventually.

    In addition, good old AO can be added for additional shadowing if you prefer. The combination is quite nice because it allows for faster raymarched shadows, saving a ton of performance.
     
  27. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Thanks!! I will focus on URP for now, but when that's a success I will definitely go for Built-in.
     
    Lars-Steenhoff likes this.
  28. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Hi all!

    By request: I build the Viking Village demo for WebGL. This demo already had some great baked GI, but in order to showcase SSGI properly, I removed the baked GI.
    Why? because that's exactly the idea: Dynamic scenes, nothing baked, all realtime!

    You can play the demo HERE!

    Controls
    C = Toggle Animated/Third-person camera
    Enter = Toggle SSGI ON/OFF
    WASD = Movement
    Space = Jump
    Double-space & Hold == Fly
    Ctrl = Decend

    SSGI - Viking Demo - Compare.png

    Notes:
    There are still a few visual artifacts, I'm working to reduce these at acceptable performance levels.
     
    florianBrn and PutridEx like this.
  29. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    Will there be options in how the lighting is applied to the result?

    Having more options will allow th effect to work for more art styles.
     
    Michiel-Frankfort likes this.
  30. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,286
    Like what kind of options? such as overlay/multiply/additive?
     
    sacb0y and Michiel-Frankfort like this.
  31. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Yes there are, a ton of tweaks including gi and shadow color, falloff, intensity, a lot of raymarch shadow options, occlusion options, light emission and receive options, etc. In fact at the moment there are too many options so I'm splitting them up into Basic and Advanced settings
     
    Jes28 and sacb0y like this.
  32. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    Cool, cause someone suggested the effect would be nicer if it was multiplied, or as they said it "SSGI result by multiplying it with albedo color like lighting usually does".

    Which my guess is they mean light is processed greater than 1 and shadow is less than 1.
     
    Michiel-Frankfort likes this.
  33. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Hi!

    Yes this is due to a limitation of Forward rendering. This is a non issue when selecting Deferred renderer as you can see here in these images below. Unfortunately WebGL doesn't support Deferred rendering, so I have to 'guestimate' a albedo pass without shadows/fog/shading in order to achieve the same result. Especially in dark area's there isn't enough color information to rework proper compositing, an issue Deferred doens't have.

    Check out my new screenshots!

    MF.SSGI - Deferred vs Forward - 02.jpg

    MF.SSGI - Deferred vs Forward - 01.jpg
     
    Lars-Steenhoff likes this.
  34. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    Ooooh interesting, good to know.

    Perhaps if it integrated at a shaderlevel? I think thats how Unity tried to solve this issue.

    Then the shader determines how to resolve the effect.
     
    Michiel-Frankfort likes this.
  35. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,843
    Since when? I thought it did last time I used it.

    Edit: I just realised this is URP.
     
    Michiel-Frankfort likes this.
  36. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Hi guys and gals! Over at Little Chicken Game Company we are working on an new IP, here is a little sneak-peek what MF.SSGI can do for you!

    Link to HQ Animated-gif!

     
    sacb0y and Lars-Steenhoff like this.
  37. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Hi all, I have updated the SSGI WebGL demo's. A lot of improvements have been made. Just to list a few:

    - Found a way to 'reconstruct' the Albedo pass in Forward rendering, so the visual difference between Forward and Deferred has diminished. In the past Deferred just looked way better, Forward is now very similar.

    - Rebuild the Denoise pass: much more stable (less flickering), faster and improved contrast/light definition.

    - Improved performance by nearly 50% for the same (or even better) visual quality.

    - A lot more control over shadows and other light settings, resulting in I.e. much softer occlusion in the Viking Village scene when looking at Vegetation.


    SSGI Showcase scene:
    You can play it HERE!

    Controls
    - Enter = Enable/Disable SSGI
    - WASD = movement
    - QE = Up/Down
    - Right-mouse drag = camera rotate
    - Shift = speedup
    - Space = Toggle Orthographic cam



    Viking Village demo:
    You can play the demo HERE!


    Controls
    - C = Toggle Animated/Third-person camera
    - Enter = Toggle SSGI ON/OFF
    - WASD = Movement
    - Space = Jump
    - Double-space & Hold == Fly
    - Ctrl = Decend

    NOTE: Please make sure your webbrowser is running on a dedicated NVidia or AMD gpu, not Intel integrated.

    I'll post some comparison screenshots soon!
     
    Lars-Steenhoff and PutridEx like this.
  38. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Here are some new screenshots of the WebGL Viking Village demo!

    MF.SSGI - Viking Village - 01.jpg

    MF.SSGI - Viking Village - 02.jpg

    MF.SSGI - Viking Village - 03.jpg

    MF.SSGI - Viking Village - 04.jpg

    MF.SSGI - Viking Village - 05.jpg
     
    Wattosan and Lars-Steenhoff like this.
  39. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,286
    Would this possibly run on Nintendo Switch?
     
    Michiel-Frankfort likes this.
  40. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Yes, I think so... but at much lower quality settings for sure. I'll be taking a Switch devkit home next week, so I can test it.

    If it works, I will add Mobile/Switch presets
     
  41. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    Ooo very interesting :D

    I'll try the demo when I get power again XD
     
    Michiel-Frankfort likes this.
  42. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,286
    That sounds promising:) Thanks
     
    Michiel-Frankfort likes this.
  43. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Check out Little Chicken's new game: BlitzGT!

    I just tested SSGI in Deferred-mode, here are some screens:

    mfssgi_-_blitzgt_-_heavy.jpg

    mfssgi_-_blitzgt_-_medium_rear.jpg

    mfssgi_-_blitzgt_-_medium_front.jpg
     
    Lars-Steenhoff likes this.
  44. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    Ooooo very nice!
     
  45. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    One more for the fans! :p

    SSGI - BlitzGT - BonedryMedium.jpg
     
    doomquake, ZhavShaw and florianBrn like this.
  46. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    I have updated the Demo's again. This time with a split-screen compare when hitting Enter.

    SSGI - coverage.png

    SSGI Showcase scene:
    You can play it HERE!

    Controls
    - Enter = Enable/Disable SSGI
    - WASD = movement
    - QE = Up/Down
    - Right-mouse drag = camera rotate
    - Shift = speedup
    - Space = Toggle Orthographic cam



    Viking Village demo:
    You can play the demo HERE!


    Controls
    - C = Toggle Animated/Third-person camera
    - Enter = Toggle SSGI ON/OFF
    - WASD = Movement
    - Space = Jump
    - Double-space & Hold == Fly
    - Ctrl = Decend

    NOTE: Please make sure your webbrowser is running on a dedicated NVidia or AMD gpu, not Intel integrated.
     
    lilacsky824 likes this.
  47. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    In the villige demo when the effect is toggled on the resolution drops. Seeing this when i play at full screen on a 4k.
     
    Michiel-Frankfort likes this.
  48. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    Hi, its not so much that the resolution drops, I limited it to 1080p. This is a setting you can change. When the resolution doubles, 4x as much pixels needs to be sampled and that was hitting a memory bandwidth bottleneck on my laptop. I'll look into it and see if I can improve on that without losing too much performance
     
  49. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    186
    I uploaded a new Video!

    Its the basic SSGI setup I did for BlitzGT, Little Chicken's newest racegame. I hope you like it!

    Cheers!

    SSGI - BlitzGT setup - Youtube thumbnail.png
     

    Attached Files:

    Lars-Steenhoff likes this.
  50. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    573
    Michiel-Frankfort likes this.