Unreal Engine 5 / (4-27) - Vertex normals breaking with morph targets

I’m working on a skeletal mesh for facial animation with a series of morph targets, however when two get triggered at the same time the normals seem to break on the vertices affected. I’ve checked with the vertex normals visible and it seems like they slowly get inverted as the second morph target triggers. I’ve tried with and without Recompute Normals/Tangents and not sure what else I could try. I’ve attached below screenshots of the issue in unreal and of how it’s looking in Maya with correct normals.
I’m working on Unreal 5 Preview 1 but this issue was also happening in UE 4.27.

If anyone else knows any possible fix please let me know, thanks in advance!



1 Like

Hi!
I have been using morph targets for character creation and curve based facial animation.
In my case it worked in both 4.27 and the latest ue5. Image added showing vert normals with base head on the left and some face sliders used on the right. So it isnt the engine, it has to be something with your setup. When reviewing the images you added one thing i noticed was the difference in vertices between the mesh in maya compared to ue. 31115 vs 29804? Might there have been some loss or merging of vertices when exporting/importing?

Hey!
Thanks for the reply.

The scene I had open in maya had a couple of other meshes, that’s why it was showing the different number of verts, but the actual mesh being affected by the morph targets is the same both in Maya and in Unreal, the only thing that is changing are the vertex normals in unreal. If I import it as a static mesh with the shapes triggered then it’s looking fine, it only breaks when it’s a skeletal mesh and the shapes get triggered.
I also never had issues with this before, I’ve been using morph targets for a while now as well and even on this mesh they seem to be working mostly fine for all other morph targets for the face, they aren’t in the images I added because I’ve been trying to narrow it down to what’s causing the issue on these two shapes in specific. I’ve redone the blendshape node multiple times and re-exported/imported but this always ends up happening on these shapes.

When I looked at the mesh with the same visualization as you showed there I could see the normals on the verts that look broken get flipped around as the shape gets triggered, they start pointing into the head. That’s why I believe it’s some issue with how Unreal calculates the normals/tangents as the two shapes gets triggered, I just don’t know how to fix it.

Could it also be something related to the character’s scale? It’s pretty small, around 15cm tall.

Edit: I just applied a x10 scale in Maya on a clean mesh with just the two blendshapes and reimported, the issue was the same. This did help see the vertex normals in unreal better though and I was able to take the screenshots below. What I think is happening is that Unreal is adding together the directions of the vertex normals instead of recalculating them so they keep facing outwards from the surface like maya does.




Hmm i see, yeah in my case i use blender so i cant speak on maya specifics.
Just some things to check i guess.
Is it one singular mesh?
Do all bones/meshes have a scale of 1?
When scaling did you apply transform change to scale so its back to 1?
Very strange behaviour indeed.

Thanks again for the reply. Yeah it’s one singular mesh, I froze the transformations so it’s back to 1 and for this test I just have one bone in the scene also with scale at 1.

@imjeco Try enabling this option here:

UE5 doesn’t seem to have that settings but I enabled recompute tangents on the static mesh and set the SkinCache from auto to Enabled as well, the problem stays the same. :frowning: I also tried ticking that setting in a 4.27 project and it doesn’t seem to fix it there either.

Try a test mesh with just a basic cube that extends with a single morph target.
If that does not work either then its not the model.
Its hard to figure out what else to do.
I suggest maybe checking the documentation on pipeline for morph targets and see if there is something that you are doing differently?

Also maybe try the morph target previewer?

I have the same problem… is there a solution?

Hello hello, the solution to my problem was going into the skeletal mesh and under the Sections tab changing Recompute Tangents from “None” to “All”, hope it works for you!

5 Likes

Thank you so much for posting - this has been a big issue for me!
However, I find that enabling ‘Support Use Skin Cache’ and recomputing the tangents in the LOD settings is causing UV seams to show on my characters.
I can minimise this effect with slight adjustments to the albedo brightness - the remaining visible seams are a lot less ugly than the broken normals artefacts.
Ideally, there would be an option for UE to calculate and store normal information for morphs when the FBX is imported (i.e. without having to enable the UV seam-breaking Skin Cache) but this workaround is good enough for now.

Hey Guys

I would love to use this option to fix my issues - and thank You for this topic it also helped me a lot- but do You have any idea why my fbx imported meshes get some chunks in here ???

:pray: :sweat:

beautiful,3Q

For anyone who has the same problem, within the mesh of your character in the “deformer” section they give you an option which is “DG_Test” that helped me

Where is “DG_test”? I can’t find it.

I was able to resolve the issue by enabling “Support Compute Skin Cache”.

Hey folks.
This whole topic is predicated on a bad starting point.

First of, you all really ought to triangulate and check triangulated normals only when comparing things. That would probably help in the future too.

Also, when you import quads you let the engine do what it wants on import - including shuffling all your vert indicis.
Definily not ideal when comparing stuff. Or needing those to be mapped precisely. Like with morphs and textures.

Second of all - your character(s) should always be set to recompute normals and output Tangent while using a custom normal map.
And by always perhaps I exagerate, but its really useful even on Lego looking characters.

So fix it. Set up your materials correctly, and output the tangent off your full normal map.

Further, your materials need to have the checkbox for morphs enabled to actually show the corrected normals on their own.

Will that fix ue5?
Who knows…
And it probably doesn’t matter as there is so much other broken sruff that renders it irrelevant.

Still, when you do things right and following common place best practice it really should work - and not just on Unreal…


enable this plugin first

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.