I’m working on a project using the MassEntity system to drive enemies that are animated using World Position Offset. We took the material and resources from the Matrix project, but we’re getting bad smearing on the enemies. This only happens once they have moved, but will keep happening if they stand still later.
The smearing goes away when we disable both Motion Blur and TSR, but having either one enabled will make them show up.
I found similar topics (Foliage has a Shadow noise/grain - How to fix it? WPO issue in UE 5.0 on all materials, severe smear/dither Temporal Super Resolution Problem),
but the suggestion to turn on “Output velocities due to vertex deformation” and set Velocity Pass to “Write during base pass” did not change anything in our situation.
I know it has to be something about the motion vectors, but I have no idea how to debug any of that. Is there a way to get more information or even better, a solution?
Actually, I was fighting with it too today and narrowed down to TSR causing Instanced Static Meshes smear…
I have no solution other than not to use ISMs or TSR, but this is a basic blueprint with:
1x Static Mesh
1x Instanced Static Mesh with one instance
1x Hierarhical Instanced Static Mesh with one instance
The only mesh not smearing is the normal Static Mesh… If I switch to any other AA method, all looks good. No problem in the editor and no problem if there is no rotation, so probably it’s about velocity vectors…
It’s UE5.1.1 and “Velocity Pass” to “Write during base pass” has no effect on it.
Hey. I also had this issue using mass entities. We have mass entities that are visualized as instanced static meshes. After moving at all they would smear badly when stopped. We could minimize this by disabling motion blur but you could still see a tiny amount of jitter on them
We are in UE5.1.1.
We were able to fix this issue by changing “Velocity Pass” in the project settings to “Write AFTER base pass.”
I updated my project to 5.2 and attempted the suggested fix again, but that did not resolve the issue for us. I recreated the project by Fine_Cut_Bodies and submitted a bug report for it.
From another thread I found how to display motion vectors: Gen 5 Temporal Anti-Aliasing - #15 by Guillaume.Abadie
In the editor window, click Show → Visualize → Motion Blur. That showed me that the only mesh generating motion vectors is the regular static mesh (the middle in the image). The instanced static meshes do not.
I found that the smearing improves a lot in this test project by using TAA instead of TSR. Just the switch to TAA did not resolve the issue in our own project from my original post, so I tried applying the same logic I found in this test project.
We had “Output velocities due to vertex deformation” enabled, which generated motion vectors for our instanced static meshes, which did not happen in the test project, so I disabled this. That improved the smearing to the point where transform changes did not cause any smearing, but since we turned off the motion vectors from WPO changes, whenever our enemies animate, the smearing is quite bad.
In essence, fixing one problem causes the other and vice versa…
To call this a solution is a bit of a stretch, but given the current state of things and the engine version we’re working with, we managed to get this working.
We found that setting the cvar r.Velocity.ForceOutput to 1 made our instanced static meshes output motion vectors, even though they had WPO animation as well (digging through the source code, this seemed to be a factor why that was being skipped perhaps.
Forcing these motion vectors to be generated made things look much better, as long as our enemies moved. When they would stop moving, they maintained their previous motion vectors, looking as though they were swirling around when their last movement was a roation, or blurred directionally if their last movement was a translation.
This gave us the hint to look for any suggestions of the update being skipped in code for optimisation purposes. We found cases of this, so we opted to force a tiny bit of movement on the enemies each frame, so we just have them all move 0.01f in the x direction each frame in order to trick the engine to generate the motion vectors for us still.
It worked and our enemies look a lot clearer and better. The small movement is irrelevant in gameplay as our players nor enemies will not be in the same place for long enough for that displacement to matter.