- Home /
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!
Answer by BGrater · May 02, 2013 at 02:29 AM
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.
Answer by Jason-RT-Bond · Feb 07, 2013 at 11:45 PM
Any chance you have the "Optimize Mesh" box checked in the import settings?
I wish that'd been it! But no, it's turned off. And there's no mesh compression either. I've tried switching on and off as many of the settings as I can find, just to see if one of them was interfering, but no luck.
What are you using to play the blend shapes? $$anonymous$$egaFiers?
We're using our own system that we wrote, which is working perfectly otherwise. I've actually just been exchanging some e-mails with the mega-fiers guy after posting this question, sounds like he wrote a new importer to fix the problem. Sounds like it might just be a Unity bug that I wouldn't have been able to fix on my own anyway.
Answer by Steamc0re · Jul 01, 2019 at 02:28 AM
Fixed in Unity 2019.1.8f1 with checking "Legacy Blendshape Normals" in Import Settings.