Temporal AA + Motion blur - A final solution to ghosting?

I’m working on eliminating the ghosting that currently happens when you combine TAA and Motion blur.

Here is screenshot (from shadowplay recording) where I pan around the character to illustrate the problem. (Adjusted the brightness in photoshop so you can see it more clearly)

Been playing around all day with the source code. It’s far from ready, just wanted to show off the work in progress.
It’s already much better than the defaults. The goal is to create a pull request and get it into the source. :slight_smile:

Default experience in 4.18 (Might be a bit hard to see)

Current work in progress

The theory I’m working out from is that TAA tricks the motion blur to use wrong weight when sampling pixels.

Here is a illustration of the problem, and what I’m trying to do.

  1. Base image before TAA
  2. Image after TAA is applied
  3. Base depth map
  4. Red pixel is sampling other pixels to get proper blurred color. It seems to take the depth map into account when it comes to weighting.
  5. It samples these two pixels with the wrong weight. Notice how they are supposed to be white (base image), and have another depth.
  6. (My code) I sample neighboring pixels to get the highest difference in color from before/after TAA. This weight is then used to adjust the weight of the sampled pixel.

Without this the red pixel (image 4) would have some of the green color from the two sampled pixels (image 5). This artifact will the get propagated further because TAA uses last frame and motion blur will then sample wrong again. This seems to be what happens currently in UE4.

I’ve outputted the color difference from the TAA shader and inputted that into the motion blur shader. Then I use that to check how much a pixel got changed by TAA.

Sounds really interesting. Will definitely be following this. Thanks for sharing!

Looks awesome.

I am very interested in this, Ghosting and TAA has been a big thorn in the engine visually for us. Does this work with everything on screen? such as fine small objects in motion, hair, and other such elements?

Also when do you think we can start testing this?

Keep up the great work!

Kind of confused - Motion Blur is by far my most disliked “feature” to have in any game. Why would constant ghosting be better than what TAA does by default?

My suggestion? 10 FPS, 4K Downsample, Turn Based PowerPoint Text Adventure - You get to avoid TAA altogether! :smiley: <Bad joke to slightly lighten my bum opinion>

Frankly this thread should have more activity, TAA ghosting is one nasty business. It is more apparent on high contrast scenarios.

Example: Put a dark character on snow and watch how the game becomes visually jarring.

For those who are wondering TAA ghosting will not be present in any pre-recorded Unreal video which is highly misleading by the way.Reason why you don’t see it come up on most youtube trailer videos out there.

any progress on this?

search hallators name, he’s done heaps of good work with stuff like this

How did you got succes to fix this? tutorial?