This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ECE 595 / CS 491 / C3591 Realtime Rendering and Graphics Hardware, Spring 2007 Midterm You have 1 hour, 15 minutes to complete this exam This exam is closed book and closed notes. The number in brackets (e.g. [51) tells you
how many points each problem is worth If there are several parts, I sometimes break it
down for each part to give you an idea of how I will grade it. This exam might be long
for some of you. The pages are doublesided and there are 45 problems in total, which
gives you a 1:40 to work on each problem. Some of the problems you will answer
quickly, which will save you time for the problems that take longer. The exam is worth a total of 186 points. I suggest that in order to maximize your score,
you work fast and efficiently. It would help to go through and answer all the questions
you can answer quickly first, and then go back to the questions you have trouble with
later. If you need more space, use the blank sheets of paper provided and label your work
with the problem number (and indicate that your work is continued on the attached sheet
next to the problem here). Do your best, I will normalize the grades at the end. So LurmMS' Name 1. [1] Write the matrix M that will translate the current coordinate system so that the new
origin is now at point (a,b,c). 100‘?h
:Ol0l9
M (3ch 00:3
W l
2. [1] Given the matrix M from above, here would point ((1, e, f) be transformed to? (ClFOL) 6H,) HP)
3. [1} Compute the result of multiplying the given vector by the following matrix.
[a b][x] 90¢ + L3
6 d y CK + Ola
4. [1] What is the result of the following matrixmatrix multiplication? a b e f _ (124193 “(34$
[6 diig hi_ ce't—cij all—Pdh 5. [1} If v; is vector [a, b, c]T and v; is vector Ed, 6, f] T what is the dot product v; T  vz? QGlPLEi'C'll 6.‘ [4] Describe the following coordinate spaces as defined by OpenGL:
"[2} Eye—space coordinates Cmewa [S {>[Augl 9...”? [if (“$35k [OoL‘xd 6‘0““ J ‘l’LQ '%
(”Xii. "Ht is 4“ “HQ “7”.) +3 i3 “‘3‘ [2] Screen—space coordinates OWEN 2‘s och lower [2434‘ karma/e? lie Sarah. +x T5 1n. 411 ﬁSLFF)
\lﬁcJ—T'QA how fakaﬂ ﬁre». 0 +0 Sam W‘Q‘H‘Iwﬁr K) \ M 041: SW ”~5ij (Av—3)
7. [5] What are homogeneous coordinates [2]? Why do we use them in computer
a hics [3]?
gr P — a L at MW at w m». Ao‘LdLAn—a ‘1. ﬂaw/[k Cﬂvmrqtuqm Mod ( ) I“ luangius CGWAJqN‘LQSI bet (LEﬁfhﬂh (XIUJEIW) ...._. J 2 I I
X} j) zit“, \
h l '9‘" FOAM 4f?
m such V‘Cl— (2:: {1: $3) 9» Bel) Sf’hcgu M. “N. Rowe s 090 w
3 ”I” 9 "."V ’ ’ _ J , r (A a;
lo M we Ctr“ infra” (AQFW 'l'VWFiWMJWV‘r (Matti) ( W 17/ iv‘ “jam/rho;
ifmxJJWw) L3 0» mgiﬁx.
g «Mink. 8. [7} If you transform a vertices of a model by modelview matrix M, what matrix should
you multiply its normals by to get a correct result [2]? Remember, the normals should
remain perpendicular to the surface after the transformation. How do you derive this, as
we showed in class [5]? ‘ “(GU [email protected](. MEI‘3“) 44* “(Humid Lb Mi MWV§L,+r_____E%§ O&&_. T V "' O 4— horwals I 31‘0le L J' 41) Swf—uw—
n _. <. MAPr "WSLfMdL‘CA £7
[Mn “ff MV : O medial Nikki“ —L 9. [3] Define the term ‘‘rende1ing.” {2%me a 7% WW. ?/ was s baﬁhxj a SON (await LA wiry: 2%, W MM) ”OWL” :h&§94> 5")“ MiaPk; 6U“ May, “f” Hugh Soﬁa. cram 44“ Spec:3“ via» , 10. [10] Den've the perspective projection transformation functions for the x and y terms
only. Assume that (as in OpenGL), the frustum is defined in x by the left plane I and the
Ii ght plane r and in the y axis by the bottom plane I) and the top plane I. Unlike OpenGL,
set up the transformation so that it maps the points to the canonical volume that ranges
from 0 to 1. Write the functions in the form x’ = ﬂx,y,z) and y’ = ﬂx,y,z), where x’ and y’
are the transformed x and y coordinates. 11. [10} Derive the general orthographic projection matrix that projects the rectangular
block (I, r), (b, r), (n, f) in eye space into the rectangular block (x0, 35;), (yo, yi), (20, Z1). pox ﬁvsi‘? x‘: _L_ x’ﬂ)pmrs «L Déwﬁl
roﬂ Wm AI“ Xvéxr_><,
f Xl—Xo' ’ +Xux" ‘35
K ; mt)‘ E) n x
. X" 9
Wk" x“: .‘Xt'm —— “Wm—ta :7 O
r—er r’ 50
a 9' Harry) M‘" O ”55:; O
‘ (_ "" a ..... ‘ «9 v
‘3 \>£’LV SW (3 ’ {"b y fré +3 0 0 ﬁg
“7: \‘5 R ii‘i‘HQ 4‘5ch Latmé/r .441?“ng gtBhs (in m “4—? O 0 O
c» _L._  _. (~— W > in (Di£51
'2 — 434/1 ( Z M) “11
f 2¢*%o
%   12. [5] Using the matrix you derived in the previous problem, plug in (1, 1), (1, 1), (1,
I) for (x0, x1), (yo. yi), (zo, z;) and Show that you get OpenGL’s orthographic Projection matrix.
?l§ ﬁx .—\}\ r} r
29  2 O wag
‘ 2. O O "if:71" #xg r,£ O r,Q
r Q é L
. 2 +
z e—EJL— O __._ o ,. __
____ O — ~— . i, 194,
M9 ~ 0 6'19 ﬂ 5 e £
“—1 ”2‘3— * o "3—: 13.33
O O nt «am 0 59h — 12m
0 O O i O 0 O \ «$1
Ttgs \5 “ML
9%: M OFGL‘S
UriM ”My“ 13. [5] During clipping, we clip line segments to the planes corresponding to the different
sides of the frustum. Compute the new vertex when you Clip the following line segment to the x = w clipping plane. Li FWVM'KHC ﬁrm/“7“")? _ \
wrl 14. [5] In the following diagram, show where the four points would project to in the x—w
space after performing the homogenous divide. Write down the coordinates of the final coordinates next to each projected point. 15. [4] Name four different values that are commonly interpolated by the rasterizer for
use at each fragment. Calm”, $1pr) “WMM‘s, MW coordmﬁes Write out the value stored in register res after the following fragment programs are
executed independently of each other. Assume all the registers have been declared and initialized in the following manner: R1 = {1,2, 3, 4}, R2 = {0, —1, 2, —2}, R3 = {1, 1, 1,
l}, res = {10, 11, 12, 13}. If the instruction is a syntax error, indicate so. 16. [2] ADD res, R1, R2;
{€S:z‘/{)S,2f
17.[2]ADD res, R1.x, _R2.y;
his =fo,0,0, '05}
j 18.[2]MUL res.z, Rl, R2.y;
regcilo) \\)*'3) r33
19.[2]MUL res.xz, R1, R2.y;
res2 {",ll)"3,l3§
20. [2] SUB res.z, R1, R2.xy, 1  21.[2]CMP res, R2.y, R2.x, R2.z;
, {mm
1 22. [2] DP3 res, R1, R3; r63: { QIQJO, Lg 23.[2]IDP4 res, R1, R3; S‘mmx {EMF—l MN res 9i10'10,10,{03 For the following questions, you are executing a fragment program on a full—screen—sized
quad and the texture coordinates uv range from 0 to I, with (0,0) in the bottom—left corner
of the rendered quadrangle. The z and w components of uv are 0 and 1, respectively.
What are the outputs of the following fragment programs? In other words, what do the
shaded surfaces look like? Describe it with words or draw a picture if it helps to describe
it. Try to be as precise as possible (e.g. label the dimension of things if they are known,
and identify the output color in {r, g, b, a} format if it is known). The header of each fragment program is always the same: l!ARprl.O
ATTRIB uv = fragment.texcoord£0] ; # so uv is {u, v, 0, l}
The different fragment programs are given below. 24.[1]
MOV result.color, {1, 1, 0, 0}; ‘END “3le ewallm‘ﬂ L: a M'W YELLOW Uri/O) 17M 25.{2]
MOV result.color, uv.x;
END ~e~+ gm“ (elf—l lo m7”. VOV “Allgpt a. jraﬁ; 30t_3 7‘4 I ' ‘ ‘ i " {S k Tul m“ L; “ad; 9,‘ Jim» ’QLM' ewdk “MmL7 Movers; mid ( 3/9
[NE/\A'I't Gm 44‘s {ﬁll/JET: I “ ’ 26..[2] TEMP t; SUB t, uv, 0.3; CMP result.color, t, 1, 0;
END' WWW WitV elmﬁ M l?“ “so.“ 03,35... “WW 1,
O_ M We. Ea SOCTL. WM "“3th
(I) J J) 73‘ ~
9: ' m3 qmri‘iv‘... Is a [C‘H'(€ #11:] l :v
E 1 27[5] \vaw‘AH SwgrasECL 40 [Ao’iﬁbe w 1%»...
mt) TEMP V0, V1, t, 1.1V temp;
59., Cross \sr’°L"‘C/f KPD 03%;;th (4‘ Ln thj 9va
$53, MOV v0, {0 5 l, l, O}; L“ 26 (03") M (O, 0.5) M h
3% MOV v1 {0 0 5 1, 0}; c, ,,
3,3 XPD t, v0 v1 95>: do,» w StetGM” £94
MOV uv_temp, uv;
sch MOV uv_temp.z, l,
In}? ,
g5 DP3 t, t, uv_temp; , g,“
3' “g WL/ Lo
<53 CMP result.color, t, O, l;
a
END
4x
2
(0'08)
may , 28 [5] Using the header for the fragment program above, write the remainder of the
l program that would draw a circle of radius 0.25 (in texture space) at the center of the
screen. The circle should be red {1,0,0 0,}, the rest of the background in black {0,0,0 ,.0} T “E eﬁmﬁ‘ohu u‘l (,‘Ycle 1 , ‘ EM? 7 T M? ‘r‘ 2% ciiLNQ {$4ti Rx, a) 2ij La) 4 r2 .
E. 1 {NW (9‘ la) «'5 we?“
I lif L;1’p(€. . , O
503 "t, w, 0.3; “ﬁt: x—oS, 3—0533, i , M04 {€ng 0 ~ ﬂ
, a I )z
r ., "it ~E: booS) + 3““
W3 124., J: ,
Mdt, r, 9‘2§,0.2§ , it V“: 6.3% 2
‘ ~ 2 ".2:
t “E w" 1H t" [xOSfl'W'm’ 0
Sci; J‘ 2 ,
t, it o o 03, 0; it skate neck .Mraiz arr/(L
. CM? V€SM‘&_(A'9() 3 ) r r: W L(c~gL 0‘1ng
”all black
6ND 29. [4] In class, we talked about the different ways we could represent the spatially
continuous theoretical texture signal. What are the four different techniques we talked
about? Note that some of them could be approximations of the theoretical signal. I) EXPLtcLTLbf  wet/L amasar ”WSW“ 2) LMPLICATLW , “A ““ Fwy/“b, as no 6‘— Elm—JV 2;) [MPLlC{TL_L(  11.31% ‘Q/VVUBMJ WWWs. ﬁ’( ((61ka Magi props—161:4 . r_ . Fvedw
(a). mmuﬁémaaj WMcL Cure/(La) (rah’24, SfﬂﬂVa', 92"?) Whit, 4) M’metmeur "’ “M“; F» ELL—"36% 49%;. 4° ‘~m.wz(e 4i: MM“:
$74 30. [6] Suppose you are given a continuous signal that has the frequency spectrum shown
below. Show what the frequency spectrum would look like when the signal has been
undersampled and is aliasing [5]. Identify the source of the aliasing in your diagram [1]. Fan) 31. [3] A signal f( I) passed through a linear system (such as a filter) can be modeled as a
convolution ofﬂt) by the impulse response of the system g(t) to result in the output Mr).
What does the Fourier transform of the output 110‘)? to): transit) i; Htw):i’~’tw)6(w) 32. [10] Describe why you need the Texture Sampling Filter (TSF) and the Screenspace
Sampling Filter (SSF) that we discussed in class. {1J1 618$“ ‘H‘! W 8% of]! wnux 6“ Coasl'Mva ”M SW (M .Wij #7674“; sad) amt km s Mr M a. will“. HM, “L.” have s were
have—HM smell ﬂit ‘Mla J13“ Mama 4f MMU—vﬂg. “radarIda), J43»: Si‘jd L3
L; damn; (smiled!) {Hawk 75’ “Mi “dam” 94w“) 1% Saki/03 giwa», 1% 3:34
1h :H'KML I) J—«j a: 05%.! «#4 TamiA §a~p£ij 3: Ar (’TI‘FJ_ WMJL ATM/{jg WM lo.)
:UPMCWUM “‘1‘” 6‘ cM‘W 3M7 "“ ”k“ I‘M; ("I'M/w LL NYE31M «yak L3 #12 3% W ”TAQA‘FWC, w: Maui lo LIA, FFW“ 4—0 We? “€315th This n m
Law 33?— g’h Wk“ W, 7th?) [‘7 Wick/(£7 960% nan—a WJWW‘MA‘ 33. [5] Assume that you are doing texture mapping and interpolation samples using a
bilinear interpolation. Suppose that the corner colors are given by CNE, CSE” Csw, CNw,
and the projected point is given in local cell coordinates x and y with the origin being at
the south—west (SW) comer and the northeast (NE) corner is 1, 1. What is the bilinear interpolation formula? (Am CAEHXIU) : (1’3)<Q ax) Cg“ + X ng) 4— 3 (LIX) CNN + X CNE) 34. [2] What are the two kinds of reconstruction filters available in modem graphics
hardware? I 35. [10] Expiain how SBTC compressionworks and show how it achieves 6:1
compression. In other words, describe the algorithm in enough detail to show how many bits are used in the S3TC representation and what they are used for. SZTC M» U”"‘ {Lb ﬁSStwr'iow ‘H‘w+ (10ka Am a. 4‘4 FagJ £51005; tat/«ea
m £63 C—0{W SPAQ‘ S; QwrF, 11;: M} a saw :mFu " f1 cox/bow ‘ FELT: Mc‘; £231— Rafolwi a; wee/3w 65d:
4‘4 i9!0rj¢.g' Rf WA Lice/Lida MW Mt: 203.1%!” r1. Lam §A+‘Z§‘S M ﬁZ‘A‘EZ‘EE mgr—S SMMAF “Pistch. ULJ‘J’GM—I’Oﬁhwﬂh M M35114 “4‘40er 1%.. (fa—Jar: ("{‘IZULm/ LJQCL Mahmud. ZLSB/fmﬂ, SM‘ kw); alum A? 13 1“: do“, wheel—M Lamond
00% K, {ady 4W (pwfc‘ «fa—571 of {2. L43) Ak— h lair/L: J W (7% (Kw—OJ "F“ 2x IGJHWLJ : glgr{s_ SD. M 47.? glad; (7 L‘W ”)1 £4 fath 36. [5] Why can’t JPEG be used for texture compression for realntime rendering?________ ______
"Tm 0—3 Serbs/‘1 mass”; M») “EEG Camil cm.) L W 9“ ”hi—‘6‘“ ”Mama 1
‘) do“, Maw Ssﬁh— " L"? M‘ “4”] Lat 064.09% $3.15“ 2) WearM Lﬁlﬂ WW2»)...— JPEG 619124 («m—hi“. WW m—‘Hx t>'“7‘L1”"‘7{‘
Inc“) vmfaﬁo w Ww~~hM M (Mom AW v13MMwaj‘QV WHERE» Nah») 37. [4} Given the following formulas for the Fourier transform and inverse transform: F(a)) = of f(t)e”j‘”’dt —DO f(r)— — — :ﬂTanemdt Prove the shift property of Fourier transforms. f(t a)————> 17(60):? 38. [6] What are hard and soft shadows?
HMSWM M 9% GHQ 1") “Tm”? 51“ij SW' «71" dun‘mx le‘fi):
44m? Warmth—r m SW w a» ﬂrjbb (W “(Le W711; 441° 5' 4:2. [awry can.
MW m n‘tiz 9,:qu w pmﬂ SEQ/F SLuJom MSW WjiQ‘G'v— M’ﬁ— WWW ,Qc'fn’e Sw_ TL! BL; 1301. SM anm M (Lam/9+ Sap, an? .1 “L/ M Pod? m 5‘61 ML) (HP—ff! 7a T’f‘ﬁmzaunyf_ EM] 3:411}th Mclﬂywww 39. [10] The two principal hard shadow algorithms we talked about in class are shadow
maps and shadow volumes. Explain how each of them works, as if you are describing
them to someone so that they can implement them [6]. It might be helpful to draw
diagrams. Also, what are the advantages/disadvantages of each [4]? SW H} ‘) Talk a. OLE/pk mar £002 4L F‘O~‘j «I 4%.; £343" EW‘ 2) Men We, yew TM a e rw P WM l
7% 1/; .‘Ml‘k mmhweioﬁslkj'sw M W W h~ 5%. M‘ slww M #1 swat; J . gtriwrt Wxﬂ‘“ “.4 TS
€k& k JpnSki) ﬂ ‘f/MLfM‘L “ml <2 aha/glim? fats‘rbs 0L.»
(LESW‘Q 4:. P :‘K OER
“W Ola We t—l :9
M §W&J_
Wt “+th w 14:
I ﬂaky136%)?» off/Zu 18%w3—émafm N’Pﬂ‘mafi , ‘ _ P
40. [2] What is the source of the artifacts in shadow maps? ONL e’( ”2 twp: 5W :1 oJliLQaw‘l'S WK 9% W5 R m ‘l’LL dapﬂxwmfa
(N 5% 5%) ll 0L3 CaU'E" 04.2% N'( Wald1mg.” ‘ 3.5141 7}“ oi 41‘3““ {a
tsp/mi“ MW salmon Mike 5% WMTEMI ‘73" WW
We M a ma» «r W s a law (a t WW;
Cm— W SM 61.2% 54% ”a SWMZ 41. [8] Percentage—Closer Filtering is a technique used to improve the quality of the
shadow map algorithm in high—end rendering systems, such as those used by Pixar. Suppose you were given the depth map shown below. Your task is to shade the inner 4 x 4 region (the cells in white) for a polygon who spans the entire region and whose depth is 30. To present your solution, use the following. notation: write a 1.0 in the regions where the polygon is fully illuminated, a 0.0 for the
parts where it will be fully dark. For the regions where the shaded value is in between 0 and 1, write it either as a fraction or a decimal. First shade the result you would get using standard shadow maps [2]. Highlight the
shadow boundary between llght and dark [1}. . 3i i Lém 7k aims“j '{SW 'V’ULMJM Show: ~39 6»: TMeSTEcaﬂ meaxes‘ Now shade the 4x4 region of the surface with Percentage Closer Filtering [5]. For every
sample, use the four nearest depth samples for comparison. ‘
No R M at ﬂoat; pl #— !l\ Ell1E 2x2 Mahler bate)
.mlHﬂﬂln 9W“ Meiji? a
‘I "a"; W a “Carl sac la WM 42. [5] Hard shadows can contain infinitely—high frequencies, which means that unless
they are filtered properly they will exhibit aliasing artifacts when sampled for the screen.
We talked about some of the artifacts of shadow maps. However, shadow volumes are
not filtered either. What do the aliasing artifacts of shadow volumes look like? Describe them. :ihelm has, swastika ZWMW me
chle' Lib/ (Mara/04193) LJ ”31(1— rwm IW MW M,f; “41* ﬂ‘? W  10/. 43. {5] In class, we talked about the differences between projective aliasing and
perspective aliasingwhen it comes to shadow maps. What are the differences between
the two and how do they come about? It might help to draw some diagrams to explain
this. Vmpctdnim Atacama @CCVW‘S MAM
nth W smCma M MM psi/L
mﬂpaJ‘L HQ VMQVJW MM. Raﬁ4074)
\k ‘l’r‘i £733er wire... 044; erg .fm a. 3““)!4
SLAM wavy: P‘Y‘P’o w L4 fﬂif’rtfe—v‘ .WFV . ,, 1L? 4 a
a. (01)“ 'ﬂ 4 {maﬁa fjlehEcLz/Ju @jSl
Hi 04'1”th w [2. WEILJL?‘ t) > CmCOc) ' '44. [5] Describe how perspective shadow maps strive to reduce the artifacts of shadow
maps. Diagrams might help. VMMW QM“ “Nif’ +W) ‘(K‘ “M MH‘PNXK Ba W‘dhﬁH“ 99.1%.: Mix/p Am...
g) $l—Pﬂgtr/i‘w 560‘;ij la «M wfrrjw “RM“; 14—2 S‘w :3 W, thﬁw 1,,b KL . (is W «(ﬁg/1“"; an...“ an ”v1 1453”) a; ma #4 $4M?
('4 W .. Qtrw 41%“ Jim (T M 7%:3 "AW—vSc‘h‘lwcjém HM «$4; ‘L’l‘gqtarw jQ—x RQYVWJJ Eta4L0“ Fwd — Fido/2.56%
we've ‘ Syria...
45. [2] What are the two largest manufacturers of consumer—level graphics hardware(e. g.
the GPU’s we’ve been talking about in the class)? Ami)
NWDng .) pm ( ) ...
View
Full Document
 Spring '07
 Sen

Click to edit the document details