related topics {math, energy, light} {@card@, make, design} {system, computer, user} {math, number, function}

Gouraud shading, named after Henri Gouraud, is a method used in computer graphics to simulate the differing effects of light and colour across the surface of an object. In practice, Gouraud shading is used to achieve smooth lighting on low-polygon surfaces without the heavy computational requirements of calculating lighting for each pixel. Gouraud first published the technique in 1971 in IEEE Transactions on Computers.

### Principles behind the method

The basic principle behind the method is as follows: An estimate to the surface normal of each vertex in a 3D model is found by averaging the surface normals of polygons which meet at each vertex. Using these estimates, lighting computations based on the Phong reflection model are then performed to produce colour intensities at the vertices. Screen pixel intensities can then be bilinearly interpolated from the colour values calculated at the vertices. In a simpler sense, a gradient is formed in the area where the vertices meet.

Gouraud shading's strength and weakness lies in its interpolation. Interpolating colour values from three samples of expensive lighting calculations is much less processor intensive than performing that lighting calculation for each pixel, as is done in Phong shading. However, highly localized lighting effects (such as specular highlights, e.g. the glint of reflected light on the surface of an apple) will not be rendered correctly, and if a highlight lies in the middle of a polygon, but does not spread to the polygon's vertex, it will not be apparent in a Gouraud rendering; conversely, if a highlight occurs at the vertex of a polygon, it will be rendered correctly at this vertex (as this is where the lighting model is applied), but will be spread unnaturally across all neighboring polygons via the interpolation method. The problem is easily spotted in a rendering which ought to have a specular highlight moving smoothly across the surface of a model as it rotates. Gouraud shading will instead produce a highlight continuously fading in and out across neighboring portions of the model, peaking in intensity when the intended specular highlight passes over a vertex of the model. (This can be improved by increasing the density of vertices in the object, or alternatively an adaptive tessellation scheme might be used to increase the density only near the highlight.)

Despite the drawbacks, Gouraud shading is considered superior to flat shading, which requires significantly less processing than Gouraud, but gives low-polygon models a sharp, faceted look.

Gouraud-shaded sphere - note the poor behaviour of the specular highlight.

The same sphere rendered with a very high polygon count.