Search Unity

Temporal Anti Aliasing

Discussion in 'Works In Progress - Archive' started by SuperShaderBros, Mar 20, 2015.

  1. SuperShaderBros

    SuperShaderBros

    Joined:
    Mar 19, 2015
    Posts:
    6
    Hi everyone!
    We are developing a temporal anti aliasing solution, and we love to get your feedback on the topic.
    Unity's best available AA solution is FXAA which is a little dated and provides no improvement on subpixel aliasing caused by movement.
    In the web player demo you can compare our Temporal AA with Unity FXAA3 and no AA. No dynamic objects are present in the scene as of now, because motion vector implementation is not finished yet.

    Here is a comparison screenshot. Left side is no aa and right side is our temporal AA solution. (Do not forget to look in native resolution)


    Our TODO list is as follows:
    -Finishing motion vector calculations
    -Detailed performance analysis
    -Mobile support and tests

    If you have any questions or suggestions, feel free to share. Thank you all.

    Edit: dx9 and opengl fixed, demo re-uploaded
     
    Last edited: Mar 22, 2015
  2. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,609
  3. LilWiebe

    LilWiebe

    Joined:
    Sep 25, 2012
    Posts:
    69
    Hmm. Demo strobes black and white on a 13 inch 2012 Macbook Pro with Intel HD 4000 graphics. Is this Direct X only?
     
  4. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    The webplayer is not working on my Macbook Air 2010 either. Graphics chip: Nvidia GeForce 320M.
     
  5. SuperShaderBros

    SuperShaderBros

    Joined:
    Mar 19, 2015
    Posts:
    6
    Sorry for that guys. We found the cause of the problem. We will fix it tomorrow and re-upload the demo. Thank you for your feedback.
     
  6. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    That looks absolutely brilliant. I can't believe how well it sorts out those metal steps in the background. Really looking forward to getting my hands on this!
     
  7. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    really neat antialliasing , looks like the pal/ntsc filtering in cinema4d great job!
     
  8. tynew

    tynew

    Joined:
    Sep 25, 2013
    Posts:
    122
    This looks great, will buy it asap!
     
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    Superb, what is the release date estimation ?
     
  10. jcarpay

    jcarpay

    Joined:
    Aug 15, 2008
    Posts:
    561
    Awesome!
     
  11. SuperShaderBros

    SuperShaderBros

    Joined:
    Mar 19, 2015
    Posts:
    6
    The issues should be fixed now, we tested on a 2012 macbook pro. You can reach the demo from here, also we updated the link above.

    We are planning to release final version in a month, if everything goes smoothly. Most of the time will be spent on ease of integration and testing
     
  12. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    Thanks, looking forward to it, the result looks super smooth
     
  13. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Working great on Mac now.:)
    By the way, how is the performance compare TAA to unity FXAA?
     
  14. SuperShaderBros

    SuperShaderBros

    Joined:
    Mar 19, 2015
    Posts:
    6
    The code is not optimized yet so we cannot say anything certain about that. Right now, it is a little bit slower than fxaa. We will share exact timings after optimizing.
    Also motion vector calculations will induce some draw call overheads which scales with dynamic object count. But these motion vectors can also be used for object motion blur which compliments TAA very well and we plan to implement that after TAA.
     
  15. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    this looks awesome! I'm going to warn you however that unity are working on there own form of txaa. don't know how long it will take for them to get it done though. on the upside unity is getting a built-in velocity buffer later! keep working on the awesome stuff though =3.
     
  16. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    There's no guarantee Unity will come up with anything at any point though. Unity is a company staffed by fairies and gnomes which populate a wondrous underworld filled with lights and music, with golden tunnels and vast underground cities, where taps dispense magic.

    The downside of this is that they can't really guarantee something by x date.
     
  17. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    will buy asap, unless Unity does something first, but it's already on my to-buy-list :D
     
  18. unityTesting

    unityTesting

    Joined:
    Jan 13, 2015
    Posts:
    3
    It's an instant buy when it's released. Good work!
     
  19. MylesLambert

    MylesLambert

    Joined:
    Dec 31, 2012
    Posts:
    61
    I really love what this is doing to geometry aliasing - works really well!
    But I'm suprised nobody else has mentioned - it's blurring the textures far too much! You're loosing a lot of smaller details. I'm not too sure if it's caused by a sort of 'motion blur'?
     
  20. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    its a problem with txaa. kinda part of the technique sadly. between frames you pick up sub-pixel information. the way to fix this is to say that if a pixel has not changed trust the pixel value rather than sampling a bunch more from previous frames. downside is it will restore texture aliasing which is really common with PBR(can have really bright specular highlights that alias really bad). either way its an effect that will happen with TXAA in most cases. unreal for example has this problem still.
     
  21. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    very nice. for some solutions it will need asap.
    yes, its bluring textures a bit. play assasins creed unity for full test different modes AA. better to use txaa in there, because game almost every time in motion and there is no time to see textures, but AA roofs and ships and stairs and... much more other.
     
  22. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Would really like to see a second (standalone) demo with the new Unity Labs!
    ( https://www.assetstore.unity3d.com/en/#!/content/33835 )

    Currently it looks absolutely terrible with FXAA and flickering edges and I'm wondering whether this method can fix it.

    Basically, just grab the demo from the asset store, add the temporal AA and some way to toggle it, no other modifications. So we can make a side by side comparison. :)
     
    Last edited: Apr 5, 2015
  23. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    321
    Will this work within webGL? Keep up the awesome work
     
  24. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    > 3 weeks since OP's last post here :(
     
  25. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Guess it's dead
     
  26. DennG

    DennG

    Joined:
    Dec 5, 2013
    Posts:
    158
    Well, that's sad...
     
  27. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
  28. SuperShaderBros

    SuperShaderBros

    Joined:
    Mar 19, 2015
    Posts:
    6
    Hi guys, it is not dead but it is going slow because we have been busy with our academic studies. We are inspecting Unity Labs scene with our TAA, trying to fix some bugs and improve the quality. As soon as we are satisfied with the result, we will share a new demo.
     
    shopguy, Zomby138, blueivy and 6 others like this.
  29. andmm

    andmm

    Joined:
    Nov 21, 2013
    Posts:
    37
    This does look impressive.

    Looking forward to this :)
     
    TechnicalArtist likes this.
  30. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    any chance to beta?
     
    loisharris likes this.
  31. Rycons

    Rycons

    Joined:
    Nov 23, 2013
    Posts:
    31
    How is development going? Really looking forward for TAA
     
  32. andmm

    andmm

    Joined:
    Nov 21, 2013
    Posts:
    37
    Yeah, any developments on this?
     
  33. SuperShaderBros

    SuperShaderBros

    Joined:
    Mar 19, 2015
    Posts:
    6
    Hi again,
    We added the current state of our algorithm to Unity Labs scene. You can check interactive photo comparison and you can download the standalone build(Windows only) for further testing. In standalone build you can change the AA mode with f1-f2-f3 keys.
    Any feedback is appreciated.
     
  34. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    It looks amazing when standing still, however it doesn't when moving:

     
    Rycons and theANMATOR2b like this.
  35. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    It looks... Blurry, to be honest. FXAA was already quite blurry but your TAA implementation loses even more details (and yet the textures in this scene are quite smooth to begin with, I can't imagine how this will look on detailed textures), even on stills (cf. the hair, ground, walls on your interactive photo comparison, it's even worse in the distance). I'll take a wild guess and say that something's wrong with your temporal reprojection pass.
     
  36. CorvaenOboros

    CorvaenOboros

    Joined:
    Jun 24, 2013
    Posts:
    2
    looking good ! we are definitely interested in implementing this in our project! we'll be keeping an eye out for when released on the asset store.
     
  37. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    I'm really impressed by how it looks :)
     
  38. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    422
    Hi SuperShaderBros. Do you have any ETA when this plugin will be released? Would gladly buy it now and be a beta tester for this. I think that this could be a must have AA solution for every VR developer who is working with PBR.
     
    Last edited: Jun 6, 2015
  39. s0w4

    s0w4

    Joined:
    Aug 15, 2014
    Posts:
    3
    Please! Release! I'm already satisfied with the demo.
     
    Rycons likes this.
  40. DeYuang

    DeYuang

    Joined:
    Sep 14, 2012
    Posts:
    12
    Your TAA solution looks quite good, especially with downsampling (because it IS a bit blurry). Too bad the standalone project is TERRIBLY unoptimized. Even without the AA it ticks in at around 35 fps, while my own (Unity 5) game clocks in well over 100 FPS, while controlling ~50 pathfinding agents and having real-time Ambient Occlusion enabled. It does appear that the AA is quite fast though, barely taking off 3 fps even on high resolutions, but you know, can't be too sure with framerates this low.

    On another note: I recall some time ago, when a studio was showing off their HBAO shader. At the time -at least to my knowledge- Nvidea wasn't offering anything on their own. I would've paid good money for their implementation, but for some reason they never sold it. Now, Nvidea is offering it for *free*, shutting down that studio's chance to ever make money with their shader. Morale of the story: these kind of effects have a limited shelf-life. If you do intent on making money with this, please do so before someone else steals your thunder.
     
  41. andre-ivankio

    andre-ivankio

    Joined:
    Mar 29, 2010
    Posts:
    53
    I'm guessing it could be the thing missing for VR on Unity. Aliasing is so headache inducing, and it would be great to have stable edges, specially those speculars. I'll second:
    Don't mind the nagging. People don't know how to compromise and be less subjective. Although not perfect, the stability+those artifacts look better than sharp+eventual aliasing.
     
  42. Rycons

    Rycons

    Joined:
    Nov 23, 2013
    Posts:
    31
    Hi SuperShaderbros, Is this TXAA still being developed?
     
  43. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    This is so frustrating. TXAA is so close yet so far away.
     
  44. Bdelcast

    Bdelcast

    Joined:
    Jul 11, 2014
    Posts:
    25
    That demo looks quite good already :eek:. I would love to receive updates on how this is coming along. Looking forward to seeing the finished product. Great work.
     
  45. cAyouMontreal

    cAyouMontreal

    Joined:
    Jun 30, 2011
    Posts:
    315
    Any news/updates? We do want TXAA in our projects !
     
  46. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    Any updates?
     
  47. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    This *is* WIP not asset forum guys.
     
  48. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    However, not posting for 3 months usually means the project is dead.
     
  49. MegsTan

    MegsTan

    Joined:
    Oct 19, 2013
    Posts:
    55
    Dead? oh no. Is there any asset in the store where we can find TAA? This is really needed in Unity 5 feature
     
  50. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    For what it's worth I quite like the non existent performance hit of FXAA and it's pretty hard to see jaggies when you've loaded it up with post fx anyway.