Why is the vertex count of this mesh so much higher in Godot than in Blender?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kim Holder

As the images show, there is an object in Blender, with no modifiers on it except an EdgeSplit, that has 684 vertices. When it is exported to Godot, the same object, as near as I can tell from isolating it and looking at the info box on the viewer, has 9794 vertices. Is that normal behaviour or is something wrong?

mesh in Godot and vertex count

Mesh in Blender and vertex count

:bust_in_silhouette: Reply From: MysteryGM

Probably because you are usign flat shading instead of smooth shading. Normals at 90 degrees are split in engine.

Edges marked with the UV map seam is split in engine, UV maps is only a tool that exists in 3D software that doesn’t break loops, in engine the mesh is split at that seam.

A second UV map as used for shadow baking also splits the mesh where it’s edges is.
Smooth groups, Sharp edges and Custom normals will split edges; causing more vertices.

This isn’t some kind of bug or even a Godot thing, it is how graphics cards work.
As far as the engine is concerned UV maps, Smooth groups and Sharp Edges are all just splits in the mesh and it has to make 2 vertices at those points.

Are they only split at 90 degrees? There are a lot of slight angles of a few degrees, but only a few of 90 degrees. It also doesn’t have any UV maps. That stuff is good to know but shouldn’t apply here.

Kim Holder | 2018-11-15 23:38

Our team artist tried explaining it but it is way too complex, so he made this image:
enter image description here
He says in Blender edit mode, turn Auto smooth on. In The mesh display turn up the size of the normals.
The Blue shows the vertex normal, while the pink one shows per-face normals and apparently the last one is how graphics cards use it.

A vertex can only have one normal, so where you see the two looking in opposite directions, is actually 2 vertices. It is the same as if you are using 2 faces.
The smooth one needs less vertices.

I don’t get it, but that is why we pay him $30 000, because he gets it and knows a whole lot more.

MysteryGM | 2018-11-16 12:06

:bust_in_silhouette: Reply From: jitspoe

It seems every vertex is counted for every triangle rendered, even if the verts are shared. I made a simple cube and it said there were 36 vertices rendered. Didn’t matter if I exported with normals or not. Seems sharing vertexes will only cut down on the memory used.

In short: vertices rendered = triangles rendered * 3.