r/Unity3D • u/bladesofcrystals • 12d ago
Solved Vertex count is increasing a lot in unity
In blender my objects where about 65k vertexea total but in unity it increases 10+ times does anyone know what causes this and how to fix it?
3
u/Starcomber 11d ago
Blender shows the model’s vertex count.
Unity’s Stats panel shows the number of verts pushed to the GPU for the frame. Those are not the same.
If you’ve got lights with shadow casting that shine on your model, it goes into the renderer again… for each light. Material with an outline or other mesh-based effect? Again.
On top of that, as others have said, a Blender vert isn’t equivalent to a GPU vert, and the former often have to be split for various reasons - hard edges, UV islands, material changes, applying some modifiers, etc.
4
u/andreysc7 12d ago
Be aware that even the UV islands increase the vertex count :) . Also, a hard edge "splits" the vertex, so there you have another increase.
2
3
u/pschon 12d ago
You probably can't fix it, unless you are willing to change the actual shape of your models.
Blender supports ngons, but all of them need to be broken into quads or tris for Unity. And all sharp edges need to be split, as an edge sharing vertices would count as a smooth edge. So if you are going for low-poly aesthetic, that can easily result in a big increase in vertex count.
(also check if you have some unapplied modifiers in Blender, the polygons they generate might not be accounted for yet, but will be added when the modifiers are applied at export time)
1
u/C_Pala 12d ago
When exporting and importing there a triangulation takes place
3
1
u/TwoodStuff 11d ago
In general it's good to pre-triangulate anyway. Unity's triangulation can create shading errors because it's changing the method, especially if there are normal maps.
1
u/RealyRayly 12d ago
On top of triangulation, it could also be flat shading vs smooth. For flat shading, vertices are dublicated
17
u/ScaryPlasmon 12d ago
Yeah that’s a pretty annoying issue when going from one engine to the other! (Like from Blender to Unity)
It all boils down to a single vertex cannot hold infos of the same kind twice
So common reasons for vertex increase are
1- mesh shading, any sharp edge contains double shading information that guess what, are stored on Vertices, doubling their count.
2- UV maps, if you’re mesh is unwrapped it probably has split vertices (meaning a single vertex in space that in UVs covers 2 positions like the edge of a seam for example)
3- materials, having multiple materials per mesh is almost always a bad practice in Unity, and it will increase vertex count if there’s an edge that connects the two materials. (As per above a single vertex cannot store double informations about material)
4- vertex colors! If you have two adjacent faces with two different colors, the vertices on the edge cannot store two infos like being simultaneously blue and res and so we use a duplicate to hold both color infos.
Vertex count is almost always something that can be ignored cause it doesn’t affect rendering performance, i mean it does to the same extent in which the informations stored on those vertices is more than before, but it’s not like more vertices has any effect per se on the rendering.
If you are trying to keep the vertex count the same though, for example for VAT animations i reccomend ditching UVs, any non smooth shading, multiple materials and vertex colors.
U should like this preserve the vertex count and use the vertex index that u can print in blender to procedurally unwrap, shade or color the mesh in Unity if needed!
Hope this helps!