Visible Surface Detection (Chapt. 15 in FVD, Chapt. 13 in Hearn - - PowerPoint PPT Presentation

visible surface detection
SMART_READER_LITE
LIVE PREVIEW

Visible Surface Detection (Chapt. 15 in FVD, Chapt. 13 in Hearn - - PowerPoint PPT Presentation

Visible Surface Detection (Chapt. 15 in FVD, Chapt. 13 in Hearn & Baker) 1 Given a set of 3D objects and a viewing specifications, determine which lines or surfaces of the objects should be visible. A surface might be occluded by


slide-1
SLIDE 1

1

Visible Surface Detection

(Chapt. 15 in FVD, Chapt. 13 in Hearn & Baker)

slide-2
SLIDE 2

2

  • Given a set of 3D objects and a viewing specifications, determine which

lines or surfaces of the objects should be visible.

  • A surface might be occluded by other objects or by the same object

(self occlusion)

  • Two main approaches:

– Image-precision algorithms: determine what is visible at each pixel. – Object-precision algorithms: determine which parts of each object are visible.

slide-3
SLIDE 3

3

Hidden Lines Removal

slide-4
SLIDE 4

4

Coherence

  • Most methods use coherence features in the surface:

– Object coherence. – Face coherence. – Edge coherence. – Scan-line coherence. – Depth coherence. – Frame coherence.

slide-5
SLIDE 5

5

Back-face Culling

slide-6
SLIDE 6

6

Back-face Culling

slide-7
SLIDE 7

7

Back-face Culling

slide-8
SLIDE 8

8

Back-face Culling

slide-9
SLIDE 9

9

Depth Sort (Painter Algorithm)

  • Sort all of the polygons in the scene by their depth.
  • Draw them back to front.
  • Question: Does a depth ordering always exist?
  • Answer: Unfortunately, no!
  • For polygons with constant Z value, this sorting clearly works.
slide-10
SLIDE 10

10

Z x x x

  • Given two polygons P and Q, an order may

be determined between them, if at least

  • ne of the following holds:
  • Z values of P and Q do not overlap.
  • The bounding rectangle in the x,y plane

for P and Q do not overlap.

  • P is totally on one side of Q’s plane.
  • Q is totally on one side of P’s plane.
slide-11
SLIDE 11

11

P is totally on one side of Q’s plane

slide-12
SLIDE 12

12

  • How to quickly determine which polygon to draw

first?

slide-13
SLIDE 13

13

  • How to quickly determine which polygon to draw

first?

slide-14
SLIDE 14

14

  • How to quickly determine which polygon to draw

first? Simply sorting back-to-front all polygons based

  • n their mid-points doesn’t always work
slide-15
SLIDE 15

15

  • In addition to the frame buffer (keeping the pixel values), keep a Z-

buffer containing the depth value of each pixel.

  • Surfaces are scan-converted in an arbitrary order. For each pixel

(x,y), the Z-value is computed as well. The (x,y) pixel is overwritten

  • nly if its Z-values is closer to the viewing plane than the one

already written at this location.

Z-buffer Algorithm

slide-16
SLIDE 16

Penetrating Triangle

Z-buffer Algorithm

slide-17
SLIDE 17

Incremental Scanline

         C C D By Ax z D Cz By Ax , ) (

x C A z z C x x A z z C D Bj Ax C D Bj Ax z z                ) ( ) ( ) ( ) (

1 1 1 1 1

, since x = 1,

C A z z  

1

slide-18
SLIDE 18

18

Scan-line Algorithm

slide-19
SLIDE 19

19

Scan-line Algorithm

slide-20
SLIDE 20

20

BSP-Tree Algorithm

slide-21
SLIDE 21

Virtual Reality Applications

 The user “walks” interactively in a virtual polygonal environment.

Examples: model of a city, museum, mall, architectural design

 Large and complex - hundreds thousands or even millions of

polygons The goal: to render an updated image for each view point and for each view direction in interactive frame rate

slide-22
SLIDE 22

The Visibility Problem

Selecting the (exact?) set

  • f polygons from the

model which are visible from a given viewpoint

slide-23
SLIDE 23

The Visibility Problem is important

Average number of polygons, visible from a viewpoint, is much smaller than the model size

slide-24
SLIDE 24

Indoor scene

slide-25
SLIDE 25

25

Oil-tanker ship

slide-26
SLIDE 26

Copying Machine

slide-27
SLIDE 27

27

Outdoor scenes

slide-28
SLIDE 28

The Visibility Problem is not easy... A small change of the viewpoint might causes large changes in the visibility

slide-29
SLIDE 29

29

The Visibility Problem is not easy...

A small change of the viewpoint might causes large changes in the visibility

slide-30
SLIDE 30

30

slide-31
SLIDE 31

31

Close details Far details

slide-32
SLIDE 32

Culling

A primitive can be culled by: View Frustum Culling Occlusion Culling Back Face Culling

Avoid processing polygons which contribute nothing to the rendered image

slide-33
SLIDE 33

View Frustum Culling

Remove primitives entirely

  • utside the

field of view Modify remaining primitives so as to pass through only the portion inside view frustum Pass through scene primitives entirely inside frustum

slide-34
SLIDE 34

Backface Culling

N N N

> 90 > 90 < 90

cull away polygons whose front sides face away from the viewer

slide-35
SLIDE 35

35

slide-36
SLIDE 36

Occlusion Culling

Cull the polygons occluded by other objects in the scene Very effective in densely

  • ccluded scenes

Global: involves interrelation between the polygons

slide-37
SLIDE 37

Visibility Culling

View-frustum culling Back-face culling Occlusion culling

View Frustum

slide-38
SLIDE 38

Hidden Surface Removal

Polygons overlap, so somehow, we must determine which portion of each polygon to draw (is visible to the eye)

Output sensitive algorithms

slide-39
SLIDE 39

39

Visibility in real-time rendering

  • interactively walk through a large model
  • large model  millions of polygons  acceleration

necessary (e.g., visibility)

slide-40
SLIDE 40

Exact Visibility Approximate Visibility

Includes all the polygons which are at least partially visible and only these polygons. Includes most of the visible polygons plus maybe some hidden ones.

slide-41
SLIDE 41

May classify invisible object as visible but may never classify visible object as invisible

Conservative Visibility

Includes at least all the visible objects plus maybe some additional invisible objects

slide-42
SLIDE 42

48

What is visible? What is Occluded?

slide-43
SLIDE 43

49

From this point only the red objects are visible

Point Visibility

slide-44
SLIDE 44

50

From this cell the red objects are visible as well as orange ones

Cell Visibility

Compute the set of all polygons visible from every possible viewpoint from a region (view-cell)

slide-45
SLIDE 45

51

The Aspect Graph

Isomorphic graphs

slide-46
SLIDE 46

The Aspect Graph

 ISG – Image Structure graph

The planner graph, defined by the outlines

  • f an image, created by projection of a

polyhedral object, in a certain view direction

slide-47
SLIDE 47

The Aspect Graph (Cont.)

 Aspect

Two different view directions of an object have the same aspect iff the corresponding Image Structure graphs are isomorphic

slide-48
SLIDE 48

The Aspect Graph (Cont.)

 VSP – Visibility Space Partition

 Partitioning the viewspace into maximal connected

regions in which the viewpoints have the same view

  • r aspect

 Visual Event

A boundary of a VSP region called a VE for it marks a change in visibility

slide-49
SLIDE 49

The Aspect Graph (Cont.)

 Aspect Graph

A vertex for each region of the VSP An edge connecting adjacent regions

Regions of the VSP are not maximal but maximal connected regions.

slide-50
SLIDE 50

Aspect graph (Cont.)

2 polygons - 12 aspect regions

slide-51
SLIDE 51

Aspect graph (Cont.)

3 polygons - “many” aspect regions

slide-52
SLIDE 52

Different aspect regions can have equal sets of visible polygons

slide-53
SLIDE 53

Supporting & Separating Planes

3 2 2 1 1 Supporting Separating Supporting Separating A T is not occluded in region 1 T is partially occluded in region 2 T is completely occluded in region 3 A - occluder T - occludee T

slide-54
SLIDE 54

Visibility from the light source

slide-55
SLIDE 55

The Art Gallery Problem

See: ftp://ftp.math.tau.ac.il/pub/~daniel/pg99.pdf

slide-56
SLIDE 56

Classification of visibility algorithms

  • Exact vs. Approximated
  • Conservative vs. Exact
  • Precomputed vs. Online
  • Point vs. Region
  • Image space vs. Object space
  • Software vs. Hardware
  • Dynamic vs. Static scenes