Temporal AA - Blurring on moving meshes (foliage)

Does anyone know if there is a way to improve the way temporal AA looks on moving meshes? Mainly I’m having problems with grass and leaves when they move. It creates this blurring/distorted look on them, and it ends up looking way better when I just force Temporal AA off and use FXAA. The downside is, I like the way temporal AA looks on most everything else, it almost completely removes jaggies on static geometry and looks great.

Here is a video showing what I’m talking about:


We are getting a similar artifact of streaky blur on our character’s clothing. Only since upgrading to 4.5 Was this when Temporal AA was introduced?

This is a known issue and something we can hopefully improve. TemporalAA requires accurate per-pixel motion vectors. Because you are using WorldPositionOffset (or displacement) to animate, the motion vectors will not be accurate.

Cool, thankyou. Is there some way I can disable the TXAA on just the moving foliage?

cloth sim too I assume, that’s where we’re getting the smearing…

Unfortunately not possible as it’s a screen-space AA solution (like most of them). I guess the way to achieve it would be at engine-level, and re-calculate the motion vectors every frame but only for world-displaced pixels. (Not an easy thing to implement I imagine). What would be useful is an MSAA solution for when things like this don’t necessarily work. Unfortunately those algorithms tend to annihilate your framerate. (I also think there’s a genuine reason why MSAA wouldn’t work for deferred renderers, not sure why or where I would have heard that though).

One thing you could maybe try (if it’s possible to access it), is reduce the number of frames that TAA tries to smooth over. I’m fairly sure that’s how it works, but I’m not sure if you can easily alter the number of frames it stores.

I’ll look into it. I downloaded the source for UE4 and have been messing around with a few settings in there, I got it to look slightly better (mainly from changes to the sharpness in the shader file), but nothing major. I’m not a programmer, so all of this is just trial and error for me, but I love messing around with it/tweaking things.

I’m wondering if it would be better to not use it at all right now, and use a modified version of the FXAA instead. It looks pretty good even with the default FXAA settings, but I’m wondering if they can be tweaked beyond that from the source or shader files.

Worth a try!

Out of interest, I’m assuming you’re using a Translucent material on the foliage right? Have you tried enabling the ‘Adaptive AA’ in the material settings?

i bet he is using masked material, translucent material would be over kill in foliage scenario. Also the only reason why u can disable txaa on translucent materials is the fact those are rendered in separate pass

I added this as a bug over at the UDN and Epic said they will work on something to fix it…sadly, I got no ETA so we dont know when the issue will be tackled. But it is indeed because of the not updated motion vectors. However, it seems to be the case that masked materials just dont really draw them in general, so its not related to wpo.

We have it on character hair as well and there is no wpo…its all bone movement of the head for example and beards and hair are morphing like crazy :frowning:

This foliage is just the stuff from the Ue4 pivot painter demo map, I’m pretty sure it’s using opacity masks.

Is it planned to ever fix this or improve anything regarding it?

Best to just stick with FXAA for now. Being hopeful for a fix with an engine that still has SO MUCH to offer and complete will do nothing but delay your project. Someday, it will look great!

Does enabling responsive AA help?

Not sure why this thread was resurrected, but this issue has been fixed since 4.8. The accurate motion vectors mentioned by DanielW can be toggled on in the project settings.

Thanks! I did not know about that setting. I’ve enabled it now and yeah, the Temporal AA looks a lot better. But there’s a bug with this setting.

If you have any SceneCapture2D in your level and you have “accurate velocities from vertex deformation” enabled, all skeletal meshes look like this:

So I can’t enable that setting. It makes foliage look a lot better, but skeletal meshes are so blurry now (and they are flickering) that having it disabled looks way better. :frowning:

You should be disable to set that property per material basis.

If I disable “support accurate velocities from vertex deformation” in the material of the skeletal mesh (the default mannequin) it looks a bit different, but not much better:

I’ve also tested it in 4.11 and it seems it’s better there, the problem only occurs on moving skeletal meshes in 4.11, not on static ones like in 4.10. In 4.11 it actually gets worse if I disable “support accurate velocities from vertex deformation” in the material for the skeletal mesh.

So, it’s like this:

4.10 and “support accurate velocities from vertex deformation” in material enabled: Extreme blur and flickering on all skeletal meshes
4.10 and “support accurate velocities from vertex deformation” in material disabled: Extreme blur (a bit less though) and flickering on all skeletal meshes
4.11 and “support accurate velocities from vertex deformation” in material enabled: Blur on all moving skeletal meshes
4.11 and “support accurate velocities from vertex deformation” in material disabled: Blur and flickering on all moving skeletal meshes (flickering only in standalone, not in PIE)

This looks like a bug, did you report it on the answerhub as such?

It looks like incorrect values are being written to the velocity buffer, causing the post process to think the meshes are moving when they aren’t.

Yes, I have:

I hope it’s getting fixed soon. Until its fixed, I will have to keep “support accurate velocities from vertex deformation” disabled and live with the blur on foliage.