First Person Nanite Mesh Jittering

Hello, encounter a weird issue with Nanite mesh and First Person rendering.

-> In our project, we use a setup when Weapon is a Skeletal mesh, and some attachment to it can be Nanite Mesh. They are attached to the Skeletal Mesh as a Static Mesh Component.

They Jitter weirdly, see attached video link, im packaged and editor.

It’s doesn’t seem a Motion vector issue (tested without any AA). It doesn’t seem also a nanite lod issue.

However, the mesh seem to be with nanite fallback, it happen on every mesh. If we turn of FP or look with a different camera, the issue disapears.

with TSR : https://youtu.be/0ERWyIAKAnY

without TSR : YouTube

The mesh to watch, is the lamp attached on the top rail of the rifle.

It can seem without TSR (second video) the issue is gone cause it’s blend with the noisy artifact and youtube compression, but it still there. It’s like if the mesh is LOD fighting.

Thanks you for your help !

[Attachment Removed]

Hi Eric,

thank you for reaching out! I can see the jittering in the first video, but trying to open the second video, youtube says the video is unavailable because it’s private (instead of unlisted I guess?). Are you sure that the lamp attachment mesh is also tagged as first person? And if you set r.Nanite 0, does that change anything? Also just to confirm, you’re on UE5.7, right?

Thanks,

Tim

[Attachment Removed]

Will fix second video.

Yes, lamp attachment is also flagged as first person, will double-check.

If nanite 0, no problem.

Basically the setup is like this :

Skeletal Mesh (arms) in first person, Weapon is a SKM too, first person, attached to arms.

Attachment are Static Mesh Component attached and owned by weapon SKM.

If nanite, jittering, if non nanite, no issue.

5.7 right, same setup in 5.6 does not have any jittering.

[Attachment Removed]

1 Like

Thanks you so much Tim !

Wonderfull, yeah should be okay for VRS shading. Is it possible to get updated when the commit is push to cherry-pick it ? except of course is 5.7.2 release is close

[Attachment Removed]

Hello i can confirm the fix is working. Thanks you so much.

In case another studio cherry pick, beware you need some commit dependency to have the proper fonction for the shader (didn’t note them, i’m sorry)

[Attachment Removed]

Hi Eric,

Thanks for the additional information! I think I managed to repro the issue in your videos. It appears to be a precision issue in how the FirstPersonTransform is applied on the Nanite path. Nanite currently uses 16bit float precision to pass the transform to shaders. Switching that to 32bit as is the case for non-Nanite rendering improved the situation a bit but it’s not yet as rock-solid as the non-Nanite path. I’ll continue digging and will let you know when I have a definitive solution. That solution will then hopefully ship in the next update :slight_smile:

As to why you didn’t see the issue in 5.6: That version forced all Nanite meshes to use the fallback mesh for rendering when used in first person. With the official support for Nanite in first person in 5.7, that forced fallback logic was removed. So if you were fine with how the attachment looked in 5.6 and need a workaround until the proper fix lands, you could simply disable Nanite on that mesh.

Cheers,

Tim

Cheers,

Tim

[Attachment Removed]

Thanks you so much Tim, in a wait for the fix !

[Attachment Removed]

Hi Eric,

Small update: I found that the jittering I repro’d on my end was ultimately caused by two different sources: The first one is the FP transform using 16bit float precision when rendering Nanite primitives. I’ll try and get that changed for the next release so it uses 32bit float precision instead. The second source of jittering turned out to be Nanite software VRS. In comparison to the 16bit precision issue it wasn’t very apparent and even less so under TAA/TSR but I found that after I set r.Nanite.SoftwareVRS to 0, my Nanite meshes were rock solid. Note that the jittering (more like a slight flickering) caused by Nanite software VRS is only “inside” the mesh and not on it’s silhouette, so if you’re currently relying on VRS, it’s probably not a big deal and might even be less exaggerated than on the test meshes I’ve used.

Cheers,

Tim

[Attachment Removed]

Hi Eric!

So the CL is currently in review and I’ll try and update you once it’s in UE5//Main. Unfortunately it won’t make the 5.7.2 release, but it should hopefully be no issue to cherrypick the change into your codebase.

Cheers,

Tim

[Attachment Removed]

Hi Eric,

Good news: The fix is in! CL 49948001 in UE5/Main. Alternatively here on GitHub: https://github.com/EpicGames/UnrealEngine/commit/1b33d7b69d1f018f13eec2a754b1a6e31489df85

Cheers,

Tim

[Attachment Removed]

1 Like