mesh has some nearly zero tangents/bi-normals

Annotation 2020-05-14 190707.jpg

anyone knows how to fix this. i made a search, but couldn’t find anything really helpful. i’m pretty sure this is UV mapping related. it’s not a model i’ve made myself, but that i purchased. the thing is it’s a 90k polys mesh. so if i knew where to search, even a small clue it would definitely help. as i wouldn’t have to search ‘poly by poly’. I’m on Blender

1 Like

I’m having this same issue and can’t find any information on it. Any guidance would be appreciated.

IIRC, the FBX Importer tries to calculate Tangent and Binormal information from UV’s unless you explicitly import them. If the object is poorly UV’d or has no/malformed UV info I can see this being a problem.

I don’t know about Blender, but in 3DS Max there is an option to “Export Tangents and Bi-Normals” with the FBX. You can then change the import option from ‘Calculate Normals’ to “Import Normals and Tangents”.

Blender probably has a similar export option I would imagine.

8 Likes

Solution:

  1. Apply all transforms
  2. Recalculate normals outside if they appear abnormal.

3 Likes

Note that, if the object has UV coordinates that are very close together for two different vertices on each side of an edge, you may get this, because the math can’t calculate a good UV space direction when the two UV values are too close.

This is a problem in the source asset, and can’t really be fixed in the engine (unless you want to write and run some UV relaxation code, which will generally screw up the parts of UV mapping that are precise and good.)

There’s another problem with UV coordinates that are too close along an edge, too: The bilinear filtering will drop all the way to the smallest LOD level, causing texture cache missing, and also causing certain shader LOD approaches to make the wrong decision. (This second part only hits certain kinds of materials you can build, if you’re not using those, that’s not as much of a problem.) Plus it make the triangles that live next to these vertices to look blurry.

Unfortunately, it’s really hard to catch all things like this when building art – even the most deliberate 3D artist with 20 years of experience, can’t get everything right just by feel. Good tooling is needed to call out problems like these, and generally, the DCC tools (Maya, et al) do a ■■■■■■ job of providing feedback on things like this. A successful game studio will have to buy or develop enough plugins to catch these problems before they happen, to get all their art up to technical snuff.

4 Likes

That’s true, if vertices are split yet very close to each other that can cause this issue as well.

This is a method number 3:
Press L while aiming at a model to select all vertices,
then press ALT+M to create a “Merge” window,
and select “By Distance” to connect all the vertices that are very close to each other (There is a parameter that lets you adjust the distance tolerance).

5 Likes

Hey there -

While others have mentioned that improper UVs can cause this, there is also a problem where importing meshes with overlapping loose parts causes the error if you have ‘Build Nanite’ enabled. This happens even if the objects is properly UVd. I suspect this is a bug and have reported it as such. I have confirmed for my models that disabling Nanite for the meshes causes the error to disappear.

The same mesh into UE 4.27 also does not produce any errors, so this is a problem with Nanite and meshes with overlapping loose parts.

If your object is properly UVd, disable ‘build nanite’ and import and see whether the error goes away. If it does, you may want to consider also submitting a bug report for this.

7 Likes

try but same problem :frowning:

Rodhenik
… then press ALT+M to create a “Merge” window,

Alt+M brings up the Split window, just pressin M will bring up the Merge window (Blender 3.3)

I get the same problems, but I don’t have any duplicate vertices I can see. Got a few that are close to each other, but at the moment not wise to merge them.
As I have yet to UV Unwrap my mesh, that’s probably why I get those errors.
I have also not yet assigned any materials and such to it, so my mesh gets that default dark grey checkerd texture on it. But it looks really weird and distorted in a lot of places. Checked my mesh and my normals are correct.

I’ll try checking the Tangent Space with exporting the fbx, see what that yields.
But what are generally the settings for exporting fbx for use in Unreal Engine?

Here’s the solution to your problem:

For your Mesh make absolutely sure you do not have more than 5 vertices connecting a single edge. For some reason I think UE5 dislikes triangles that aren’t created from the typical quads. But the next step should ignore that issue either way.

Whenever your have to transfer a file from, say, Blender to UE5 you have to create a seam on your Mesh, then unwrap the UV and make sure it fits. After that, you can recalculate your normals, apply whatever modifiers you want and export it. I’m sure there is a way to go further into details on how this process works or whatever can be done to further increase the fidelity of these things, but this is how to get rid of the errors you’re seeing.

I hope that works.

I also ran into this error while creating static meshes in code, and found another possible cause.

It looks like you see this error if the winding order of a triangle is inconsistent with the vertex normal. i.e. If the winding order of that triangle suggests a triangle (face normal) facing in one direction but the vertex normal is pointing in the opposite direction.

My assumption is that there is a dot product involved in calculating the tangent vector that is being clamped in the range [0…1] which is resulting in a zero length tangent, which is what I was seeing. Not that it really matters why.

In my case I fixed this by correcting the winding order of my triangles but if you are coming from a modeling tool I guess it could be caused by a rogue normal pointing in the wrong direction.

I’ve been having this problem with a mirrored shoe imported as fbx from blender, one shoe works the other causes this error, and it coincides with materials on the same shoe having see-through faces. This was not fixed by making materials two-sided. I tried various things suggested pre-export from Blender and absolutely nothing worked until I did the below.

Not sure if it is relevant for you as workaround, but a fix for me in Unreal Engine after import was to do this:

  • drag the offending item into the viewport
  • select it
  • switch UE to “modeling mode” in the drop down top-left of viewport window
  • with the item in the viewport still selected, scroll down to “attributes” section
  • click on “Nrmls”
  • check “invert normals” and hit “accept”

fixed the issues for me.

2 Likes

Thank you, switching it to “Import Normals and Tangents” fixed my issue!

This was the solution I was looking for. THANK YOU. So much time saved.