Announcement

Collapse
No announcement yet.

Sharp Temporal AA

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Also it can be good to add a negative mipmap bias to your textures, using r.MipMapLODBias=-1 and
    r.Streaming.MipBias=-1. This will make normal maps in particular significantly sharper, and any other texture with lots of high frequency detail. Temporal AA gives the best image quality when it is given lots of different samples over time, and the "correct" mip map levels do the opposite.

    You do trade off a bit more smearing though and it increases your VRAM usage significantly, so consider putting it in your scalability settings, or only apply a bias for certain texture samplers in your materials.

    Comment


      #17
      looks a lot better in VR too!!

      more 3d definition.

      Thanks for the tip!

      Comment


        #18
        For me, 0.25 and 0.15 gives good result for grass at short range, but adds noticeable noise to all other objects in the distance.

        Wonder if anyone found a good combination of newly available settings.
        MMO Starter Kit
        Dialogue Plugin
        Voxel Plugin
        Character Customization: Female
        Character Custmization: Male

        Comment


          #19
          Somewhat off topic. But a trick I use in games is this:

          You can set the screen percentage in World settings to 120% and it should produce a clearer result since the AA is then applied before down scaling to screen size. Adding a sharpening post process (10-20%) should also help make the scene sharper without causing aliasing.
          This will however use more resources since you render 20% more pixels.

          Comment


            #20
            Originally posted by hallatore View Post
            Somewhat off topic. But a trick I use in games is this:

            You can set the screen percentage in World settings to 120% and it should produce a clearer result since the AA is then applied before down scaling to screen size. Adding a sharpening post process (10-20%) should also help make the scene sharper without causing aliasing.
            This will however use more resources since you render 20% more pixels.
            Not sure I'd opt for a solution that makes the end-user render more pixels on screen than what is already necessary, especially in complicated scenes. I can see a few use-cases for this though!

            After experimenting with numerous setups, I think I may have found the diamond in the rough...maybe...

            UE4 4.15.1 - Temporal Anti-Aliasing Settings

            r.TemporalAACurrentFrameWeight .5 (A bit higher than what I've seen mentioned but anything less than this introduced some pretty unusual artifacting in the scenes I tested it on)
            r.TemporalAASamples 4 (5-6 Samples seemed to introduce quite a bit of vibration/stuttering. 4 looks B-E-A-U-TIFUL)
            r.Tonemapper.Sharpen .5 (One of the only downsides to TAA is the 'bluriness' but sharpening the render just a bit eliminated this effect for me)

            Both SSR and SSAO seem to be unaffected quality-wise using these settings.

            Keep in mind that these may not be optimal for all setups (but they were in just about every scene I threw at it). Also, on a side note, I've spent about 4-5 years in Unity but fairly recently switched over to UE4 (so take my advice with a grain of salt and do what works best for you!) I've just seen quite a few questions/concerns with TAA recently and figured I'd chime in and try to help!

            Comment


              #21
              This is absolutely the best single thing I've learned regarding visual quality in UE4. Thanks!!!
              Artheon VR Museum: http://artheon.co
              Impossibility Labs Inc.: http://impossibilitylabs.com

              Comment


                #22
                So, I'm finding those settings pretty brutal on my eyes (at least in a dynamic, deferred scene). Here's what I do:

                ConsoleVariables.ini
                Code:
                ; Sharpen on the tonemapper side.
                r.Tonemapper.Sharpen=1
                And since I don't really care about performance right now:
                Code:
                ; Max AA quality.
                r.PostProcessAAQuality=6
                r.TemporalAASamples=32
                r.TemporalAASharpness=1
                Post-Stack Sharpening Effect
                That gets me most of the way, but I also have a fairly simple sharpening post material that I apply in my post-stack as well. I just tossed them up in our public repo: https://github.com/joymachinegames/j...ree/master/ue4

                I have the base material as well as my settings on a material instance of it in there.
                Trent Polack (@mittense)
                Personal Site | Development Blog | Joy Machine

                Comment


                  #23
                  Originally posted by mittense View Post
                  So, I'm finding those settings pretty brutal on my eyes (at least in a dynamic, deferred scene). Here's what I do:

                  ConsoleVariables.ini
                  Code:
                  ; Sharpen on the tonemapper side.
                  r.Tonemapper.Sharpen=1
                  And since I don't really care about performance right now:
                  Code:
                  ; Max AA quality.
                  r.PostProcessAAQuality=6
                  r.TemporalAASamples=32
                  r.TemporalAASharpness=1
                  Post-Stack Sharpening Effect
                  That gets me most of the way, but I also have a fairly simple sharpening post material that I apply in my post-stack as well. I just tossed them up in our public repo: https://github.com/joymachinegames/j...ree/master/ue4

                  I have the base material as well as my settings on a material instance of it in there.
                  r.TemporalAASamples=32 does not affect performance but it just tell how many jitter locations temporalAA will use. Bigger the number more time it will take to full cycle to loop. This might cause judder and excessive blurriness. I have noticed that r.TemporalAASamples=4 or 8 is optimal depending on target frame rate.

                  Comment


                    #24
                    Originally posted by Kalle-H View Post
                    r.TemporalAASamples=32 does not affect performance but it just tell how many jitter locations temporalAA will use. Bigger the number more time it will take to full cycle to loop. This might cause judder and excessive blurriness. I have noticed that r.TemporalAASamples=4 or 8 is optimal depending on target frame rate.
                    I don't know, after jumping back and forth between all the values from 1/2/4/8/16/32, I'm still of the mind that 32 looks the best. Here's my scene:

                    Trent Polack (@mittense)
                    Personal Site | Development Blog | Joy Machine

                    Comment


                      #25
                      I went with these settings. I think it might vary a bit from setup to setup.

                      Code:
                      r.TemporalAACurrentFrameWeight = .1
                      r.TemporalAASamples = 4
                      r.Tonemapper.Sharpen = .2
                      Before/After images: https://imgsli.com/MDQxMg

                      Comment


                        #26
                        Found combining the information here with the ghosting change here

                        https://forums.unrealengine.com/show...al-AA&p=745592

                        TXAA is much better. Just thought I would post it for anyone that runs into this thread. With the 2 changes it is much more usable.

                        Comment


                          #27
                          I played around with the settings some more and ended up with a pretty decent result. The sharpness is well preserved while avoiding both ghosting and aliasing when moving around.

                          Click image for larger version

Name:	ghosting.png
Views:	2
Size:	593.5 KB
ID:	1132345

                          Here is a default/adjusted example: https://imgsli.com/MDU3Mw
                          And here is No AA vs. adjusted TAA: https://imgsli.com/MDU3MA (Notice how well the sharpness is preserved)

                          Code:
                          r.TemporalAACurrentFrameWeight 0.2
                          r.TemporalAASamples 4
                          r.Tonemapper.Sharpen 0.8 // Somewhere between 0.5 and 1.0 seems like a sweet spot.

                          No AA vs. TAA (Notice how well the sharpness is preserved)

                          Video showing No AA vs. TAA




                          Default TAA vs. Tweaked TAA

                          Reduce ghosting

                          The biggest factor to ghosting seems to be Motion blur. Turning that off helps, but you can also do the following.

                          Here is a trick I used to reduce ghosting even more by changing the last frame weight when the camera is moving.

                          Click image for larger version

Name:	okSJlfz.png
Views:	1
Size:	169.1 KB
ID:	1132340



                          Originally posted by Joshua Halls View Post
                          Found combining the information here with the ghosting change here
                          https://forums.unrealengine.com/show...al-AA&p=745592
                          TXAA is much better. Just thought I would post it for anyone that runs into this thread. With the 2 changes it is much more usable.
                          Those changes was added by default in 4.15, so no need to play around with the source just for that.
                          Last edited by hallatore; 08-12-2017, 10:55 AM.

                          Comment


                            #28
                            Originally posted by hallatore View Post
                            I played around with the settings some more and ended up with a pretty decent result. The sharpness is well preserved while avoiding both ghosting and aliasing when moving around.

                            Code:
                            r.TemporalAACurrentFrameWeight 0.2
                            r.TemporalAASamples 4
                            r.Tonemapper.Sharpen 1 // Somewhere between 0.5 and 1.0 seems like a sweet spot.
                            looks quite good, these are the exact settings I used for my UE4 summer jam entry (shootergame-based). in my eyes it makes the edges look slightly jagged but it's also the best tradeoff I could get

                            however it's a case by case basis. in the project we have at work (top-down city builder) the ghosting it very extreme from fast camera movements. I think even for third person games it's also not enough


                            even with these settings I think the biggest issue right now is how the Current Frame Weight works: it stacks on top of the previous frame which already stacked with the previous one and so on, so all each previous frame is still there, in lower opacity each time, up to infinity.
                            if it could somehow work that it keeps the last X frames as buffers and average them alone (so older frames are already discarded) the temporality would be greatly reduced and so the ghosting would be minimized. however I don't think keeping X full-resolution buffer frames is really affordable
                            Last edited by Chosker; 08-12-2017, 03:39 AM.
                            Follow me on Twitter!
                            Developer of Elium - Prison Escape
                            Local Image-Based Lighting for UE4

                            Comment


                              #29
                              Originally posted by Chosker View Post
                              even with these settings I think the biggest issue right now is how the Current Frame Weight works: it stacks on top of the previous frame which already stacked with the previous one and so on, so all each previous frame is still there, in lower opacity each time, up to infinity.
                              if it could somehow work that it keeps the last X frames as buffers and average them alone (so older frames are already discarded) the temporality would be greatly reduced and so the ghosting would be minimized. however I don't think keeping X full-resolution buffer frames is really affordable
                              I made a this to change the frame weight when the camera is moving. I think the result looks really good.
                              Nice temporal stability when standing still, no ghosting when moving around.

                              Still need to tweak the movement threshold and the weight amounts though.

                              Last edited by hallatore; 08-12-2017, 05:30 AM.

                              Comment


                                #30
                                curious to see what you've made but the attachment isn't working
                                Follow me on Twitter!
                                Developer of Elium - Prison Escape
                                Local Image-Based Lighting for UE4

                                Comment

                                Working...
                                X