I'm having an issue with a mesh I've been working on where some newly added geometry will not unwrap and texture correctly.

So given this piece of geometry:

sample geometry

I see two strange things happen:

  1. If I select all connected faces I can see in my UV Editor that the vertices have coordinates of (-nan, 0.000). This seems incorrect/impossible.

invalid coordinates

  1. If I try to unwrap the geometry it collapses to a single point in the UV editor (when I would expect to, ya know, look normal). Additionally, if I move that collapsed point around only some of the faces will be textured correctly. Most of them remain unchanged (all faces should be white).

Single point (highlighted in orange in the UV Editor on the right): single point uv

Unchanged texture: unchanged texture

  • 1
    $\begingroup$ Do you have any seams marked? $\endgroup$
    – Nathan
    Commented Aug 9, 2021 at 3:02
  • $\begingroup$ I tried with and without but I discovered last night that this was just an actual bug in Blender. Thanks for the reply though. $\endgroup$ Commented Aug 9, 2021 at 13:27

1 Answer 1


This is caused by a bug in Blender 2.90 through 2.93. At the time of posting of this answer there isn't button or operation to fix this. However, in the official Blender issue tracker thread about this problem (found here: https://developer.blender.org/T79775#1016390), someone posted a script snippet that will set all NaN UV coordinates of the selected geometry to a valid value. Note: I used this in Blender 2.93 specifically even though my mesh was created in 2.90.

  1. Go to scripting layout tab at top (or open a text editor view)
  2. From the text editor toolbar at the top create a new script/document
  3. Paste the following script into the editor:
import bpy

for ob in bpy.data.objects:
    if not ob.type =='MESH':
        print(ob.name,'is not a mesh, skipping\n')
    m = ob.data
    if m.validate(verbose=True):
        print("something was fixed with the mesh")
        print("mesh was fine")
    print(" and the cached custom data has been cleared to avoid export issues")
  1. Run it with the play button at the top.
  2. Your mesh should now be fixed!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .