Number of vertices of a model is not the same in blender as in unity
Asked Answered
D

3

0

This has been annoying me for a while now when I imported my character from blender which had 500 verts to unity and I saw it got like 2.5k verts.

So I imported a basic cube from blender which had (8 verts) to a unity seen which before adding anything I made sure it had 0 verts in the game stats window. After I imported to unity the game stats window showed me (verts: 24), why is this?
The tris no didn’t change though.

Dustheap answered 1/3, 2024 at 20:25 Comment(0)
D
0

Short Answer
The Quads get split into Triangles. Increasing each vertex count * 3. Sometimes more especially if lighting is involved (because normal need to be calculated).

Long Answer
The reason is that you are thinking of terms of Quads (8 Sides). When exporting an FBX file the Quads need to be split into triangles, increasing the vertex count. That is why a Correctly Light Cube has 24 vertices instead of 8. 4 for each side, since normals are per-vertex.

This is just for the FBX file format however, once you export an OBJ file you will notice that it will be the correct vertices size. (Or atleast act like it since OBJ file format references the indexes instead of splitting the verticies).

So you should always use OBJ file format because it is heaps smaller!?!? No. OBJ does not support animations. So the rule of thumb: Object has has animation: FBX. Otherwise try OBJ file.

Deville answered 4/7, 2017 at 23:27 Comment(0)
P
0

Are quads anything to do with it? You have the same number of vertices with quads as you do with triangles.

I think the actual culprit is smooth edges, or rather lack of. A cube won’t have smooth edges, so it needs to store vertex data per face, as lighting normals are calculated from vertices; smoothed edges means there are 8 vertices with their normals pointing away from the centre point of the cube. Hard edges means that per corner there are 3 faces to each vertex, and they each need their own normal, so there are in fact 3 vertices. Modelling packages often ‘hide’ this by reporting those 3 vertices as 1 vertex.

Look at the first image on this wiki page: VertexNormal - polycount

A cube has 8 corners, but the first part of the image shows that in a hard-edged cube, it actually needs three vertices per corner.

You can test if this is true by setting all the edges of your cube to draw smooth. I’m not a Blender user, but this reddit thread seems to explain how: Reddit - Dive into anything

Basically, if the above is correct, there is nothing wrong with your mesh, it’s just Unity is displaying the true number of vertices which is usually hidden by modelling packages for convenience (there might be a way to display the actual value, there is in Maya)

Prefect answered 6/6, 2023 at 2:18 Comment(1)

Hey, I've been going nuts over Maya not showing me the actual vertex count. How do you get that to show?

Mardis
C
0

This is pontetially can be solved using frame debugger. Look this turorial https://youtu.be/kxy13kCo4bk

Circumscissile answered 1/3, 2024 at 20:10 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.