3D Theory - Rendering

Types of shading

The brightness of any point on the screen depends on a lot of factors. It will depend on the colour and reflectivity of the point being looked at. It will depend on the colour, brightness and distance from any light sources. It will also depend on the angle between the surface, the eye/camera and the various sources of light. There will be may other factors such as reflections from other objects.

The method of generating the 2D view from the 3D model will be a compromise between the size of the model needed, computational time taken to render it and the realism of the image. Possible methods include:

Flat shading

The object is represented as flat surfaces. Each of these surfaces is represented by a single normal (a normal is a vector perpendicular on the surface). The colour of the whole surface is then calculated from the angle between the light source, the normal and the eye. The object will look as if it is made up of flat surfaces unless each surface is made very small.

Phong shading

In this case, instead of having a normal for each face, you have a normal for every single point on the object. This produces a much more realistic image, but has the overhead of generating and storing all these normals.

Gouraud shading

In this case you generate normals for each vertex, then the normal for any point on the face can be calculated by interpolating between the normals at its vertices. This is a good compromise between a small model size and a realistic image with continuously changing tones for curved objects.

metadata block
see also:


Correspondence about this page

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.