Whats Wrong with Epic? Anti Aliasing Technology and Terrible FXAA Quality!!

FXAA is applied later in the pipeline. TAA is applied before motion blur, etc.

https://github.com/EpicGames/UnrealEngine/blob/1d2c1e48bf49836a4fee1465be87ab3f27d5ae3a/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp#L1792

Bingo! That certainly explains the confusion on my part. Thanks for the heads up :slight_smile:

That is why with FXAA you can see jagged edges inside motion blur etc. Since the input to those stuff is aliased.

I would like to see these two being split up. TAA as it’s own thing, and then FXAA, SMAA, MSAA etc.

The Division for example uses a combination of TAA and SMAA.

SMAA is works exceptionally well on synthetic tests, but on real case scenarios it will leave you with issues, like jaggies and discontinuities of lines etc, that can get very visible under given circumstances. While FXAA works much better in these cases, it is the actual content that gets blurry which feels like an accidental median filter just left on the postprocess you just can’t get it out! MSAA, afaik doesn’t really apply to the deferred renderings, unless you take into consideration the manual implementation of nvidias deferred antialiasing solution in the gameworks package which may give you the desired results that you can combine with other methods.

The brilliant work of Inqeuation have presented a few combinations of these techs, aka t+fxaa and t+smaa which was looked quite interesting at first, but the lack of anti ghosting and only 2 samples were taken to solve the scene ended up being more of a problem on the high contrast areas (and the moving objects) than it’s worth. More then 2 samples in these case would likely ended up having the same artifacts as TAA is currently having.

There was a setting in the panels where you can turn the TAA to be responsive. Not sure if it is still there, but it ended up a showing a little trembling and blinking scene which was odd, but it looked more fresh and sharper which i actually was ended up using for the rest of the gameplay despite the blinking edges :slight_smile:

I actually did that as a proof of concept in UE4. I changed the LastFrameWeight based on camera movement. It worked suprisingly well! :slight_smile:

Yes i have seen these posts, and that’s an interesting approach to use the camera as the source of blending, but it is one value only to be applied to all pixels whether they are static or moving, and it also unable to take care of the objects that are moving in front of the static or separated camera movements. Your camera movement is also not in screen space to adjust the movement in accordance to the projected pixels of the final result, therefore the input value cannot be valid under any circumstances. Eg, a cube close to the camera appears to move slower (relatively speaking) once you rotate your camera, to the one that is put way back in the distance. An equation that would take the depth into consideration is essential in this case to determine their relative movement speeds to your camera, thus you can apply individual blendings to the two cubes.

Just 2 samples only, will not provide enough information for the solving mechanism to resolve all angles, where a different algorithm like SMAA or FXAA (or CSAA) could help a lot, but not without discontinuities, that usually comes up (but not exclusively) at the steep/mild angles of edges. 4 samples are reaching this goal very closely, but you can witness the exponential nature of the added samples in the results, since 8 samples still can not and will unable to provide the perfect solving. 4 samples with smaa/fxaa could be the closest to best solution in this case. Especially when you give 25% blend weights for the gathered samples, so there are at least 4 samples to be required to have enough new information to be mixed together. 2 samples will only provide 2, therefore 50% blend weight would be the logical summary of a static scene. On a moving scene the 25% could be twice as good compared to 50% blending. It all logical, since the ā€œwandering jaggiesā€ will end up summarized to have the better edges as the result.

Sharpening is a very robust approach, especially if you just apply them on your scene in a uniform manner. They will take the neighboring samples and negate the results from the center pixel, which essentially removes all the goods you have earned from the blended frames previously, and you end up close to the very same jaggies that you have had before the antialiasing. Just make the counts and you will find this is the case. The tonemapper sharpening is however nicely implemented, does not take care of the edges and just removes your fine blurry mashed smeared pixels that was looked smooth to the eye before, and will just replace them with the staircase of your nightmares. :slight_smile:

Some people like sharpen, some people like it blurry… Why not both?
I’m making a custom sharpen that has some interesting characteristics! :smiley:

  • Imgsli - The usual way to combat TAA is to make everything sharper. Textures on the rocks and tree are sharper, but the grass looks way to sharp.

  • Imgsli - On the other hand default makes the grass look nice, but textures look washed out.

  • Imgsli - My code makes the rocks and tree sharper than the default.

  • Imgsli - It also preserves the grass and other stuff that doesn’t need unnecessary sharpening.

  • Imgsli - It’s also matching the reference which is when TAA is disabled.

What do you guys think? Especially interesting to hear from those that generally don’t like sharpen! :slight_smile:
@Konflict @Deathrey

TAA is absolutely disgusting, no matter what game engine uses it. I can’t believe Nvidia comes up with stuff like that.

I use screen percantage (170) combined with FXAA, it looks great, sharp and not blurry in the slightest. FXAA in that case just removes the jaggies left by SSAA.

Would it be possible to see a PNG from this shot of the A and B slides? The jpeg is makes it hard to judge, but to me it appears to be a bit darker the otherwise better result. This might only be the tiny side effect of your approach for an adaptive sharpening, you just have to find a way to explain it with the fancy equations :slight_smile:

I think you see it better here.

Imgsli - Notice how the texture on the bark is sharper, but the grass stays pretty much the same.

Imgsli - Here is the default sharpen 1 vs my code.

But then you lose all kinds of effects that rely on temporal filtering, such as screen space reflections.

That is already heavy SSAA. Its realistic usage is… quite limited.

While I always prefer sharper image, result of almost all sharpening filters looks like sandpaper to me. That is a personal opinion, not a result of survey though.
I don’t understand though, why there is that much talk about sharpening and motion blur in a thread about anti-aliasing. As weird as it may sound, TAA does not introduce that much blurriness into the picture. On the contrary, it gives well-smoothed picture, that it is commonly perceived as one with lacking contrast. It is worsened by the fact, that most users grew used to over sharpened edges so much, that TAA instantly looks worse to them. Side-by-side comparison of TAA with 4x SSAA kinda confirms that. By all means, that is not a problem of TAA. Not a problem at all. Giving end-user ability to revert to his favorite AA method would never hurt though. My personal favorite is T+SMAA for almost any case for the very same reason.

Speaking of motion blur, same applies. It should be always left to end user to decide if it should be left on or off and its scale. Also motion blur barely introduces new ghosting to the image. It exaggerates exiting one, so I would not even mention its relation to TAA ghosting at all.

Temporal Anti Aliasing suffers from two underlying issues. Imprecise history clamping and erroneous velocity selection for small geometry. I think, if you are not addressing these ones, it is essentially a raindance.

Though it is good that features like r.TemporalAACurrentFrameWeight cvar are covered here. I believe good deal of engine users were unaware of its effects.

1 Like

I keep questioning the engine growing increasingly reliant on temporal filtering for fixing things that shouldn’t need in the first place. Things like SSR and SSAO should work properly out of the box regardless of the Antialiasing technique you choose for your project. Rendering features should be there for artists to mix and match, not to be mutually exclusive.

I believe it’s been proved that motion blur makes the TAA ghosting significantly more apparent. I don’t have a link right now but it’s one of the million threads about TAA ghosting :wink:
the sharpening part is to fight back the overall blurryness that TAA introduces. as you say it’s a matter of taste but if you compare side by side TAA vs no AA at 1080p it’s clear that TAA blurs the entire picture, even more so than FXAA (but in a different way). what you perceive as a well-smoothed pictures other perceive as just an overall more blurry picture. I myself perceive it as something that indeed softens edges and small geometry in a superior way but also slightly blurs out the entire picture

TAA introduces blur. Not a lot, but noticeable. Therefor TAA and sharpen goes hand in hand, often with mixed results. So I think it’s right to talk about sharpen when people talk about TAA.

I agree that sharpening quite easily turns into a sandpaper filter. And that’s why I want your opinion on the compare images above. :slight_smile:

There seems to be some ghosting in motion blur that is not TAA’s fault, but rather motion blur that introduces artifacts if the depth info and color doesn’t match perfectly. The reason this doesn’t show with FXAA is because it’s applied after motion blur, but TAA is applied before.

PS: What do you think of the comparison images above of the adaptive sharpen?

Yep, but not noticeably more than SSAA would. I’m speaking technically overall. I do not like smooth output of TAA either.

Not questioning that, just stating that underlying issue is TAA, not the blur.

Yeah, probably.

V1 looks overall best to me.

yes I’ve read your explanations, and sounds like a bug in the engine. but the simple fact remains that if you use TAA and enable motion blur the ghosting becomes worse :wink:

from your comparison images I also prefer V1. I still need to test it in my several projects though.
so far I tested your blueprint setup in the citybuilder at work (lots of small geometry, large camera distance) and while moving the camera the aliasing becomes much more evident. at this point it felt like when the camera moves I’m trading off ghosting for aliasing which is still a compromise (but one my eyes were not too pleased with).
I’ll try to test it soon with my other projects (1st person shooter and 3rd person game) - I’m sure those 2 will benefit much more from it :slight_smile:

actually I just made some comparison screenshots, however they’re work related so I can’t show them here (but I’ll make some with my personal projects some time this week)
I’m looking at No AA, No AA with 200% ScreenPercent, FXAA, TAA (4 samples) and TAA (8 samples, the engine default). I’ll describe my impressions roughly in order of sharpness vs blurryness but also taking into account aliasing:

  • No AA with 200% ScreenPercent is what gives the best results. The picture is sharp and the details are sharp, while aliasing is there but minimal (expected as the game’s camera shows sub-pixel artifacts from small objects even at this resolution)
  • TAA (4 samples) blurs the image slightly, both on edges and on surfaces. It can handle sub-pixel artifacts better though so aliasing is less noticeable.
  • TAA (8 samples) has a similar level of blur, if anything slightly (negligibly) more blurry on surfaces. it just shows a bit more small details in some places and loses some in other places. edge aliasing of straight lines is slightly better than 4 samples.
  • FXAA is overall (in my eyes) equally as blurry as TAA (4 samples), just in different places. It’s noticeably worse at sub-pixel artifacts so aliasing is more noticeable than TAA and No AA with 200%
  • No AA with 100% ScreenPercent shows a sharp image, though with horrible aliasing.
    As I’m not showing anything I’m sure you’ll take my opinion as a grain of salt. However in my eyes and in the project I tested it’s clear the default TAA (8 samples) is slightly blurry compared to ScreenPercentage 200% (roughly equivalent to SSAA)

TAA blurs the whole image slightly because of the sampling. When you sharpen the image you get sharper texture details, but also sharper edges.

This is the problem I’m trying to tackle. un-blur the texture details while leaving the smoothed edges so that it doesn’t look like a sandpaper filter.

I blend it based on neighboring pixels depth to avoid sharpening edges, and the perceived contrast difference to avoid sharpening already sharp stuff.
The goal is to achieve 1 to 1 image quality on textures with and without TAA, while keeping stuff like grass, meshes, etc looking good.
I just got it working yesterday, but it shows a lot of promise. Hopefully I can implement it as r.TemporalAADynamicSharpen in the engine some day. :slight_smile:

jonimake > I wasn’t aware of that. :frowning: I think TAA looks good for interiors, but there’s no way I’d use that for outdoors. It makes the foliage look like playdough mixed with vomit.

hallatore > How can we use sharpening? I see nothing in the post processing options.
EDIT: I found out how to use sharpening. I followed the instructions in OP’s link (the console commands). I mixed 4x sharpened TAA with SSAA, this is so… BEAUTIFUL. Oh my gosh :eek: