Vertex count 10 times higher in Unity

Hi,

i know, its discussed here quite often and this question was asked several times, but what i came to understand from that is what is causing the problem, but not the solution. My model has 300 vertices in Max, but in Unity its like 4000 vetices ??? I realy dont know what i should do about this. The model has to be textured way it is textured, so making less uvs is not option.

Is there realy no way around the vertex count, how to take the count in Unity close to the count in 3d modeling software ? Any help greatly appriciated ( any links to tutorials on this topic would be also welcome. By the way, how come that after countless hours spent with trainings for unity no one mentioned this ? )

Thanks

Luke

There's not a lot you can do. A Vertex in unity contains the position, the normal and the uv coordinates. A vertex that is shared in 3dsmax by 4 triangles will be splitted into 4 vertices if:

  • it has a different normal vector
  • it has a different uv coordinate
  • it's part of a submesh because a different material should be applied to it.

It's hard to believe that 300 vertices will produce 4000. That would mean every vertex is used by around 13 triangles and every triangle have something special. What kind of mesh do you talk about?

To be exact. The GPU automatically creates extra vertices in order to handle hard-edges, UV-splits and additional lights.

If a vertex is part of a hard-edge, then the vertex will have multiple tangents, normals and bi-normals. When a vertex is part of a softened edge, it only has 1 tangent, normal and bi-normal. Because for lighting purposes the GPU needs to perform a separate calculation for each tan/norm/bi-norm, it creates a new vertex for each. The same is true where there are UV-splits (these do not stack however, so if a vertex is on the edge of a UV-split and is part of a hard-edge it will not duplicate the vertex twice the amount). The number of vertexes in Unity will then be equal to the number of vertex-tangents the model has.

In addition to this for each additional render pass, the vertex count is added on top of the original vertex count. i.e 5 render passes on a 4000 vert model, for all intents and purposes equates to a 20000 vert model.

For more information, check out this helpful video provided by CGcookie:

http://cgcookie.com/unity/2013/04/18/understanding-gpu-vertex-count/

because Unity is not counting the geometry vertex but the UV vertex number.

Unity’s realtime light (realtime shadows) adds calculation to each object affected by realtime light in the scene, which means it’ll add more detail to it.
You didn’t do anything wrong in exporting. Just turn off the directional (or any other) realtime light and then check the Stats of your game scene. It should then correctly display the vertex count that you have.

Baking is a solution for that.

For me, when I change my lighting from soft or hard shadows to no shadows, the vert count decreases dramatically. Also for some reason, the first(default direction light in every scene) light does not reduce vert count when deleted, but if you were to have multiple directional lights in your scene and deleted them, the vert count would decrease.