Best practice: Temporal AA jitter free?

Hello everyone,

I’m working on a little project here that I’m running into issues with the TemporalAA. Basically I have a lot of moving actors and some of them infrequently seem to drop into a flickering frenzy from time to time. I made a screen recording to illustrate the issue that is uploaded here: https://drive.google.com/open?id=1OvU8NsQYI6sshCbsd3GqP1tmzMUhJePC
Quality might not be top-notch, but basically you should be able to see how suddenly the top right and lower left coin starts being super noisy jittery and a second later stop again.

I know by now that it must be related to TemporalAA, but am struggling to fix it. I’ve tried several different settings in terms of Samples with no success. These are mainly based on Screenspace Reflections and the material is super simple (happens with other materials as well).

Any thoughts? Would be great to get some input on best practice for TemporalAA in order to avoid issues like this.

THANKS!
winck

No ideas?
Sorry for pushing.

This is weird, looks almost like texture streaming behavior. Normally TemporalAA leaves “ghosting” like visual artifacts but its difficult to determine with the low resolution video. Try to turn off texture streaming on all the textures you use on the coins.

@NasteX, Thanks so much for your answer!

I’ve already played around quite a bit with texture streaming and that doesn’t seem to be it. In fact I gave it a go throwing out all textures in the scene and it still does it. It does get a lot less, but I assume the normal map simply makes it more obvious as it adds more detail.

My best guess right now is that the TemporalAA glitches out when an actor moves incredibly slow? Is that possible?
All of those coins are dynamic movable actors, so there is quite a bit of overall movement going on in the scene. My impression is that the noise seems to come in on the coins that are veeeery slow to almost not moving at all anymore.

That… kinda looks like fireflies, an effect you get from not having tempral AA on/too low of a resolution but… I see other fireflies there and they aren’t nearly as bad as that weird shimmer that just appears and disappears. It’s like temporal AA gets turned off for a moment in that screenspace tile or something, but I don’t know wtf is actually going on. It’s really weird though.

My best guess is that temporal jitter is on (the camera shifting position slightly each frame) but then temporal accumulation, building up the image over time, turns off in those areas for a brief time. No idea if that’s correct though.

Have you tried changing the AA mode from within the project (or maybe it was editor?) settings?

Each mode has it’s benefits, some work better than others in certain situations.

Are you using Raytracing for the lighting? If yes this could probably explains the problem. Could be that you dont have enough Samples per pixels for reflections.

Also your glitching now kind of reminds me of moire pattern that normally happens when you dont use power of 2 texture resolution (512x512, 1024x1024 etc).

You can try what @Juice-Tin suggested to see if this happens.

If nothing else works, could you render out a small portion of your video on high rez so we can see what exactly happens.

Thanks guys for the help!

@FreneticPony - I don’t mind some of those fireflies, ultimately it’s a lot to tackle with all those reflective metallic objects, but that glitch appearing and disappearing is rather distracting. I’m by no means an expert on this, but your explanation also resonates with my impression so far. It almost feels like TemporalAA gets turned off temporarily for certain objects. Thought that sounds rather weird, as my understanding is that TemporalAA is a posteffect and actually shouldn’t have any relation to individual objects?

Uploaded another video that should be a bit clearer: https://vimeo.com/352206497/9b6441d668

As mentioned I’ve tried no textures, completely different light setup, with no success. @Juice-Tin I’ve also played around with the other AA methods, but TemporalAA gives the best results by far for this.

Is there any documentation on the console commands for TemporalAA? Maybe there’s something that could help…

Raytracing is off. I used it a while ago, but now everything is back to No-RTX.
I’m equally confused as I’ve tried a lot of different things already but can’t pinpoint what exactly is causing the issue. Next step would be trying to reproduce it in a completely new scene to see if this could be a bug?

This looks a lot like moire patterns because of the small rings that you have as normal map. Are you using power of 2 texture resolution?

Edit: Ignore the text over, I just saw that you posted an earlier answer with the information that I needed to know. Yes try reproducing the project in a new project. :slight_smile: And I dont mean a new level, just a completely new and clean project.

Oh dear. I was able to reproduce it in a completely new project, Not sure if that is a good or bad thing…

Similar setup: Fully metallic coin shapes (it’s a standard cylinder primitive), dynamic actors, a simple normal map (which merely amplifies the visibility of the glitch as it happens without it as well) and at a certain amount of spawned actors things start to glitch out.

Is this a limitation or a bug?

Hmm, can you check what are your engine scalability settings?

I can almost notice in the new video that there is a noise that is typical for SSR (screen space reflections). Try this command console code - r.ssr.quality 4
If the result is better and you want it to be a lot more better check this link for instructions (its very simple) - 3D Modeling & Texturing: [Unreal Engine 4] Improving Screen Space Reflections

Are you doing this with a particle system? Make sure you don’t have any particles or other translucent materials with responsive AA turned on, they could make coins they overlap get increased current-frame weight and cause the issue.

@NasteX The engine scalability settings were already on Epic and unfortunately the console command also doesn’t improve it. Even with ScreenSpaceReflections on 0 in the PostProcessVolume the artifacts are happening, so I’m not sure that’s the issue. Still, thank you so much for trying!!

@muchcharles It’s not a particle system - I’m actually spawning dynamic actors as childs of a main actor, so a bit computing heavy.

On a sidenote: I’m almost certain by now that it has something to do specifically with objects that are moving at a very slow speed, almost standing still.

That’s why my first assumption was TemporalAA, as it as far as I understand “shakes” the frame in order to find the lines to antialias - maybe this is not working correctly, when objects move so slow that TAA doesn’t “know” if they are still moving at all? Apologies for this very crude explanation of my thoughts :slight_smile:

1 Like

Hmm, I have no idea. Have you tried forward rendering and MSAA? I am just very curious what is causing such glitching visual artefacts, been working on different projects with UE4 for a very long time and never had this problem.

Another thing to try is (just for a test) turn off the shadows of the lights.

Edit: Also try to turn off motion blur in postprocess settings.

I tried MSAA, but haven’t been able to get results as smooth as TAA with it, so that still seems to be the best option. Turning off shadows and motion blur also doesn’t seem to fix it.

“I am just very curious what is causing such glitching visual artefacts” SAME!! It just seems to be a bit too obvious to be a bug - I must be doing something wrong!

I’ve uploaded the mockup project in which I recreated the artifacts here, if you are keen to have a look:
https://www.dropbox.com/s/0b4ap4wfn7…E_Lab.zip?dl=0
It’s a really simple setup. Ran it on two different machines, both create the same jitter noise.

Alright it was def AA problem so what actually is happening is that you render in low resolution and because of that there is not enough pixels on the screen so you get “glitching” and its so visual because of your strong specular highlights. This is just the basic of basics of explanation.

Just raise the Screen Percentage inside PP to 400 and render out a .png sequence with Level sequencer. :slight_smile:

I uploaded a updated version with a Cine Camera and Level Sequencer for you to see the setup - Uploading now, check for link later today. - Link: https://drive.google.com/file/d/1xavIWK3Pfsp9k8UYsqgsFDDt7XlD-lzf/view?usp=sharing

You can find my .png that I rendered out for the test inside the Saved > Video Capture folder.

I hope this fixes your problem. The mystery is over. :smiley:

Edit: I deleted the .png sequence, the total size was too big.

Yay! At least I don’t need to change the topic of this thread, haha. THANKS NasteX!
It does make sense, as it also seems to be more obvious on smaller objects.

I actually rarely had this problem when exporting a sequence from the level sequencer, only recognized it at runtime.
Is there any way to fix this during runtime, as screen percentage on 400 is a beast performance-wise. Still runs fine on 200, but thats about it.

On closer inspection I noticed the same you did that when the coin is “still” its not exactly still, but moves really slow and its the thing the causes the jittering. I suggest you to add all the coins that are spawned inside an array and after a few sec delay to turn off simulate physics on the coins that are asleep (check sleep/awake workflow) or just the ones that stop move. So they wont move or do anything physics related. Ofcourse this will lead to other problems that the coins hit by new coins wont move, but in my opinion its a small compromise to do.