??? Hidden Surface Removal - PowerPoint PPT Presentation

About This Presentation
Title:

??? Hidden Surface Removal

Description:

Hidden Surface Removal – PowerPoint PPT presentation

Number of Views:83
Avg rating:3.0/5.0
Slides: 40
Provided by: steve2270
Category:

less

Transcript and Presenter's Notes

Title: ??? Hidden Surface Removal


1
??? Hidden Surface Removal
2
Hidden-Line Removal Hidden-Surface Removal
?? 1. Back-Face Removal 2.
Depth-Buffer Z-Buffer 3.
Scan-Line Method 4. Depth Sorting 5.
Area Subdivision 6. Octree Method
3
Hidden-Line Hidden-Surface Removal
Object Space ???????????? ?? ? ???? ?
????? ? ????????????
? ??????????
? ???? Image Space ????????(pixels)????
?? ? ???????? ? ?? ? ???????????
? ????????
? ????
4
Back-Face Removal
????????? ???????,??????? Plane Equation
?Right-Handed Coordinate System ??
?
?Inside of plan
??????
5
Y
N(A,B,C)
X
view Direction
?? Plane ??? Invisible, hidden
Z
view point
Identify all hidden surfaces ?? 1. ????
Completely Visible
Completely Hidden ?????????? 2.
Partially Hidden Need more test
??? ?????????
fast
6
(No Transcript)
7
Normal Vector of Plane
N(A,B,C)
Z
Normal Vector ? Component C ??? Viewing
Direction ? ??Clt0 Normal Vector points
away from viewing position ????
Back Face
C
8
Plane Equation
3 points on the plane (not colinear)
9
Two Planes
Plane 1 Plane 2
Plane 1
Plane 1
Plane 1
Plane 1
??
10
Depth - Buffer Algorithm Z Buffer Algorithm
Image Space ? Test Visibility one pixel at a
time ? For each (x,y) pixel, the surface with the
smallest Z at that position is visible
11
?
?
?
?
Viewing Direction
??Z ? ??Z ?

?Z???, ???Z?,????? ??
Intensity of S3 (Z3) Saved for position (x,y)
12
2 buffers Depth BufferStore Z-value for each
(x,y) position,
????(x,y)??? Refresh BufferStore Intensity Value
for each (x,y) position ????(x,y)???
Z?
??
13
?? 0. Depth Normalized 01 Initially, all
positions Depth Buffer 1 (Maximum)
Refresh Buffer Background 1.
????Surface,????,?????(x,y)?? ?Z-value 2.
????(x,y)???Z-value 3. ????Z???,????Z??Intensity
14
Depth Buffer Algorithm (Z - Buffer)
1. Initialize Depth Buffer and Refresh Buffer?
??? ???(x,y)?? Depth (x,y)1
Refresh (x,y)Background 2. ??Surface???(x,y)??Z??
?Z(x,y) z ??Z?? I (x,y) i ????
Intensity?
15
3. If Z (x,y)ltDepth (x,y) Z??? Then set
Depth (x,y) Z (x,y) Refresh
(x,y) I (x,y) If z lt ?? Depth (x,y)
??? Not Vision 4. ??????Surfaces???(x,y)?
??
16
Depth-Buffer(Z-Buffer)??
?????????zi???(x,y)????? DepthBuffer RefreshBuff
er
??Z?,????????
z1??
(x,y)????? ?????
17
Scan - Line Method
Image-Space ? one scan line at a time
????????? ? ???Scan line?intersection???edges??,
???????Surface???Visible 1. ??????????sorted
in order of increasing x? 2. ????Scan
line??????????Surface? 3. Scan line?Surface????fla
g?
18
Line 1 ??AB, BC, HE, EF Line 1 AB ? BC
??S1 flag ON
Intensity for S1 ON
??S1 HE ? EF ??S2 flag ON
Line 2 ??DA, HE, BC, FG DA
?HE S1 ON HE ?BC BOTH ON
BC ?FG S1 OFF
S2 ON FG ?
S2 OFF
19
? ????Surface ON ????Surface ? Both
Surface ON ??depth,???? ??depth of
S1lt S2 ???S1 ,????BC
S2
S1
OFF?Background
ON
1
ON
ON
OFF
OFF
OFF
ON
2
3
ON
ON
ON
OFF
OFF
20
Depth Sorting Method
21
2. Resolve ambiguities??????? Reordering???
Z? ? Z?
3. Surfaces ?Depth Z??????,?Scan-Conversion
???
  • ????,Z? ? Z?
  • Image Space

???? Sorting in Object Space
Scan-Conversion in Image Space also call
painters Algorithm
22
  • ???P,Q,R, Surface
  • ??Z??z??
  • ???Depth????? ? ???Scan-convert
  • ???Depth???? ? Test

23
(No Transcript)
24
1.
25
2.
P is outside Q
P is outside Q
26
3.
P is inside Q
P is inside Q
27
????
Test 1
??Bounding Rectangles?X-extent,Y-extent????
Test 2
Q plane Equation EX FY GZ H 0
Vertices of P ?? Q plane e.q. Ex Fy Gz
H gt 0 P outside Q
(x,y,z)
28
(No Transcript)
29
Test 4
1.?????intersection?
2.Surfaces?X-Y??????projection??? intersection?
30
???????,?????????
31
(No Transcript)
32
Area Subdivision Method
Image Space
  • ?????????????????
  • ???????????Visible or Hidden or No Surface
  1. Subdivision
  2. Single visible surface or No surface
  3. If NOT ? subdivision ? (1)
  4. Smallest division ? a pixel

33
Area Subdivision Warnocks Algorithm
Surrounding Surface Surface????Area
Inside Surface Surface???Area?
Outside Surface Surface???Area?
Overlapping Surface Surface ???? ????
34
??
  • Surfaces??Area outside
    ? Background color
    displayed in the area
  • ????Surface??inside or overlapping
    ? ??area?Background color,??Surface?area
    ????
  • ????Surface??Surrounding
    ? area??Surrounding Surface???
  • ??1?Surfaces?inside,overlapping,or
    surrounding,???Surrounding???Z
    ? area????Z(??)?Surrounding Surface

35
?????1???,?????Subdivision?
  1. ??Surfaces??outside the area?
  2. ?area???1?inside,overlapping,or
    surrounding?surface?
  3. ??Surrounding surface?Z???,????surface?

36
(No Transcript)
37
??Subdivision???area???1?pixel ?compare depth ???
Z-buffer
???area???,??? min Z?surface?subdivide a
area,??surface boundary?subdivision
38
Quadtree ???
  • area????
  • ??????surface?area???
  • Visible
  • Hidden
  • Inside
  • Outside
  • ????????
  • ??????Quadtree division

39
Octree ???
for viewing volume
project octree nodes onto viewing surfaces
0,1,2,3 ? front octants ? visible
4,5,6,7 ? back octants ? hidden
? removed
Write a Comment
User Comments (0)
About PowerShow.com