Graphics Reference
In-Depth Information
just look like C programs with regard to memory access ...buttheystill have the
useful API for texture fetches that implement mappings and filtering.
Texture synthesis is also a rich and active area of research, from ab initio meth-
ods like Cook and DeRose's work on wavelet noise [CD05b], which generalizes
Perlin noise, to work on detail hallucination, in which highly zoomed textures
that would otherwise be blurry are enhanced with further detail that matches the
neighboring texel values [SZT10, WWZ + 07].
20.11 Exercises
Figure
20.24:
The
striplike
Exercise 20.1: In varying parameters to the Phong model, we've used tex-
ture mapping to adjust the incoming light, the outgoing light, and the diffuse and
glossy constants. But we haven't used it to modify the dot product. If we replace
v
structure
of
a
synthesized
image.
Coherent
pixel
regions
are
outlined
in
white.
(Cour-
w = v T w with v T Mw , where M is some symmetric matrix with positive eigen-
values, then the results computed by the Phong model will change depending on
the orientation of the eigenvectors and the magnitudes of the eigenvalues. Apply
this idea to the unit sphere. Writing M = VDV T where V contains the eigenvec-
tors as columns, and D is a diagonal matrix with the eigenvalues on the diagonal,
·
tesy
of
Michael
Ashikhmin,
©
2001
ACM,
Inc.
Reprinted
by
permission.)
experiment with what happens when V = t 1 t 2 n , where t 1 and t 2 are unit
vectors tangent to the latitude and longitude lines, n is the surface normal, and
D = Diag ( s , t ,1 ) , where 0
1. You should be able to achieve the general
appearance of brushed metal if you use this altered inner product in the glossy part
of the Phong model.
Exercise 20.2: On the unit disk D in the plane, consider the vector field
n ( x , z )= S (
<
s , t
z 1 x T ) . Show that there's no function y = f ( x , z ) on D
with the property that the normal vector to the graph of f at ( x , f ( x , z ) , z ) is
exactly n ( x , z ) , that is, that n is not the normal field of any surface above D .
Hint: Assume without loss of generality that f ( 1, 0 )= 0. Now traverse the curve
γ
( t ) = (cos t ,0, sin t ) ,0
t
2
π
and see what you can say about the restriction
of f to this curve.
Exercise 20.3: (a) Write a program to render a picture like the one shown in
Figure 20.13. For the checkerboard itself, assuming 0 is black and 1 is white, make
the light squares about 0.85 and the dark squares about 0.15, and be sure you can
render a picture like the one shown.
(b) Figure out the size of the screen-space projection of a unit square at location
( x ,0, z ) on the ground plane, either algebraically or by projecting the four corners
and computing numerically. From this, determine the vertical and horizontal band
limits as a function of x and z .
(c) The texture color at location ( x , z ) on the plane can be written as 0.5 +
0.35 S ( x ) S ( z ) , where S ( x )= 1 if floor ( x ) is even, and
1 otherwise. With methods
like those of Chapter 18, you can compute the Fourier series for S ; it's
S ( x )= 4
π
1
2 j + 1 sin(
π
( 2 j + 1 ) x ) .
(20.20)
j = 0
To band-limit this, you need only truncate the sum, and define
Figure 20.25: The man in the
original image (a) is translated to
the left in image (b). (Courtesy of
Connelly Barnes)
floor ( ω 0 1
2 )
ω 0 )= 4
π
1
2 j + 1 sin(
S ( x ,
π
( 2 j + 1 ) x ) ,
(20.21)
j = 0
 
 
Search WWH ::




Custom Search