# CS488 - Introduction to Computer Graphics - Lecture 17

## Review

1. Hierarchical models

## Colour

What is needed for colour?

1. An eye.
2. A source of illumination.
3. A surface.

How is colour created?

1. Source of illumination emits light (photons of differing wavelength).
2. Surface modifies light.
• reflectance
3. Eye compares surfaces and notices different modifications.

How do we represent colour?

• As some kind of sum of photons?
• As a distribution of photons (over wavelength)?
• As a ratio of distributions of photons?

To the rescue,

• A nineteenth century mathematician
• Grassmann

and a nineteenth century physicist

• Maxwell
• All colours are subjectively the same as a linear combination of three basis colours
• Linear combination defined in a special way
• Is there anything special about three?
• Change of basis, etc., etc.
• Display-dependent standard bases: RGB.
• Display-independent standard bases: XYZ.
• Non-linear bases
• HSV
• Opponent colours

But,

• Only approximately correct
• but to within 1-2% for most humans,
• only describes matching, not appearance
• Doesn't describe non-additive colour mixture
• CMY(K) for printing inks
• More precise requires illumination as well
• CIELab, CIELuv

## Lighting Models

Must incorporate geometry in addition to colour

Goals:

• the right colour at every pixel
• fast enough
• either simple or GPU-calculable

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

#### For computer graphics

Start simple, only make it more complex `when we need to', which means `when somebody powerful complains'.

#### 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