Search Unity

Blender FBX Export Problem "Mesh has 20 (out of 332) invalid vertices (NaNs)."...

Discussion in 'External Tools' started by Yanneyanen, Jan 18, 2012.

  1. Yanneyanen

    Yanneyanen

    Joined:
    Jan 18, 2012
    Posts:
    55
    Hi,
    I'm having a hard time getting my animated character from Blender to Unity. I'm using Blender's FBX exporter.

    For now, my character has only one action, which is an "idle" stance, just some breathing, looking around etc. When I export the character to Unity, however, his arms are in the wrong position (seem to be at the position they were first modeled in), and they move, but not quite like they did in Blender (because of the wrong position).

    Unity also gives me this error, which I have no idea how to fix (or what it means really), and I couldn't find much on it on the internet either:

    "ImportFBX Warnings:
    Mesh 'Masker' has 20 (out of 332) invalid vertices (NaNs). They will be assigned value (0,0,0). The list of vertices: 281, 282, 283, 284, 285, 286, 287, 288, 289, 290 and so on..."

    Here's a video of the problem:


    I assume the problem has something to do with exporting from Blender. It seems to be a problem with the mesh, since if I export just the mesh, and not the armature, I still get the NaN error.

    Any help or insight on the error would be greatly appreciated. I can post the .blend file if it helps.
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Post the blend :). The mesh without armature is sufficient.
     
  3. Yanneyanen

    Yanneyanen

    Joined:
    Jan 18, 2012
    Posts:
    55
  4. ivanzu

    ivanzu

    Joined:
    Nov 25, 2010
    Posts:
    2,065
    You need to weight paint the model but I'm still not sure I had similar error when I didn't weight paint the model.
     
  5. Yanneyanen

    Yanneyanen

    Joined:
    Jan 18, 2012
    Posts:
    55
    It gives me the error even if I don't include animation, so I'm pretty sure the problem isn't with weight painting. The animated model obviously is weight painted.
    It's weird since I have exported a lot of objects from Blender before, animated models even (like doors and such), and they've worked fine...

    Edit: I tried exporting as .obj and importing back to Blender, then exporting as .fbx. I got the following message in Unity:
    "ImportFBX Warnings:
    Mesh 'Mesh' has 1 (out of 332) invalid vertices (NaNs). They will be assigned value (0,0,0). The list of vertices: 331"

    So only one invalid vertex now (still don't know what that means though)...

    Edit2: I did the same thing once more and the error is gone. Gotta get to sleep, but tomorrow I need to test if the animation works after all this. Hopefully it will.
     
    Last edited: Jan 19, 2012
  6. WedgeBob

    WedgeBob

    Joined:
    Jul 17, 2011
    Posts:
    122
    Sounds like improvement to me...but we'll keep a watchful eye on your progress, and hope that it'll become close to perfect by the time we hear the results later on. Get a good night's rest, then tell us how it all works when all is said and done.
     
  7. mariusz

    mariusz

    Joined:
    Nov 5, 2010
    Posts:
    72
    Hey.
    I'm not sure if this mean something, but I exported your model from blender 2.61 to fbx, and imported to Unity without errors.
    But it was on Windows. On Mac i get the same error as you. I tried to export it as .obj from blender but same error occur.
     
  8. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Yanneyanen, you have 3 armature modifiers in your model! Do you get the same warnings if there is no armature modifier?

    mariusz, is the fbx exporter the source of the issue? Have you imported the fbx's that were created on Windows and Mac on both platforms? That sounds like a bug...
     
  9. mariusz

    mariusz

    Joined:
    Nov 5, 2010
    Posts:
    72
    So... fbx exported from blender 2.61 under windows imported to Unity 3.5beta under Mac makes the same problem.
    But, fbx file exported from blender 2.61 under Mac imported to Unity 3.4.0f under windows - without errors.
    This is for mesh only.
    So to make things clear:
    fbx files (from Yanneyanen's .blend) exported from blender 2.61 (mac and windows version) imports correctly to Unity 3.4.0f under Windows, but with errors on Unity 3.5beta under Mac.
    But maybe it's just in my case... :)

    greetings,
     
  10. Yanneyanen

    Yanneyanen

    Joined:
    Jan 18, 2012
    Posts:
    55
    Hey, thanks for taking the time to try and solve this.
    I noticed the 3 armature modifiers, but those didn't matter, since even if stripped from all the modifiers and materials and everything but the mesh, I still got the error.

    Now, after exporting as .obj (and importing back to Blender) a couple of times, the error's gone away, and it seems like the animation works too. I need to weight paint the whole thing again though... so I'll post again after I've weight painted and animated him, and tell you how it went.

    Btw, I'm on a Mac, and using Unity 3.5 beta, so maybe it was a bug on the beta version, I don't know.

    Edit: Okay, so I weight painted everything and did a couple of quick animations where every bone moves. Seems to work like it should :)
     
    Last edited: Jan 19, 2012
  11. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    It is still a bug with the original file, so it would be nice if you could submit a bug report. mariusz tests definitely show that...