- Home /
Vertex Count versus Face Count
When concerned about performance, if I were to choose between a low face count and a low vertex count, what should I choose? I have a set of meshes and I don't know if it is better to apply huge amounts of edge-splitting, nearly dubling all vertices, or instead keeping the mesh smooth-shaded and adding edge-loops near the angles to get the look i want out of smooth-shading (and thus getting way nicer visuals but increasing face count by almost 3 times). So, what do you guys suggest?
Sorry for bad english.
Have you checked to see if this is a performance bottleneck yet?
Answer by getyour411 · Sep 15, 2013 at 07:46 PM
There is really no difference. If you are are doing an edge-cut/loop, you are creating vertices and thus faces. If you add faces, you add more vertices. The answer is keep them both low, how low is driven by your requirements, target platform, # of rendered meshes, etc.
Correct. In addendum: The notion of a "face" does not exist for a graphics card. It doesn't process faces; there is no "face shader". Only vertices and, later on in the pipeline, fragments. Even the geometry shader which in some sense can be said to operate on "faces", if it is declared to receive triangle strips as input, ultimately processes and emits vertices.
Ok thanks. But still if I have these two versions of the same mesh, the first (reading from blender) with 6556 vertices and 12894 tris, the second with 8126 vertices and 4652 tris, what should I prefear? Does the fact that the graphics card ultimately processes only vertices, mean that I should prefear to save 2000 vertices even when they come at a price of 8000 new triangles?
@CHPedersen: Well, that's not entirely correct. It is true that the vertexshader just processes vertices and transforms them into screenspace. The fragment/pixel shader just processes the final fragments, but in between there are faces (or triangles to be more precise). Each triangle primitive is made up of 3 transformed vertices. The information each vertex holds is interpolated across the surface of the triangle and produces "fragments" which are sent through the fragment shader.
Fact is the more vertices you have the more load you get on the vertex shader. The more "surface" of your triangles are on the screen the more load you get on the fragment shader. How much GPU load you get depends on the model design and on what shaders you use.
@Bartalo Without knowing more about your goals, I would have said use the 12k tris model. Now I'm reading Bunny's response and questioning myself.
Agreed, go for the lower vertex count. Bunny's correction to my comment is totally true in the sense that the graphics card does operate on the faces during the rasterization of the triangles (where the geometry becomes actual pixels). There is interpolation of things like colors and texture coordinates going on there which does increase by face count, but it's unreliable at best to optimize this stage because it depends on the physical size of each triangle on-screen. I.e. it will vary based on how many actual pixels a triangle will take up during rendering a frame and thus is not view-independent. The only constant value in this regard is the number of vertices that were pushed through the pipeline beforehand. This is much easier to optimize for the user, especially because the vertex stage is programmable (vertex shader) and the rasterization stage is not. So optimize your mesh for vertex count. :)
Your answer
Follow this Question
Related Questions
Does Vertices count affect FPS when making buildings? 1 Answer
Is there a way to use SkinnedMeshRenderer.BakeMesh() in multiple threads? (Mesh Instancing) 0 Answers
How can I ADD vertices and faces to a mesh? 1 Answer
How to count bones? 1 Answer
Will mesh collider have the same tringles/veticies of the base mesh? 0 Answers