I am currently working on a game jam project and I am having some issues with my characters face flickering during movement. It is related to Anti-Aliasing, because when I use no Anti-Aliasing, the issue is no longer there, however the harsh outlines you get then are also not really ideal.
The face mesh ignores control rotation as it is set to follow the camera so it should not be moving when the ball rolls and just be static in the center of the screen. Nevertheless, when I roll my ball the face starts flickering and becomes unreadable.
The effect is even more extreme when I scale down the ball, when it is scaled up it is less noticeable, so it is also related to the amount of pixels the face takes up in the screen space.
I have disabled motion blur and tried out several anti-aliasing methods but none of them seemed to fix my issue while still smoothing the edges properly.
I also disabled all translucency or emissiveness from the face material, but that made no difference.
Has anyone had similar issues and managed to find a solution? Maybe some console commands that helped?
Sorry about that, forget to change the video settings, it is updated now.
Can you go a bit more into detail about what you mean with the motion vectors? Can I adjust them manually or is it just something I am stuck with?
Yeah, so basically, the ball is spinning, so the vertex positions of the mesh change from frame to frame. TAA uses this data to prevent unwanted blurring as the textures on the mesh move along with it.
But your face is static, not rolling with the ball. This makes it harder for TAA to compensate.
In order to be unaffected by the motion vectors of the ball, the face would need its own vertexes that are stationary.
You can use the “previous frame switch” node to manually alter the motion vectors, but if you were fix the face this way it would also break the ball in exchange since they are sharing the same vectors.
Just to be clear though: the face moving is not done with a material but instead the face is a seperate geometry. It is a child of the ball but does not inherit its rotation, just its location, as I set the rotation manually based on the camera position.
Therefore the face also has a seperate material that I could use the previous frame switch node in without affecting the ball. I havent used it before and just looked into it a bit, to me it looks like its purpose is to fake motion blur (please correct me if Im wrong).
I am unsure what to do with it as I dont have motion blur enabled and dont want a motion blur effect on the face - would your solution be to calculate the current movement of the face based on delta rotation and feeding the reverse of it into the previous frame switch node to counteract the TAA effect?
Here is a screenshot of my pawn hierarchy, as I said the face already has its own vertices and should theoretically be independent of the ball:
It fakes motion vectors - Both motion blur and TAA rely on the same motion vectors. You can visualize the motion vectors by going to the visualization menu in the viewport and selecting motion blur. This will show a grid of vectors, so you can observe them. Going to buffer visualization > velocity also shows the vectors per pixel but this can be hard to see.
But with that said, being its own mesh, it should already have its own vectors. It may just be so close to the underlying ball that the engine cant properly depth sort the blur - and this might be why the problem is worse on the small ball. What happens is you slightly increase the spacing between the face and the ball? Does it get better?
I found the following console commands online:
r.TemporalAACurrentFrameWeight 0.45
r.TemporalAASamples 4
r.Tonemapper.Sharpen 1
They are definetly helping, but they dont completely resolve the issue and it is still quite noticeable. I think they mostly increase the overall TAA quality which improves the overall look, but as I said they sadly did not completely resolve the issue.
Here is another update of how it is currently looking (also with the increased distance between ball and face): https://youtu.be/tR1KMkaFVXQ
Good guess but they said they disabled translucency already.
Maybe the way you are setting the position of the face mesh is not generating motion vectors. In other words, the engine may see it as teleporting instead of moving?
In that case, I would record the position of the face on the previous frame, and pass that data into the material for the previous frame switch and try to manually generate the vectors.
fiar enough. i missed that. in the viewport it still shows up as translucent. you can unplug the opacity and it renders opaque but the shading model is still translucent and it renders bs depth. that’s me thinking.
Ah, good catch. I didn’t notice that. OP, double check that your material is set to opaque or masked.
You can sometimes also get translucent materials to work by checking the box in the material root “output depth and velocity.”
You got it, I set my opacity parameter to 1 for testing instead of changing the blend mode back to opaque. Everything is now working as intended and I could even put the emissiveness back in.
Thank you both so much!