- Home /
Imported Model has more vertices in Unity than in other Editors
When I import a model that has texture mapping on it, the vertices count is different from the editors (tried Blender, Cinema4D and MED) I did the model in.
I tried to import in different formats (fbx, obj, c4d) but everytime I got the same result - more vertices in Unity than in the editor.
However, when I import the model before I apply texture mapping to it, I got no problem and the model has the same number.
What does affect this and how can I avoid this?
Answer by Piflik · Jan 05, 2013 at 07:02 PM
In any realtime engine, each vertex can have exactly one of each of the following:
XYZ coordinates (obviously)
UV coordinates
Vertex normal
Vertex tangent
material ID
If any vertex needs multiples of any of these (for example because there is a seam in the UVs or a hard edge between two polygons) this vertex is split on import.
Darn, I knew it was something obvious!
Is there a list in the mesh on doubled vertices or something like that, or do I need to sort out those myself?
The mesh doesn't know if any vertices a sitting on top of each other. If you really need to know which ones are double vertices, you would have to iterate through them and check the distance to every other one, but be aware that the easiest algorithm to do that needs n² squareroot operations...(n = number of vertices)...with an optimized algorithm you might push it as far down as n * log(n) squareroots (methinks...don't quote me on that)...
Your answer
Follow this Question
Related Questions
Normal map causes odd lighting along UV seam. 0 Answers
2 textures on one object 1 Answer
How do I show a model to represent a gameObject in the editor view? 2 Answers
Unity3D gibberish in menus 1 Answer
MonoDevelop Resizing 1 Answer