12.2. Progressive Realism Demonstration - the Cow   

Many techniques have been developed to produce increasingly realistic, and therefore complex, images. Wireframe modelling is the simplest and fastest method of displaying 3D objects on a 2D surface. The 3D co-ordinates for the line segments making up the object are converted to 2D using an appropriate projection (eg perspective). The line segments are then drawn on the 2D surface. All edges of the object can be seen simultaneously, giving the impression of a wire frame rather than a solid object.


 
Wireframe cow.
Fig. 12.1 : Wireframe cow.
To alleviate this problem, hidden line and surface algorithms were developed, so that lines and surfaces which would not normally be visible were not drawn. Objects were modelled using polygonal surfaces which can be derived from the wireframe image. The surface normals, or the direction which the plane is facing, were used to calculate the colour of the surface as affected by the light source. This technique is known as flat shading. In the following image of the cow it can be seen that the facets have been realistically shaded however the large size of the polygonal facets means that shading irregularities are easily seen (ie the facets are clearly defined because of colour differences).

The cow flat shaded:


 
Flat Shaded cow.
Fig. 12.2 : Flat Shaded cow.
To reduce the problem of easily discernable facets one of two techniques can be adopted. The polygonal facets can be subdivided so that the object consists of many more facets which are smaller in size. This would mean that changes in colour would appear more gradual across the surface of an object, since there would be many small changes in colour rather than fewer , more dramatic changes as before.

To effectively implement this technique with a reasonably curved object surface requires a large number of subdivisions and therefore a large increase in storage requirements, as each polygon must have it's vertices stored as well as other information. An alternative technique is to vary the colour across a single facet using interpolation. There are two methods in achieving this: Phong shading and Gouraud shading. Gouraud shading involves linearly interpolating the colours in neighbouring facets so that the facets are the same colour at the border points, but progressively more different towards the centre of each facet. Phong shading is very similar except the surface normals are interpolated so that the rate of change of the colour is also the same at the border points

The cow with Gouraud Shading:  

shadedcow.ps

You will notice that the individual facets are no longer distinguishable, however the outline of the object can still be seen to be made up of linear segments.

The cow with some textures thrown in:  

colourcow.ps