The number of mesh vertices increases when the object is imported unity from Max

the number of mesh vertices increases when the object is imported unity from Max.
For example the cube in the picture.However,the cube should only has 8 vertices.Someone could help me or give me some reason?Tanks a lot!!!
alt text

1 Answer

1

3DS max allows you to ‘weld’ vertices, which is just shorthand for pairing up vertices so all values are equal and a change to one will change the other - welding does not reduce the actual vertex count, which is what Unity uses. In your Max model, the corners are welded; in Unity welds are meaningless, since when you send a mesh to the GPU for rendering you need a different normal for each of the 3 vertices in each corner (corresponding to the 3 faces that end at that point). So your total vert count would be 6 sides * 4 corners / side = 24 verts.

In Unity you can reuse vertices in multiple triangles, so you could create an 8-vertex cube, but that would mean that the cube would have no hard edges - it would be rendered as if all edges were rounded. This is because you would have to combine the 3 normals and tangents at each corner into 1 shared normal and tangent.

Very very good and short explanation +1 edit Even this question has already been asked i've upvoted the question as well, just bacause of the answer ;) <a href="http://answers.unity3d.com/questions/21411/vertices-and-triangle-in-unity-problem-with-counti.html">1</a> <a href="http://forum.unity3d.com/threads/50576-Unity-multiplying-my-poly-count">2</a> <a href="http://answers.unity3d.com/questions/37435/why-is-unity-got-more-vertices-than-3dsmax.html">3</a>

Not really a new answer, but a bit of an addition: Meshes are always split at Smoothing Groups, Material borders and UV borders, when they are imported in a realtime environment, since one XYZ Vertex can ever only have one UV coordinate, one vertex normal and one material.