Lecture 7 (Surface Rendering and Shading) Flashcards
What are the shading techniques? Elaborate on each.
Flat shading -> One colour per polygon (no interpolation)
Smooth shading (Gouraud and Phong) -> Gradient in polygons
What are the Smooth Shading techniques? Elaborate on each.
Gouraud and Phong.
- Gouraud = Vertex shading
- Phong = Pixel by pixel shading, slower but better for highlights
WTF is ‘Texture mapping’?
Maps a planar image (typically 2D) onto a 3D object.
- This adds visual detail
WTF is ‘Bump mapping’?
Generate rough surfaces, without increasing the number of polygons.
*** The surface does not change, but shading makes it look like it did
- Can be used to add realism to textures
WTF is ‘Displacement mapping’?
Actually, changes the shape of object, unlike Bump Mapping which only changes the shading of the object
- Displaces each point on the surface
What is the difference between Gouraud and Phong?
Gouraud will miss out on highlights in the middle of the polygon / vertex - as it only applies the lighting model at the vertices.
Gouraud applies an illumination model to each vertex to calculate the vertex intensity first; then interpolates the vertex intensities over the surface polygon.
Phong does the opposite.
What is the Shading Model?
Determines how to render the FACES OF POLYGONS in the scene, given the illumination
What is the Illumination Model?
Determines HOW LIGHT SOURCES INTERACT with object surfaces
- i.e. intensity of the light that is reflected at any given point on a surface
What are the difference Light Source Models?
Point source : All light rays originate at a point and radically diverge
Parallel source : Light rays are all parallel. It may be modelled as a point source at infinite distance (the sun)
Distributed source : All light rays originate at a finite area in space. It models a nearby source (lightbulb)
What is Flat Shading and why use it?
Entire polygon is the same colour
- It is much faster and simpler to compute compared to smooth shading
- Realistic in certain cases:
- Polygon is small enough
- Eye is very far away (Mach Band Effect is not noticeable)
What is Smooth Shading?
Colour changes within the polygon - lighting is computed at MULTIPLE points on each polygon (no Mach Band Effect)
What is Gouraud Shading?
VERTEX SHADING
- Lighting calculated for each polygon vertex
- Colours are interpolated for the interior pixels
- Linear change from one vertex colour to another
What are the drawbacks of Gouraud Shading?
Doesn’t work well with polygon surfaces with high curvature
Assumes linear change across the polygon
- This is a problem because one part may have specular lighting
Describe the Gouraud Shading Algorithm.
1) Determine the normal at each polygon vertex = this is the average of the normals of adjacent faces
2) Apply an illumination model to each vertex to calculate the vertex intensity
3) Linearly interpolate the vertex intensities over the surface polygon
What is Phone Shading?
PIXEL BY PIXEL SHADING
Similar to Gouraud, except interpolates the surface normals. and do full shading calculation at EVERY PIXEL using these interpolated normals
*** Much slower than Gouraud shading, but does a much better job of handling highlights