Temporal AA sharpening

Yes, I’m curious also, great thing ArcViz definitely needs it. Is it still available? A link doesn’t working.

The links are broken. What happened? I was really looking forward to using this!

Hey! I added the commits from the latest change to a release version of 4.17 (pulling your fork generated a 4.18 version… and I’m used to perforce so I am a massive idiot when it comes to git) but I’ve had a build fail with a bunch of errors from the ScenePrivate.h file. I’ve edited the files attached in the image, am I missing something?

Thanks in advance to anyone that can help!
Conrad

this looks very promising, but all links are broken. Could you please update the links. I really would love to try this !!

I’ve just gave a try to your changes using your 4.18 latest update on my 4.17 engine (required barely no effort to go back 4.17) and i have to say it’s really cool. i love having some control over TAA !

The links are working, you just need to follow these instructions to access them:

How hard would it be to wrangle all this up and slam it into a plugin? Are there too many raw engine changes to do that? It’s my understanding that we can add new shaders in plugins now. Not sure about overwriting existing shaders, but perhaps duplicating TAA and calling it something else? Since this is pretty much something else, compared to the default TAA, makes a bit of sense I suppose.

Pardon me if I’m being naive, I haven’t looked at the code changes yet. I’m just making assumptions after reading through this thread. At any rate, awesome work. The visual improvements are astounding. If the performance impacts are so minimal (what was it, ~0.04ms?), I’d hope this found it’s way into the official engine. Especially considering it can benefit VR developers. I hear VR is all the rage nowadays :rolleyes:

Keep it up!

[edit]
Dove into the code a bit… The changes/additions to ScenePrivate.h seem to be where this being a plugin hits a wall.
[/edit]

It’s not possible right now to modify the post stack with logic/changes from within a plugin; I tried adding in some hooks into it to my UE4 codebase in order to release a camera/postprocessing plugin suite that required minimal engine modification, but there wasn’t much I could do to make those modifications actually minimal.

(And even if you wanted to consolidate as much as possible into a plugin, it’s against the core engine development conventions to ever have the core engine rely on plugin code – this is likely a build-breaking thing if attempted, but it may be only by convention. Either way it’s not a great idea).

Gotta say, this looks really great! I can’t stand how blurry TAA makes everything look

I don’t really know how to use github. Is there any way someone could zip the 4.16 source files up or something?

@AJQuick

[quote=“Derjyn, post:134, topic:98676”]

@AJQuick
https://www.elegantthemes.com/blog/resources/git-and-github-a-beginners-guide-for-complete-newbieshttps://youtube.com/watch?v=GqNAD4XoZ6k[/QUOTE]

…really?

“Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime.”

  • Maimonides

Such a great quote. Anyhow, as a developer, one should be prepared to endure a bit of research and actually learn the skills necessary to handle basics. Downloading a zipped up repo from Git/GitHub is a basic thing. Rather than asking others to spend time and energy, (being given a fish), I feel it’s far more powerful to learn how to spend one’s own time and energy to conquer a given task (learning to fish). I’m not against people asking for help, just pointing out that this is a pretty standard task, and it’s a bit weird to ask someone to zip up the source files, and host them elsewhere. Which, isn’t in line with licensing and whatnot, anyhow…

This is a modified version of the engine source, not a plugin. So you’ll be downloading the whole engine source, and compiling that to get the features presented here. You’ll need to link your account here with your account at GitHub to get access to the engine source. I leave it to you to research how to do that on your own, if you don’t already know how. Hint: there is plenty of documentation, and countless threads here on the forums where this task is covered for people new to this.

I’m sorry if I come off rude- it’s not intended. In “real life”, I am constantly running into beginners who refuse to accept the responsibility of learning. I spend more time showing someone how to type a few words into Google’s search bar, click a result, then reading… than I do actually covering topics in lesson plans and such. The documentation is there, and it seems nowadays everybody would prefer to ask others to put in the time and effort, and hand them the results. There isn’t anything wrong with spending a few hours reading up! Adversely, I’m not against easy solutions.

It shouldn’t even be an issue, but peeps are always getting angry when someone comes along, bluntly saying “do it yourself”. Heck, even when people are nice and paste links and offer a bit of guidance on how to tackle a “thing”, peeps get annoyed because they weren’t given instant results! It’s a darned shame, I tell ya. Maybe I’m just an old, grizzled jerk-face, I dunno.

At any rate, here is a picture that encompasses how to download from GitHub: howto!.jpg

Why was the PR for this rejected again?

Could be for any number of reasons – if it’s not consistent with engine conventions (in function and in syntax) is enough to reject a PR.

It’s impossible to make this a plugin, unfortunately, so if you’re not comfortable managing an engine repo it’s not really viable. I mean, an initial clone of a branch isn’t that hard to deal with, but if you ever want to update the engine and maintain your changes then that’s a complete different level of complexity even for experienced developers.

I’d still like to figure out a way to expose hooks into the renderer/post stack that can be used by plugins, but my last go at it wasn’t super successful or clean (and I didn’t even have time for it then), but I still want to do it.

I’ve also thought about maintaining a public UE4 repo with integrations from various sources, but my engine codebase is so dramatically customized (some of which i’d like to keep internal to my company/project) that I’d have to maintain two separate repos, which is also non-trivial. But, once I get past my current ~16 hour work days, I’ll likely end up doing that.

TAA introduces some blur, and this tries to combat that in an artistic way you could say.
I can’t prove mathematically that this is the right result, just that “I think it’s better”.

For a specific game you don’t really care about that. You just want something that works for you. For a general engine that bar is quite a bit higher.

Hopefully someone can take some inspiration from it and maybe come up with an TAA solution that has the best of both worlds.

Yeah, it’s kind of a hack, really. And I don’t mean that as a jab, just that it’s a workaround for a very specific purpose. It doesn’t improve the TAA implementation, it just does an additional pass to try and make up for the direct output of the TAA pass. I tried NVIDIA’s TAA solution (they call it TXAA) and it is an improvement in some ways, but a step back in others. And, overall, the final output isn’t all that different.

As a proper solution, it’s a non-trivial problem to solve. I haven’t looked really deeply into antialiasing algorithms much, but I’d imagine that a proper handling for maintaining detail would require a holistic evaluation of the algorithm and implementation or find a new solution entirely. This list of solutions is kind of hilariously lengthy:

  • Traditional Methods

  • Super-Sampling Anti-Aliasing (SSAA)

  • Multi-Sample Anti-Aliasing (MSAA)

  • Coverage Sampling Anti-Aliasing (CSAA)

  • Quincunx Super Anti-Aliasing (QSAA)

  • Enhanced Quality Anti-Aliasing (EQAA)

  • Sparse Grid Super-Sampling Anti-Aliasing (SGSSAA)

  • Temporal Anti-Aliasing (TAA)

  • Temporal Anti-Aliasing (TXAA)

  • Hybrid Reconstruction Anti-Aliasing (HRAA)

  • Temporal Super-Sampling Anti-Aliasing (TSSAA)

  • Multi-Frame Anti-Aliasing (MFAA)

  • Post-processing methods

  • Fast Approximate Anti-Aliasing (FXAA)

  • Morphological Anti-Aliasing (MLAA)

  • Subpixel Morphological Anti-Aliasing (SMAA)

  • Conservative Morphological Anti-Aliasing (CMAA)

So. Yeah.

Well, no not really. Epic just needs more engineers, which is why it’s fortunate they just hired some for a new Stockholm studio. Better temporal reprojection and dirty(bad) pixel rejection can do wonders, UE4 doesn’t necessarily have the most up to date TAA. Does UE4 use a negative mip bias for textures? Because that’s technically correct for reproducing TAA texture resolutions.

But until then this is a fine looking solution for anyone that wants it, and looking fine is as good a goal as any.

Will you upgrade the project to 4.18 and later 4.19 too?

Hey Hallatore,

I’m trying to download your solution for my project but all the GitHub links are dead - 404 Page Not Found. Can you re-upload it or is this solution dead? Whats going on? :frowning:

You need to link your Epic account with your Github account in order to view any UE 4 repository (Epic Games one or any of the forks)