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.
  2. Dismiss Notice

Temporal Anti-Aliasing

Discussion in 'Image Effects' started by Tim-C, Jun 21, 2016.

  1. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Going forward with render pipelines you don't get options for TAA any more, just on/off. So you will have to revisit if you're planning on using 2019.1 onward with HDRP for example.
     
    Teosis likes this.
  2. Teosis

    Teosis

    Joined:
    Jan 24, 2018
    Posts:
    22
    Thank you for giving the heads-up, much appreciated!
     
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Totally should try it out before worrying too much though, it's all been improved a lot (as of 5.6)
     
  4. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520
    That indeed happens if the surfaces don't output depth. Transparent items are generally not supported by TAA, but they seem to work better if they overwrite depth. (So the thing behind it is incorrect.) Otherwise it needs to be added after TAA.
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It should still be fixable though, so is it just small weapon rendering causing it?
     
  6. Andrei_K_

    Andrei_K_

    Joined:
    Nov 9, 2018
    Posts:
    1
    We switched to Unity 2019.1 recently and new TAA solution actually causing problems, and specifically with ghosting trails after the fast moving objects (like racing cars), almost the same as we experienced in UE4 with default TAA settings when we were using it.

    So my question will be if those settings (Jitter, Blending, Sharpen) would be somehow still accessible (in UE4 they are accessible through console)? As those settings apparently are needed to reduce those nasty ghosting artefacts, which we got after 2019 update.
     
    Unlimited_Energy and NeatWolf like this.
  7. Unlimited_Energy

    Unlimited_Energy

    Joined:
    Jul 10, 2014
    Posts:
    469
    if anyone has an answer to how to solve the ghosting trail issue please help. its bad enough on PC non VR, but TAA with VR makes the ghosting and trails and object warping Sooo much more obvious and worse. Does anyone have a solution for TAA quality without these issues?
     
  8. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    410
    The solution is to use a forward renderer with MSAA. You cant fix TAA(at least without raytracing hardware https://research.nvidia.com/publication/2018-08_Adaptive-Temporal-Antialiasing), ghosting and blur is a weakness of this technology. Big AAA games just disable TAA for all fast moving objects, but you cant do this in unity without custom modifications.
     
    DavidSWu and Unlimited_Energy like this.
  9. Unlimited_Energy

    Unlimited_Energy

    Joined:
    Jul 10, 2014
    Posts:
    469
    yeah, i wish you could apply TAA to just certain layers as I only need it for terrain and plants honestly.
     
  10. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    643
    Any idea if UT will eventually let us disable taa for specific layers (or whatever implementation ends up being that achieves that goal)? It seems strange to build a cutting edge AA solution but then give us an artifacted version that big budget games wouldnt use anyway because of those issues. If the best realistic solution is "use something else" ... Thats more than a little problematic and a strange decision to spend resources on ;).
     
    Last edited: Oct 20, 2019
  11. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You can control this on the mesh renderer.
     
    DGordon likes this.
  12. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    183
    Onigiri is right on this one.
    Your VR players will love you if you ditch the TSAA, use MSAA and get your FPS up high.
    I feel like the screen space antialiasing techniques were not developed for action games, they look nice in static screenshots but when you are actually playing a game, they just mess with the image enough to be distracting.
    They are not "functional" in that they add no value to the scene. They create artificial changes that, rather than helping you play the game, serve to occasionally mask what is there and make it more difficult to understand your surroundings.
     
  13. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Temporal approaches are all just to save processing, and it's not really going away with raytracing hardware. You cannot notice temportal antialiasing or anything like that in most action games because motion blur has all but obliterated everything anyway.

    In VR it's totally another story, but for desktop or console titles which feature motion blur, TAA and friends are the best possible fit since your pixels are going to be a smear regardless.
     
  14. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,236
    Plenty of VR games use TAA. Certainly Echo Arena did when it was first released (not sure if it does still), and any Unreal engine games from the first few years of VR had to since it didn’t support MSAA until Oculus released their own custom forward clustered renderer with Farlands, and Epic followed suit officially implementing their own forward clustered renderer for Robo Recall. Something like Allumette’s clouds would be nearly impossible to do with out TAA.

    The future might be some mix of MSAA and selective TAA. I believe some console games are already doing something like this to help do more complex skyboxes more cheaply since they can be fairly blurry and still look good, then using MSAA, or just some form of FXAA/SMAA or other custom setup for the main scene rendering. There’s also a lot of temporal denoising happening with current raytracing related stuff. That’s sometimes happening in object or texture space rather than screen space.

    There are also a lot of temporal solutions for consoles that aren’t necessarily trying to really handle anti-aliasing, but purely for temporal super sampling to be able to hit “4K” resolutions on current gen consoles. Most infamously Killzone 3 managed 60hz “1080p” multiplayer by rendering to a half height render target and using the previous frame to reconstruct every other row.
     
    hippocoder likes this.
  15. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
  16. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,236
    MLAA, FXAA, SMAA, DLAA, and CMAA are all types of post process anti-aliasing. Basically MLAA, or Morphological Antialiasing, and its successors, analyze the rendered pixels to find areas that appear to be aliased edges and blur the image slightly to hide the aliased edges, and potentially also other details you want to keep.

    MLAA was relatively expensive, and really only a few PS3 games used it. But it was effective at improving the apparent image quality at a cost less than MSAA or super sampling for hardware of the time.
    FXAA took the general concept of edge finding and blurring and made it cheaper by using less complex edge finding techniques at the cost of more blurring. It was also very easy to implement.
    DLAA and SMAA both build off of MLAA’s original edge finding techniques while making them more efficient on the GPU.
    CMAA & CMAA2 build off of MLAA like SMAA and DLAA did before, but try to change the edge detection technique to better preserve hard edges that shouldn’t be blurred.

    Basically CMAA 2 can be thought of as FXAA with less blurring, but slightly higher cost.

    There are versions of MLAA, CMAA and SMAA that combine with MSAA and/or previous frames (temporal) to improve the antialiasing quality too, but I don’t think Unity is implementing any temporal methods apart from their own TAA. Their implementation of CMAA 2 does appear to work with MSAA, at least the shader code has support for it, I didn’t look through enough to know if it’s something you can enable. Really all post process AA techniques can “work” with MSAA, but they have a tendency to blur stuff that MSAA already handled since they work on the resolved MSAA image rather than the actual sub samples. The difference is this CMAA 2 implementation is using the original MSAA sub samples and presumably replaces the hardware resolve pass.
     
    elbows likes this.
  17. LIVENDA_LABS

    LIVENDA_LABS

    Joined:
    Sep 23, 2013
    Posts:
    377
    That will not work.

    CTAA NXT V2.1 just released does allow layer exclusions in all platforms including VR, it also now supports Supersampling option which can be used at the same time if you want the ultimate AA quality.
     
  18. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Sounds like it would be a tad more expensive to run than Unity's own TAA?
     
  19. Scyra

    Scyra

    Joined:
    Nov 21, 2017
    Posts:
    19
    Testing a non-VR HDRP project with MadGoat's TSSAA set to the x2 preset reduces ghosting/warping by ~50% versus the built-in TAA. As with Unity's TAA, it eliminates specular micro-shimmering and completely conceals the seam lines I often see in demo scenes where the modular pieces are not snapped and have .001 width gaps between them. Layer exclusions would be nice to have.
     
  20. 3dHomer

    3dHomer

    Joined:
    Jun 6, 2015
    Posts:
    13
    Seems like now in Post-processing Stack v2 TAA is applied after transparencies (in CommandBuffer.BeforeImageEffects). And I cannot find any way to disable TAA for specific objects or layers with a single-camera setup.

    I need to disable it for water that has very bright reflections and moves in a complex way so I cannot calculate proper velocity vectors. TAA makes it look blurry and noisy but I really want to use it for opaque geometry.
     
    Last edited: May 25, 2020