# CS488 - Introduction to Computer Graphics - Lecture 18

1. Colour

## Lighting Models

Must incorporate geometry in addition to colour

Goals:

• the right colour at every pixel
• fast enough
• either simple or GPU-calculable, which generally means simple

Actual illumination

• area light sources with direction dependent photon distributions

Actual surfaces

• complex geometry
• surface reflection
• body reflection
• complex physics
• You don't want to know all the details
• specified by bi-directional reflectance distribution function (BRDF).

#### For computer graphics

Start simple, only make it more complex when we need to', which means

• (in industry)when somebody powerful complains',
• (in research) `when you see an opportunity to impress somebody powerful'.

## Lambertian Surfaces

Model of body reflection

• good model of most artificial surfaces
• paint
• plastic
• cloth (most types)

and many natural surfaces

• hunman skin (sort of)
• plants (most parts)
• animals (most parts)
• etc.
• light direction completely randomized
• outgoing direction independent of incoming direction
• completely specified by reflectance function, R(\lambda)

#### How much light hits the surface?

1. Idealize light sources as points emitting light
1. How much light does a source emit?
2. How much light is there at a distance r from the source?
• Segregate the light by direction
• How much light per unit angle?
3. How much light per square metre?
• Falls off with distance.
• How? Think how big the surface of a sphere is.
4. How much of the surface does a square metre of the sphere cover?
• Depends on the angle
• How?
2. What if the lights were (infinite) lines?
• Why is an infinite line the same as a circle?
3. What if the lights were (infinite) planes?
• Why is an infinte surface the same as a sphere?
• In computer graphics this is called ambient light.
4. What do we do in practice?

Comment. Two general aspects of the above are very important to getting things right in computer graphics

1. The scaling arguments from dimensionality
2. The geometric derivations of angular facts from small areas

#### How much light leaves the surface?

We are only interested in the light leaving the surface in a particular direction. Why?

What makes a Lambertian surface Lambertian?

• Half-sphere within the body, centred at the bit of surface
• Half-sphere above the body, bottom at the surface
• Draw a little piece of pie centred at the surface
• Whatever goes in the bottom comes out the top
• modified by the angular size of the hole
• cosine factor

What goes into the eye

• Same geometry as illumination, only backward
• cosine factor
• Cosine factors cancel one another

## Highlights

Part of the light didn't enter the body of the surface, but was reflected