Shading Flashcards
Modelling
Mathematical specification of shape and appearance.
e.g A 3D object would have a described set of points,
some interpolation rule that connect all of these points,
A reflection model to describe how light interacts with these points
Rendering
The creation of shaded images from 3D computer models.
2 types of rendering:
1. Object-Order Rendering
2. Image-Order Rendering
Object-Order Rendering
For each object, all pixels that influence it are found and updates
Image-Order rendering
For each pixel, all objects that influence it are found and updated (Uses Ray tracing)
Animation
The creation of an illusion of motion through a sequence of images
Ray Tracing
An image-order rendering algorithm used for making renderings of 3D shapes.
How does Ray Tracing Work?
- Each Pixel has an “eye ray” that looks in the direction of the viewpoint.
- The eye ray is traced from the view point to the pixel, and any object that intercepts this eye ray is recorded and updated
- Ray tracing algorithm then determines the colour of the surface normal where the intersection occurs, as well as how light interacts with this point (including shading computations, rendering shadows, lights and refraction)
Shading Models
Used to capture the process of light reflection on a surface.
Has 3 variables:
View Direction –> unit vector pointing towards the view point (camera)
Light Direction –> unit vector pointing towards the light source
Surface Normal –> Unit vector perpendicular to the surface of the object where light reflection is occurring
What are the three shading models?
Lambertian Shading
Blinn-Phong Shading
Ambient Shading
Lambertian Shading
The amount of energy from a light source that falls on an area of a surface depends on the angle of the surface to the light.
Used for non-shiny materials (e.g. wood)
View Independent –> Surface colour doesn’t depend on the direction from which you look at it, it remains matte
Lambert’s cosine law
Illumination is proportional to the cos of the angle between the surface and the light source
Blinn-Phong Shading Model
Aims to produce a reflection that is at it’s brightest when the view direction and the light direction land symmetrically on the surface (mirror reflection).
This model is view dependent –> surface color changes as the view direction changes
Makes the surface appear shiny
How can you tell how close a model is to a mirror configuration?
Find the half vector h (bisector between view direction and light direction) and compare it to the surface normal.
You can find vector h by summing vector l and v and dividing the sum by it’s magnitude
What is the phong exponent
compnoent of the blinn-phong model that controls the shininess of the surface
Ambient shading model
Adding a constant component to the combination of the lambertian and blinn-phong models that is soley dependent on the surface colour. No dependence on the surface geometry.
Simulates ambient lighting in a scene, allowing the shading model to avoid shadows that are entirely black.