Lighting in Computer Graphics
Lighting in computer graphics refers to scene illumination. It deals with light sources and their effects on the represented model and scene appearance.
Lighting and closely connected to reflections because both are responsible to the way a viewer perceives objects.
4 types of light sources: ambient, distant, point, spot lights.
Ambient Light
A light does not exist in nature, but it is needed in computer graphics to cope with approximations of light reflections, etc.
A light has no origin and no direction and it is equally present everywhere in the environment. It’s strength can be turned through the Ka element.
Distant Light
Light coming from a distant undefined position that has a specific direction. E.g. Sun light
One direction
Point Light
A light that comes from a specific position (origin) and it is radiated from there towords all directions. Its strength diminishes from the light origin.
position is stable.
all direction
(Fall-off / Decay)
Spot Light
It is radiated within a specific cone. Its strength diminishes with the distance from the light origin (decay) but also with the distance from the central axis of the light (drop off).
position is stable.
subset of directions
(Fall-off / Decay & Drop-off)
Drop-off & Decay
The Decay (fall off) represents the light that fades with the distance from the light source.
The Drop Off represents the light that decreases from the center of the light cone to the edges to the light cone.
Reflection
Reflection in computer graphics refers to the light intensity bounced back after hitting a surface.
It is important because is among the main components responsible for the way a viewer perceives objects.
Reflection is closely connected to lighting.
3 types of reflections: ambient, diffuse, specular.
The Ambient Reflection
due to ambient light sources
The Diffuse Reflection
due to the diffuseness of a surface which is illuminated by a distant light.
The viewing direction has no effect on the brightness of the surface.
The Specular Reflection
due to the specularity of a surface which is illuminated by a distant light.
The specular reflection depends on:
- the orientation of the surface
- the direction of the distant light
- the direction from which the surface is being viewed
Differences between Diffuse Reflection & Specular Reflection
the amount of light reflected by a surface
how this varies based on viewer’s position
Main elements in estimating Reflection
The main elements that play a role are:
- the light source (position, direction and spread)
- the surface normal
- mirror direction
- the viewer position
Phong Reflection Model
The Phong reflection model sums up Ambient, diffuse, specular reflections