Search Unity

SSAO for mobile platforms - works great even on 2012 hardwares !

Discussion in 'Works In Progress - Archive' started by G-Mika, Jun 24, 2015.

  1. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    SSAO is a screen space effect used to simulate low and medium frequency shadows. This is used in most modern AAA games since Crysis, and it is also an effect that often will take a big chunk of your performances on desktop games.

    I did some test on mobile platforms to see if SSAO was viable. After a lot of heavy optimizations based on how mobile architecture works, I have been able to make this effect running well on older mobile hardware with good performances and with very acceptable quality :)

    You can see my current progress here:


    I currently test on dated mobile hardwares (2012) and it works with acceptable performance/quality. This means that it would probably be very usable on more recent hardwares.

    I optimized the effect for the Galaxy S3 and the more powerful Nexus 4, both have been released in 2012. I currently have the Nexus 4 running the effect at what I consider medium quality with a framerate of about 40 FPS within a simple test scene. The galaxy S3 is running a much simpler version at 30 FPS, this simpler version run at about double the framerate (60FPS) on the Nexus 4.

    The medium quality settings cost about 0.1-0.2ms to compute on my desktop (AMD 7970)

    You can see a screenshot of the highest mobile quality setting here, running at 15/20 FPS on the Nexus 4:

    with SSAO/without SSAO:

    SSAO buffer:




    My time is limited but there is a good chance that I release an SSAO adapted for the mobile architecture on the asset store this year. I'm posting here to see if there is an interest for high end mobile effects such as this ssao effect :)
     
  2. IndieAner3d

    IndieAner3d

    Joined:
    Oct 20, 2014
    Posts:
    77
    HeyThere ^^

    Are you still work on this...
    If yes
    Can you show/tell us something about your progress...!?!

    greetz
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I'm interested - but for consoles. Speed is always a premium, not just for mobile :) You've done a lot of post stuff so maybe it's time to do one similar to scion?
     
    DizzyTornado likes this.
  4. zyzyx

    zyzyx

    Joined:
    Jul 9, 2012
    Posts:
    227
    I'm interested as well!
     
  5. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    @IndieAner3d :
    I haven't had a chance to work on this since I made this thread. I'm extremely busy right now with contracted work, I should have much more time to work on Unity assets next week. I first need to finalize some updates to my existing assets then I hope to gives some news in the next couple of weeks about this mobile SSAO effect.

    @hippocoder :
    Yes the SSAO would be usable on console/desktop, but it would still be an effect targeting mobile devices. Also, I could make a post process stack, only time is missing :)
     
    DizzyTornado, Arkade and IndieAner3d like this.
  6. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Interested too!
     
  7. radimoto

    radimoto

    Joined:
    Aug 23, 2012
    Posts:
    257
    Registering my interest. Cheers!
     
  8. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,609
    Looks good. Will buy it if it's released!
     
  9. pcg

    pcg

    Joined:
    Nov 7, 2010
    Posts:
    292
    Me too!
     
  10. saverio-caminiti

    saverio-caminiti

    Joined:
    Sep 17, 2015
    Posts:
    1
    Interested.
    I can beta test on iPad Retina, iPhone 4, Galaxy Tab.
     
  11. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    @G.Mika Looks really cool, have you had much luck getting this up on the store yet?
     
  12. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    I have some good news!

    I paused the project a while ago because of a bug in the Unity android renderer that was making some arbitrary devices to use the depth map inefficiently. This was making the project nonviable for android devices at least. However, this problems seems to be fixed in the latest unity version, and I'm looking to release the effect soon.

    I'm also interested in doing beta test for the effect, if anyone is interested please contact me via private message. I would like to see how the effect is performing on various devices and environments.

    I wil alsol be looking into developing multiple optimization strategies for advanced graphics pipeline on mobile platforms, some of which might be included in the final mobile SSAO package.
     
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I'm also interested in it for PS4 (although haven't time to assist in testing this second) - would it provide a good perf boost there or is that a different set of bottlenecks?
     
  14. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    It depends on what quality you are looking for, but yes you might get a performance boost. This effect doesn't rely on per pixel normals however, only the depth map.
     
  15. Cyrien5100

    Cyrien5100

    Joined:
    Oct 17, 2012
    Posts:
    145
    Can you post a screenshot on medium quality ? I'm interested in this for VR applications.
     
  16. Mikejmc

    Mikejmc

    Joined:
    Mar 2, 2015
    Posts:
    21
    Interested +1. I am looking at AO options but I ruled out screen space effects due to performance.
     
  17. nhamg

    nhamg

    Joined:
    Sep 13, 2014
    Posts:
    4
    I would also love to stresstest this. Available devices: Ipad Pro, Ipad Air 1+2, Ipad 2+3+4, Nexus 5, Dell 7840, Toshiba AT270.
     
  18. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    I'm going to give some news about my progress. First, I'm almost done with the beta, I need to fine tune some stuff and I will I will be done. I'm going to participate to the global game jam this week end, this means that I won't have time to finalize the beta test version until next week.

    I'm also working on an another related project called OGFX which is a collection of graphics optimizations/tools/effects that are especially useful for mobile platforms. I will include a first draft of this project with the SSAO package to help you optimized your graphics pipeline. This project is part of the reason why it takes me a bit more time than planned to send you the beta test version of the SSAO effect.

    I made some gif to show you different quality settings of the SSAO:

    Highest Settings:


    Medium Settings:


    Lowest Settings:


    Note on performances:
    The medium quality version run very well on current high end mobile devices. I'm getting more than 60 FPS(Capped) on the Tegra K1 (Nexus 9, Shield) on this scene.

    Current medium/low end devices will have troubles running more than the low end version or in-between low end and medium version. Don't expect more than 30 FPS on those devices.

    For the lowest settings, the instruction count of the shader is about 30-40 depending on what changes I am making. In comparison, the lowest instruction count I found by compiling the other SSAO effects on the asset store was about 170 (if I remember correctly). This is not the only thing that defines performances however, I made other optimizations.
     
    Arkade likes this.
  19. Haagndaaz

    Haagndaaz

    Joined:
    Feb 20, 2013
    Posts:
    232
    Oh how i desire this!!
     
  20. AlanLadd

    AlanLadd

    Joined:
    Feb 12, 2015
    Posts:
    40
    Hi G.Mika,
    Any chance this will work on Ipad Pro?
     
  21. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    Yes there shouldn't be any problems running it on the Ipad Pro, it's a stronger device that what I'm using in my tests. In terms of IPad, it should run well on anything as good or better than the Ipad Air 1.
     
  22. AlanLadd

    AlanLadd

    Joined:
    Feb 12, 2015
    Posts:
    40
    Hello Mika,
    When can we get or buy the beta?
    Thanks
     
  23. nhamg

    nhamg

    Joined:
    Sep 13, 2014
    Posts:
    4
    Hi, any update on this?
     
  24. musolo

    musolo

    Joined:
    Sep 12, 2014
    Posts:
    238
    Great work! Can you tell us about other effects youmentioned? I making android game and this is best news about post effects i`ve heard in years!
    What is list of effects you planning to releace?
    Any chance of blum effect?
     
  25. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    I decided to do a full image effects stack instead of simply doing SSAO as a standalone effect.

    I did some major optimizations in the Unity graphics pipeline that was highly profitable to the whole image effects pipeline. Doing image effects on mobile has a big performance impact and to make room for high end effects you need to optimize the whole effects pipeline with it.

    I'm now able to get a basic version of the SSAO working at more than 60 FPS on the 2012 Nexus 4. My goal is to have a full image effects pipeline (Bloom, DoF, SSAO, Color Grading, and more) working at around 30 FPS on some older hardwares like the 2012 Nexus 4 in a 3d game scene.

    This, of course, is pushing the release date, but SSAO as a standalone effect wasn't viable enough if I wasn't going for the whole image effects pipeline instead.
     
    Howard-Day likes this.
  26. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Would be interested to see how this compares to the new Cinematic SSAO, I know that also runs very very well on mobile as well.
     
  27. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    You talk about the keijiro SSAO? On the twitter post, the it was running 24 FPS at the lowest settings on the IPhone 5, this is not what I would call viable. My mobile SSAO at some at the most optimized configuration/settings is running a 60+ FPS on phones that are far less powerful than the IPhone 5 at similar resolutions. There are ways to make it run even faster.
     
    zugsoft and Howard-Day like this.
  28. musolo

    musolo

    Joined:
    Sep 12, 2014
    Posts:
    238
    Give it to me man!
    What is first on the list? Bloom, DoF, SSAO, Color Grading or something else?
    Could you tell when approximately you`ll have some of theese effects ready foe release?
    What would be the price? So i start to save my meal money:)
     
  29. bchevalier_k

    bchevalier_k

    Joined:
    Jun 3, 2016
    Posts:
    3
    Hi @G.Mika , this looks amazing. Are you close to publishing the asset ?
    If not I'd love to beta test as I am currently working on a project that would greatly benefit from it.

    Thanks !
    ben
     
  30. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    321
    Hej Mika. Please go ahead and publish what you have in terms of SSAO, would happily pay decent money for this now. You can always raise the price with the other effects as they're made available.
     
  31. kingdomheartstao

    kingdomheartstao

    Joined:
    Dec 11, 2015
    Posts:
    2
    Coool! cant wait too see that relase
     
  32. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    The same, I can pay now for very basic feature,and pay more for future features
     
    arumiat likes this.
  33. alvaro-em

    alvaro-em

    Joined:
    Feb 23, 2012
    Posts:
    77
    Any news on this? We would indeed be also very interested on it! Thank you!
     
  34. Andreich_RU

    Andreich_RU

    Joined:
    Jul 21, 2016
    Posts:
    2
    @G.Mika , it's amazing! Waiting for release or beta-test.

    Shut up and take my money!))
     
  35. tylo

    tylo

    Joined:
    Dec 7, 2009
    Posts:
    154
    G-Mika, as you can imagine, I too am interested in getting efficient SSAO working on mobile. It's a market ripe for the picking. Get there before someone else does!
     
  36. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
  37. Andreich_RU

    Andreich_RU

    Joined:
    Jul 21, 2016
    Posts:
    2
    Sadly, but it looks like dead.
     
  38. Eriks-indesign

    Eriks-indesign

    Joined:
    Aug 15, 2012
    Posts:
    50
    Any updates on this? :D
     
  39. Will_Dev

    Will_Dev

    Joined:
    May 24, 2017
    Posts:
    27
    Dead? :(((
     
  40. dozhwal

    dozhwal

    Joined:
    Aug 21, 2014
    Posts:
    59
    dead? :p
     
  41. lucca_unity

    lucca_unity

    Joined:
    Mar 24, 2020
    Posts:
    3
    Dead?
    @G.Mika Come on, we need it.