Hey, all,
Something a little odd is happening in Unity when I’m importing models. I have a model which reports 149 verts in 3DS Max, exported as FBX.
When the same object is imported into Unity and I examine the mesh element of the object, Unity reports 374 verts, which is over twice as many.
I’m confused as to why. The mesh element of the model isn’t concerned with what material you put on the object, it should just be concerned with the verts.
All I can think of to (possibly) explain it is that the data represented isn’t actually verts, it’s elements of verts meaning this value can be affected by stuff like UV’s and Smoothing Groups. Is that correct? If so, shouldn’t it be renamed as such?
Cheers,
SB.
Was the model triangulated before exporting?
Triangulated? Not sure I follow? If you mean converted into independent triangles, no, it wasn’t - it’s a singular mesh.
There’s your answer as to the extra verts. A video card only renders triangles, not quads or ngons. If you don’t triangulate the mesh yourself before exporting, Unity will do it for you upon import.
There are actually a few reasons why a model in Unity will usually have more vertices than are reported by the 3D modelling app but they all boil down to the same thing. The structure of the model in Unity reflects the data that will eventually be sent to the graphics hardware for display. The hardware only supports a single normal and UV coordinate for each vertex, but sometimes the two surfaces that meet at an edge need different normals (eg, to make a crisp edge rather than a curve) or different UVs (eg, to make a cylinder where the texture is continuous without something strange happening at a “seam”). In these cases, the only option is to have multiple vertices at the same position, each with its own normal and UV coordinate. The conceptual model and file format provided by a 3D app don’t need to reveal this level of detail to the user and the internal data structures don’t need to behave the same way as the hardware. So, for example, normals and UVs can be stored per triangle/quad rather than per vertex.
There is nothing incorrect about the way Unity reports the vertex count or the way the 3D app does it. It’s just that they are used for different purposes and so deal with the data in different ways.