Unity changing the number of vertices in a mesh on import, ruining blendshapes

So my problem has to do with getting blendshapes working. I’m having a lot of trouble because Unity keeps changing the amount of vertices on my blendshape meshes once they’re imported into the editor. They are perfectly set up in maya and work no problem there. My import settings in Unity are set to Import Normals (I can’t use calculate because then the smoothing information is lost, and it is needed to avoid seams between pieces of the character), and my maya export settings are set to include smoothing groups. According to the documentation this should be all I need. And it mostly works, but every once in a while the number of vertices between two blendshapes will differ by 1 or 2 vertices. It seems to happen more often with lower poly meshes.

Does anyone have some experience in what could be causing this problem?

Thanks in advance!

This is not a bug, I would guess it’s related to how you’re dealing with tangents.

The number of verts you see in Unity is actually the number of unique vertices (not what Maya is showing you). Therefore, different shapes with the same topology can have a different number of unique tangents and thus different vert counts. Same goes for UVs - if the UV layouts on your meshes are even slightly different you may get different vert count.

Try setting tangents to “none” and make sure you have identical UVs for both meshes. This should work fine for you as long as you don’t need anything that uses tangents such as normal mapping, otherwise it becomes a bit more complicated (you’ll probably need to calculate your own).

I believe MegaFiers gets around these issues through a custom export process.

Hope that helps.

Any chance you have the “Optimize Mesh” box checked in the import settings?

Fixed in Unity 2019.1.8f1 with checking “Legacy Blendshape Normals” in Import Settings.