2
$\begingroup$

I was playing around with Blender meshes and importing them into Unity when I made an interesting discovery. In the tool shelf, under "Shading", there is a Smooth button and a Flat button. Now I already knew about these buttons. What I didn't know is that when I apply Smooth to an object and import the object into Unity, the object has less vertices than it would have had if it was set to Flat (which is the default).

I was always under the impression that applying smoothness to an object would increase the number of vertices. But it seems to be doing the opposite. This is great because I can now replace many of the objects in my game with their smoother counterparts from Blender, which should significantly reduce the number of vertices in my scene and that would be good for optimizing.

$\endgroup$
2
  • $\begingroup$ Actually shading type doesn't do anything to mesh apart from manipulating normals. Maybe it is an export settings, like apply modifiers could reduce geometry. Better share a test file to investigate this issue. $\endgroup$
    – Serge L
    Sep 11, 2019 at 6:27
  • 3
    $\begingroup$ Could be that the exporter uses edge split to create hard edges / flat shading which would double the vertex count. $\endgroup$
    – Robert Gützkow
    Sep 11, 2019 at 7:14

1 Answer 1

3
$\begingroup$

The shading options (Smooth and Flat) refer to how the vertex normals are calculated, which then essentially tells the renderer how to bounce light off edges.

For smooth shading, the vertex normals are calculated by averaging each face normal that they belong to. The face normal is simply the direction perpendicular to face, on the outward side.

For flat shading, each vertex can be considered to have multiple normals, one for each face it is part of, in the direction of the face. Many programs represent this by splitting each vertex into multiple vertices, one for each adjacent face. This is most likely what you are seeing in Unity, as that is most likely what the renderer in Unity is doing.

There is another kind of 'smoothing' called subdivision, which as its name suggests, splits faces into smaller faces. This obviously adds vertices, and is probably where you got the idea that smoothing adds vertices.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .