More on Raytracing - PowerPoint PPT Presentation

1 / 44
About This Presentation
Title:

More on Raytracing

Description:

Easter break next week. I will be away from Friday 7th to ... Ray Casting recapitulation. pixels in screen do. Shoot ray p from the eye. through the pixel. ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 45
Provided by: MOL133
Category:

less

Transcript and Presenter's Notes

Title: More on Raytracing


1
More on Raytracing
2
Holidays Lectures, Labs, etc
  • Easter break next week.
  • I will be away from Friday 7th to Sunday 23rd
    April (inclusive).
  • No lectures or tutorial during the first week
    after the break.
  • There WILL be a lab during that week.

3
Laboratory exercises
  • This week parametric equations and
    intersections. Read up lectures and attend
    tutorial today.
  • Next (logical) week Colour and Lighting. Read
    relevant chapters.

4
Ray Casting recapitulation
? pixels in screen do Shoot ray p from the
eye through the pixel. Find closest
ray-object intersection. Get colour at
intersection?
5
Ray Casting recapitulation
? pixels in screen do Shoot ray p from the
eye through the pixel. Find closest
ray-object intersection. Get colour at
intersection?
6
Ray Casting recapitulation
? pixels in screen do Shoot ray p from the
eye through the pixel. Find closest
ray-object intersection. Get colour at
intersection ? Illumination model
7
Types of rays
  • Primary rays light directly to a pixel.
  • Shadow rays aka light-seeking rays.
  • Reflection rays bring light reflected from
    another surface.
  • Transmission rays bring light through an object.

8
Ambient light
  • Ambient light comes from all directions and is
    reflected in all directions.
  • The intensity and colour depend only the
    properties of the surface colour and
    reflectivity.

9
Ambient light
  • I Iaka
  • where
  • Ia is the intensity of the ambient light,
  • and
  • ka is the ambient constant of the surface (0-1).

10
Perfect reflection
N
L
The angle between the incoming ray and the
surface normal is maintained for the outgoing ray.
11
Diffuse reflection
  • An ideal diffuse (Lambertian) reflector (e.g.
    chalk) is the simplest to model.
  • Incoming light is scattered equally in all
    directions, so brightness does not depend on the
    viewing direction.

12
Diffuse reflection
  • Reflected brightness depends on the direction and
    brightness of illumination (cos of light/normal
    angle).

13
Diffuse reflection
14
Diffuse reflection
15
Lambertian illumination
  • Use Lamberts law, which says the intensity of
    the reflected energy (light) depends upon the
    angle between the incoming light and the surface
    normal.
  • The intensity is view independent!

16
Lambertian illumination
  • I ILkd N.L
  • where
  • IL is the intensity of the light source,
  • and
  • kd is the diffuse constant of the surface (0-1).

17
Illumination equation
  • The colour of a pixel is determined by a
    combination of ambient (background) illumination
    and Lambertian reflection.
  • Thus I Iaka ILkd N.L

18
Specular reflection
  • Shiny surfaces reflect light coherently in a
    narrow beam around the true reflected ray.
  • If your eye is in that cone, the surface looks
    brighter (a highlight).

19
Specular reflection
  • Specular reflection isnt perfect so the
    highlight is a blob with bright-ness reducing
    gradually away from the center.

20
Specular reflection
N
L
The width of the reflective cone depends upon the
smoothness of the surface.
21
Specular reflection
  • We can model this behavior using the Phong
    illumination model
  • I kP cosn?
  • where ? is the angle between the ray and the
    direction of true reflection to the eye.

22
Specular reflection
N
L
R
?
V
23
Diffuse and specular reflection
N
L
R
V
I Ilkd(cos? kP cosn?) I Ilkd(L.N) kP
(R.V)n)
24
Full illumination model
I Iaka ?j ILj(kd(L.N) kP(R.V )n)
25
(No Transcript)
26
(No Transcript)
27
(No Transcript)
28
(No Transcript)
29
(No Transcript)
30
(No Transcript)
31
(No Transcript)
32
(No Transcript)
33
(No Transcript)
34
(No Transcript)
35
(No Transcript)
36
(No Transcript)
37
(No Transcript)
38
(No Transcript)
39
(No Transcript)
40
(No Transcript)
41
(No Transcript)
42
(No Transcript)
43
Phong Model Demos
  • http//www.cs.auckland.ac.nz/richard/research-topi
    cs/PhongApplet/PhongDemoApplet.html
  • http//www.eml.hiroshima-u.ac.jp/member/jrs/
    nis/javaexampl/phong/phong.html
  • http//www.siggraph.org/education/materials/
    HyperGraph/illumin/javaprog/shadesame.html
  • http//www.eye.ch/mduerig/phong/Phong.html

44
Next Lecture
Refraction and Shadows
Write a Comment
User Comments (0)
About PowerShow.com