Week 6 -Wednesday What did we talk about last time? Light Material - - PowerPoint PPT Presentation

week 6 wednesday what did we talk about last time light
SMART_READER_LITE
LIVE PREVIEW

Week 6 -Wednesday What did we talk about last time? Light Material - - PowerPoint PPT Presentation

Week 6 -Wednesday What did we talk about last time? Light Material Sensors In general, sensors are made up of many tiny sensors Rods and cones in the eye Photodiodes attached to a CCD in a digital camera Dye


slide-1
SLIDE 1

Week 6 -Wednesday

slide-2
SLIDE 2

 What did we talk about last time?  Light  Material  Sensors

slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6
slide-7
SLIDE 7

 In general, sensors are made up of

many tiny sensors

  • Rods and cones in the eye
  • Photodiodes attached to a CCD in a

digital camera

  • Dye particles in traditional film

 Typically, an aperture restricts the

directions from which the light can come

 Then, a lens focuses the light onto

the sensor elements

slide-8
SLIDE 8

 Irradiance sensors can't produce an image because they

average over all directions

 Lens + aperture = directionally specific  Consequently, the sensors measure radiance (L), the density

  • f light per flow area AND incoming direction
slide-9
SLIDE 9

 In a rendering system, radiance is

computed rather than measured

 A radiance sample for each imaginary

sensor element is made along a ray that goes through the point representing the sensor and point p, the center of projection for the perspective transform

 The sample is computed by using a

shading equation along the view ray v

slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12

 After all this hoopla is done, we need a mathematical

equation to say what the color (radiance) at a particular pixel is

 There are many equations to use and people still do research

  • n how to make them better

 Remember, these are all rule of thumb approximations and

are only distantly related to physical law

slide-13
SLIDE 13

 Diffuse exitance Mdiff = cdiff ⊗ EL cos θ  Lambertian (diffuse) shading assumes that outgoing radiance

is (linearly) proportional to irradiance

 Because diffuse radiance is assumed to be the same in all

directions, we divide by π (explained later)

 Final Lambertian radiance Ldiff =

θ cos

diff L

E π ⊗ c

slide-14
SLIDE 14

 Specular shading is dependent on the angles between the

surface normal to the light vector and to the view vector

 For the calculation, we compute h, the half vector half

between v and l

v l v l h + + =

slide-15
SLIDE 15

 The total specular exitance is almost exactly the same as the total

diffuse exitance:

  • Mspec = cspec ⊗ EL cos θ

 What is seen by the viewer is a fraction of Mspec dependent on the

half vector h

 Final specular radiance

  • Lspec =

 Where does m come from?  It's the smoothness parameter

θ cos cos 8 8

spec L h m

E φ π m ⊗ + c

slide-16
SLIDE 16

 Final lighting is:  We want to implement this in shaders  The book goes into detail about how often it is computed

  • Note that many terms can be precomputed, only the ones with

angles in them change

=

      ⊗       + + =

n i L h m

E m L

i

1 i spec diff

θ cos cos 8 8 ) ( c c v φ π π

slide-17
SLIDE 17

 Computing the shading equation more often gives better visual results but

takes more time

 Flat shading

  • Computes shading equation once per primitive

 Gouraud shading

  • Computes shading equation once per vertex, linearly interpolates color for pixel values

 Phong shading

  • Computes color per pixel
slide-18
SLIDE 18
slide-19
SLIDE 19

 When sampling any continuous thing (image, sound, wave)

into a discrete environment (like the computer), multiple samples can end up being indistinguishable from each other

 This is called aliasing  We can reduce aliasing by carefully considering how sampling

and reconstruction of the signal is done

slide-20
SLIDE 20

 Ever seen wheels of a car spinning the wrong way?  Without enough samples, it may be impossible to tell which way it's

spinning

 You need a sampling frequency twice as high as the maximum frequency

  • f the events to reconstruct the original signal

 Called the Nyquist limit

slide-21
SLIDE 21
slide-22
SLIDE 22
slide-23
SLIDE 23

 Review for Exam 1  Review all material covered so far  Exam 1 is next Monday in class

slide-24
SLIDE 24

 Finish Assignment 2, due this Friday  Keep working on Project 2, due Friday, November 1  Review Chapters 1 – 4 and Appendices A and B