Download

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

Hey Guys, As you know Unreal is one of the most powerful game and grapichs engines but have you ever think that why It has really bad AA Techniques? TAA is great for Aliasings but it makes textures very blurly. And there is no words to tell FXAA. I played many games with FXAA. I love FXAA it is effective and cheaper than MSAA but Unreal Engine’s FXAA really bad to manage with Aliasings. Other engines do wonders with FXAA but why Unreal Engine has problems with it? And also why Unreal doesn’t support other AA techs with Deferred Rendering? How Can improve my AA quality?

Blurly TAA Problem Fixed Thanks to @hallatore
https://forums.unrealengine.com/show…l=1#post749135

Its implementation is not different from reference and it isn’t bad in any way.

There are not many alternatives out there. Native SMAA would be pretty good indeed, but if you search the forum, you will find a thread about integrating SMAA into the engine.

I haven’t seen FXAA perform any kind of wonders, that would not be expected from it.

Perhaps you should take a look at a paper, that explains how to fine-tune FXAA to your project needs.

I also ran into this issue, but was not enthusiastic enough to make a post with a frowny. :rolleyes:
Instead I played a bit around wwith the options and was able to solve it for most cases…

https://www.youtube.com/watch?v=V_KlyC35YG0

the SMAA implementation got broken from engine postprocess changes in 4.15 and sadly the guy that ported it to UE4 isn’t maintaining it anymore. So far no one has reported a way to get it working (I tried myself using the guy’s suggestions but just failed). And with the changes in the postprocessing from 4.17 I’d expect it to be even more broken now :frowning:

Other alternatives: proper TemporalAA. Epic “got married” to the temporal AA technique not just as an antialiasing tech but also to make other rendering features more affordable (i.e. temporality of DFAO, dithering+temporality in SSAO) or to even achieve some things that just look horribe without TemporalAA (smooth mesh blending via PDO and dither alpha, fake translucency via dither alpha).
With this in mind I don’t think it’s unreasonable to expect TemporalAA to achieve a better quality but sadly it’s been pretty much the same for about the last 7 major releases now.

I’ve seen TemporalAA perform quite well in all recent Ubisoft games (and not so recent, basically since Assassin’s Creed Unity). However I’m not 100% convinced that they use TemporalAA alone or if they combine it with some other AA technique (it’s explained in a paper IIRC, but nothing stops Epic from mixing AA techniques). I’ve also heard the new Doom’s TemporalAA looks great but I haven’t tried it myself.
I know a certain guy might barge in and say all engines are different etc, but in the end it boils down to Epic focusing their efforts on something else than more/better AA options.

also maybe SMAA officially supported

interesting. I don’t suppose any of this is exposed in the UE4 editor right? (in UDK you could at least select the preset). I guess it’s time to play around with the usf (and play shader compilation simulator :smiley: )

the reason you get artifacts on “indirect lighting” is that DFAO works over multiple frames independently of your Antialiasing option. in other words they are completely unrelated to the antialiasing technique, it’s just that TemporalAA helps to soften them out, because, well because that’s what TemporalAA is designed for (softening out temporal artifacts)

anyway you solved it for your use case, you solved it on a relatively simple scene (you have textured meshes but they are all big and solid, no foliage/grass which means quite more irregular sharp shapes/edges, no small/far objects causing sub-pixel artifacts, etc) and you solved it by using FXAA which isn’t an effective solution for all projects.

That would be most favorable indeed.

Temporal AA is good for something in sci-fi setting with tons of metallic/plastic surfaces and not so high amount of motion in the scene. Most of the ghosting issues can be minimized in this case.
Instantly breaks for anything natural with foliage or something fast-moving though.

The problem is not that temporal AA is bad, on the contrary, it is unmatched in certain cases. The problem is that number of situations where TAA is absolutely unacceptable is too high to leave it the only solution. FXAA alone is frankly a bit outdated to cover the holes. This is where SMAA and T+SMAA would shine.

But I guess that talk belongs to numerous other topics about TAA, this thread initially seemed to be about FXAA.

Doesn’t Battlefield 1 use temporal AA too? It doesn’t seem to suffer from much if any ghosting.

Graphics systems often stumble on patented algorithms;
I bet these open engines use to implement these features aren’t exactly what you see in major titles because of legal issues maybe.

But companies do give out presentations and publications. DICE is particularly active in that regard.

Most deferred engines use some sort of TAA today. Unreal, Frostbite and Snowdrop.
I find The Division to have a pretty good implementation. They seem to use a combination of TAA (with supersampling?), Sharpening and SMAA on top.

UE4’s out-of-the-box AA experience leave things to be desired. It’s not that easy to tweak, and it’s trial and error to get it better than the default.

Nvidia has done some research into AGAA and used UE4 as demo implementation. But it doesn’t seem this is available anywhere. http://research.nvidia.com/publication/2016-07_Aggregate-G-Buffer-Anti-Aliasing
Paper on AGAA: https://www.cs.cmu.edu/~kayvonf/papers/agaa_tvcg2016.pdf

Here is The Division with the TAA settings mentioned above.

https://youtube.com/watch?v=4rB7IFcTEe0

Could you try with these settings? https://forums.unrealengine.com/showthread.php?134157-Sharp-Temporal-AA&p=748924&viewfull=1#post748924

@hallatore thank you so much it worked

I’ve been interested in ways to minimize the ghosting that comes with UE4’s out-of-the-box TAA solution as well. I’ll have to check out Hallatore’s method, but in the meantime I recently read Guerrilla’s recent Siggraph presentation on how they handled high quality, responsive AA for Horizon:ZD. They achieve a stable, responsive anti-aliased result using only 2 frames of data (TAA) along with FXAA and some subtle sharpening, which put together gives a very clean result on what would otherwise be extremely noisy sub-pixel hairs and foliage pixels. From what I’ve played of the game, there’s no noticeable ghosting, and the entire setup is silky smooth on old standard PS4 hardware. I’m interested in seeing if Epic ends up implementing some of this responsive AA methodology to future engine updates.

Here’s a link to the presentation, and down at the bottom of the page you can download their full 300mb Powerpoint presentation with all the presentation notes.
https://www.guerrilla-games.com/read/decima-engine-advances-in-lighting-and-aa

The AA stuff start on page 30. Here are a couple excerpts from the PP notes on pages 37 and 38:

If you disable Motion blur you can get pretty good results with TAA alone. The main problem is TAA and Motion blur both enabled.

I’ve been playing around the the engine source working on a solution. It’s starting to show promise! :slight_smile:
https://forums.unrealengine.com/showthread.php?152348-Temporal-AA-Motion-blur-A-final-solution-to-ghosting

version_1.png

If that is the case, they are in fact showing you very annoying ghosts in their scenes. Hope they didn’t mean these statements. FXAA is not looking good to my taste, and combining it with TAA that is doubles the bad ideas for me. No thanks, sir :slight_smile: They should have went with the T+SMAA, that was almost as good as the TAA but responsive. Except the ghosts, that i hated in that too.

This statement is also invalid, however your findings are appears to be interesting indeed. TAA is producing great many artifacts, ghosting can and will happen without motion blur enabled as well. All you have to do is just connect a noise node to that floor and you will see the problem. While a noise node maybe a strong case, it’s an easy example to reproduce one of the many artifacts. SSR is also being distorted while you move (especially on faster speeds), and pixels in cases can appear with invalid brightness, so these issues are always the fault of the TAA itself.

Eh, I don’t think you understand what they’re doing. Give the PPT a read. The entire point of using the previous raw frame input before any other post processing was done (like that frame’s FX+TAA) is to avoid infinitely duplicating old frame data that has already been run through post process AA methods. This inherently avoids the entire possibility of ghosting beyond 1 frame, which even then is masked through some of the other techniques they detail in the presentation. The ghosting we see in UE4 partially results from the fact that one frame receives TAA, then the next frame uses the last frame’s post-TAA result, then the frame after that uses that last frame’s post-post-TAA result, etc. recursively duplicating past frames infinitely. The oldest frames’ contributions become smaller and smaller for each new frame, but you still end up with ~30(?) frames worth of old data getting smeared around as the TAA continually stacks older and older post-TAA frame data.

Also I have to question if you’ve bothered playing it if you think it looks bad. Running on old PS4 hardware from 2013 they’ve achieved silky smooth AA without anything remotely close to the kind of ghosting I’m used to seeing in UE4, and the reason they went with this approach is because Horizon:ZD is basically the worst-case scenario for TAA. The entire game is filled with tiny sub-pixel grass, foliage, and hair, all of which is moving constantly.

“TAA is great for Aliasings but it makes textures very blurly” - You cant fully expect a totally clean picture with any AA methods

“Unreal Engine’s FXAA really bad to manage with Aliasings” Yeah I agree with you on that its a complete mess I personally don’t use
any AA since my games are in 4K anyway so the need for Aliasing to me is low Aliasing to me only ruins picture quality and slight chug
with performance.

“Blurly TAA Problem Fixed Thanks to @hallatore” I’m happy its fixed.

Do you have a screenshot of an example material that will produce TAA ghosting? I’m having a hard time finding reproducable materials. :slight_smile:

Any kind of material with high-frequency repetitive patterns.

They get 2 samples per frame because of how they sample it. So they have 4 (or 2 if last frame was discarded for that pixel) to work with. I think their approach is interesting.

The TAA approach in UE4 is mostly only a problem when TAA itself introduces ghosting. Especially with the anti ghosting code enabled by default in 4.15.
The image I posted above is not caused by TAA but by the motion blur, and it all happens in one frame. I’ve been looking at it, and it actually looks like the motion blur logic around the character is wrong. It seems to sample in the wrong direction, or from the wrong pixels.
PS: There are two different motion blur code paths in UE4. The slow/strange one is only around characters and moving objects. The fast path is used for everything else that moves in the same direction.

Well if you connect a Noise node to the wall material in the tpp project, and set its scale to 1 , it should present you a very loud noise, so you can test that. But of course any noise texture will work, just make it dense and the pixels next to each other should have high contrast. Obviously it is just a synthetic test to display one of the many flaws of TAA, but you can interpret these results similar to a high detail texture, or grass etc where the same issue will apply, but less visible, comparatively.

Here this image will display two more issues:
0.jpg

The car is moving relatively fast about 200km/h, and you can witness the SSR is bending towards the viewport. Hard to see, but its there. Then, just look at a textures around the ghost shape, it is actually a bit brighter than it should. As you have mentioned there is an anti ghost exists which will treat and replace the car’s history areas with the new input, but it cannot adjust the content to the invalid road texture around, so it have became darker. Hence the ghost in this case.

These issues along with the noise problem can be handled, but the solution is invalid.

The problem you are working on appears to be a fourth one, that may turn out to be the malfunction of the motion blur or the taa, maybe both. I actually been thinking that why the issue does not present itself with FXAA to a certain extent (without propogation), since FXAA should also present some synthetic pixels here and there for the motion blur to sample the wrong data.