**Unformatted text preview: **Interactive Computer Graphics:
Revision Lecture
" Graphics Revision Lecture: Slide 1! Shading"
1
Shading
A scene is deﬁned as a regular array of planar quadrilaterals part of which is
shown in the ﬁgure. P0
P3 P1
P2 P0
P1
P2
P3 x
1
6
7
0 y
6
6
0
2 z
10
10
12
12 The scene is illuminated by one light source which is located at the origin. The
viewpoint is also at the origin and the view direction is along the positive z axis.
Only diffuse shading is used.
a Outline the different steps necessary to calculate the shading value for each pixel
inside the projected quadrilateral using Gouraud shading. The scene is illuminated by one light source which is located at the origin. The
viewpoint is also at the origin and the view direction is along the positive z axis.
Only diffuse shading is used. Shading"
a Outline the different steps necessary to calculate the shading value for each pixel
inside the projected quadrilateral using Gouraud shading. b Explain how your answer to part a must be modiﬁed to compute the shading
value for each pixel inside the projected quadrilateral using Phong shading
instead of Gouraud shading. c What effects can be demonstrated with Phong shading that cannot be created by
Gouraud shading? d Calculate the outer surface normal vector (i.e. the one that is directed towards
the viewpoint) for the central quadrilateral. e Assume that only ﬂat diffuse shading is being used, the constant for diffuse
reﬂection is k d = 1 and that the light source is a white light with the following
intensity: r = 255, g = 255, b = 255. Calculate the shading value at the centre of
the quadrilateral. The ﬁve parts carry, respectively, 25%, 15%, 20%, 20%, and 20% of the marks. Specular highlights can be represented accurately in Phong Shading, but not in
Gouraud shading.
Marks:
d 4 Shading" Calculate the outer surface normal vector (i.e. the one that is directed towards
the viewpoint) for the central quadrilateral.
First ﬁnd two vectors on the plane:
p1
p0 p0 = [6, 6, 10]
p3 = [1, 6, 10] [1, 6, 10] = [5, 0, 0]
[0, 2, 12] = [1, 4, 2] Find the cross product: [0, 10, 20] or [0, 1, 2] for simplicity, however this is
facing away from the viewpoint (since [0, 1, 2] · [0, 0, 1] = 2 > 0), so the answer
p
p
is [0, 1, 2] or [0, 1/ 5, 2/ 5].
Marks:
e Assume that only ﬂat diffuse shading is being used, the constant for diffuse
reﬂection is k d = 1 and that the light source is a white light with the following
intensity: r = 255, g = 255, b = 255. Calculate the shading value at the centre of
the quadrilateral.
i) Average the vertices to ﬁnd a central point [3.5, 3.5, 11.25]. 4 facing away from the viewpoint (since [0, 1, 2] · [0, 0, 1] = 2 > 0), so the answer
p
p
is [0, 1, 2] or [0, 1/ 5, 2/ 5].
Marks:
e 4 SAssume that only ﬂat diffuse shading is being used, the constant for diffuse
hading" reﬂection is k d = 1 and that the light source is a white light with the following
intensity: r = 255, g = 255, b = 255. Calculate the shading va...

View
Full Document

- Spring '14
- Computer Graphics, Phong shading, ray tracing, Daniel Rueckert