<p>GL_SMOOTH interpolates the vertex attributes of the primitive (triangle), it looks like your normals are setup per face, rather than per vertex. </p>

<p>If using normal per face (i.e. a single normal for the triangle), increasing the number of triangles will produce a less faceted look as there is more granularity when interpolating the normals over the surface of a given surface area given the increase in the number of triangles within that area. It is recommended to use normals per vertex for smooth surfaces when feature edges are not important (i.e. Not for cubes!).</p>

<p>If using normal per vertex (i.e. a normal for each vertex, resulting in each triangle having 3 vertices), each 3 vertices of a face will be slightly different if the neighbouring triangles are not coplanar to the triangle in question (i.e. not a flat surface). This will aid in the smoothness of the shading.</p>

<p>Normals per vertex can be easily calculated by averaging the three normals of the three vertices defining a triangle, however your surface needs to be defined with shared vertices for this. The exception to this is if you have a sphere or ellipsoid, in which case you can calculate a more precise normal easily by unitising <em>vertex - sphereOrigin</em> rather than averaging the three normals of the face.</p>

<p>On a side note: Are you using two lights in the scene of the screen shot you posted or one? If two it looks like the normals are currently not correct as the shading does not appear correct since there is a well-lit area of the surface on the bottom left region. With a single light, either the front (top right) of the sphere would be lit, or the bottom left, but not both.</p>

<p>Also note that simply increasing the power of the light simply over exposes the surface colour rather than improving the smoothing. You lose the surface definition.</p>

CC BY-SA 4.0
2020-03-31T22:23:34.110Z
2020-03-31T22:23:34.110Z
lfgtm
<p><code>glShadeModel(GL_SMOOTH);</code> - probably in PezInitialize - should do what you need.</p>

CC BY-SA 4.0
2020-03-28T16:18:57.267Z
I'm fairly certain that is the default mode, so will not change anything in my picture. Also, I'm more interested in, for instance, what something like that does (which is just interpolate colors between vertices), rather than just a formula to fix the problem.
jheindel
CC BY-SA 4.0
2020-03-28T06:58:57.670Z
2020-03-28T06:58:57.670Z
Tau
<p>What are some common techniques for making the edges on a tesselated shape less apparent without increasing the amount of tesselation which is actually carried out?</p>

<p>As an example, I followed along with this tutorial on <a href="https://prideout.net/blog/old/blog/index.html@p=48.html" rel="nofollow noreferrer">tesselation shaders</a>, and one can control the inner and outer tesselation levels. With relatively low levels of both, one can achieve a pretty good sphere. However, in order for the surface to actually appear smooth, a fairly bright light seems to be required.</p>

<p>This particular implementation uses triangular tesselation beginning from an icosahedron to approach a sphere.</p>

<p>My understanding is that performing the tesselation with quads would result in a smoother surface.</p>

<p>Here is a picture which illustrates how direct lighting makes it much harder to see the level of tesselation. On the top right of the sphere, where the light is hitting it strongly, no edges are visible, wheres on the bottom left, the edges can easily be seen. Perhaps in practice, simply applying a texture would mask many of the edges?</p>

<p><a href="https://i.sstatic.net/c1XR6.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/c1XR6.png" alt="tesselation and lighting"></a></p>

<opengl><lighting><tesselation>
Techniques for making tesselated shapes appear smoother?
jheindel
# Techniques for making tesselated shapes appear smoother?

(Asked by: username_0 on 2020-03-28)

What are some common techniques for making the edges on a tesselated shape less apparent without increasing the amount of tesselation which is actually carried out?

As an example, I followed along with this tutorial on [tesselation shaders](https://prideout.net/blog/old/blog/index.html@p=48.html), and one can control the inner and outer tesselation levels. With relatively low levels of both, one can achieve a pretty good sphere. However, in order for the surface to actually appear smooth, a fairly bright light seems to be required.

This particular implementation uses triangular tesselation beginning from an icosahedron to approach a sphere.

My understanding is that performing the tesselation with quads would result in a smoother surface.

Here is a picture which illustrates how direct lighting makes it much harder to see the level of tesselation. On the top right of the sphere, where the light is hitting it strongly, no edges are visible, wheres on the bottom left, the edges can easily be seen. Perhaps in practice, simply applying a texture would mask many of the edges?

[![tesselation and lighting](https://i.sstatic.net/c1XR6.png)](https://i.sstatic.net/c1XR6.png)

**Tags:** opengl, lighting, tesselation


---

## 2 answers

### Answer by username_1 on 2020-03-31. Score: 3 | Accepted answer

GL\_SMOOTH interpolates the vertex attributes of the primitive (triangle), it looks like your normals are setup per face, rather than per vertex.

If using normal per face (i.e. a single normal for the triangle), increasing the number of triangles will produce a less faceted look as there is more granularity when interpolating the normals over the surface of a given surface area given the increase in the number of triangles within that area. It is recommended to use normals per vertex for smooth surfaces when feature edges are not important (i.e. Not for cubes!).

If using normal per vertex (i.e. a normal for each vertex, resulting in each triangle having 3 vertices), each 3 vertices of a face will be slightly different if the neighbouring triangles are not coplanar to the triangle in question (i.e. not a flat surface). This will aid in the smoothness of the shading.

Normals per vertex can be easily calculated by averaging the three normals of the three vertices defining a triangle, however your surface needs to be defined with shared vertices for this. The exception to this is if you have a sphere or ellipsoid, in which case you can calculate a more precise normal easily by unitising *vertex - sphereOrigin* rather than averaging the three normals of the face.

On a side note: Are you using two lights in the scene of the screen shot you posted or one? If two it looks like the normals are currently not correct as the shading does not appear correct since there is a well-lit area of the surface on the bottom left region. With a single light, either the front (top right) of the sphere would be lit, or the bottom left, but not both.

Also note that simply increasing the power of the light simply over exposes the surface colour rather than improving the smoothing. You lose the surface definition.


---

### Answer by username_2 on 2020-03-28. Score: -1

`glShadeModel(GL_SMOOTH);` - probably in PezInitialize - should do what you need.

> **Comments:**
> **username_0**: I'm fairly certain that is the default mode, so will not change anything in my picture. Also, I'm more interested in, for instance, what something like that does (which is just interpolate colors between vertices), rather than just a formula to fix the problem.  

---

