visible surface detection
play

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


  1. Visible Surface Detection (Chapt. 15 in FVD, Chapt. 13 in Hearn & Baker) 1

  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. 2

  3. Hidden Lines Removal 3

  4. Coherence • Most methods use coherence features in the surface: – Object coherence. – Face coherence. – Edge coherence. – Scan-line coherence. – Depth coherence. – Frame coherence. 4

  5. Back-face Culling 5

  6. Back-face Culling 6

  7. Back-face Culling 7

  8. Back-face Culling 8

  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. 9

  10. • Given two polygons P and Q, an order may be determined between them, if at least one of the following holds: x • 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. x • Q is totally on one side of P’s plane. x Z 10

  11. P is totally on one side of Q’s plane 11

  12. • How to quickly determine which polygon to draw first? 12

  13. • How to quickly determine which polygon to draw first? 13

  14. • How to quickly determine which polygon to draw first? Simply sorting back-to-front all polygons based on their mid- points doesn’t always work 14

  15. Z-buffer Algorithm • 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 only if its Z-values is closer to the viewing plane than the one already written at this location. 15

  16. Z-buffer Algorithm Penetrating Triangle

  17. Incremental Scanline     Ax By Cz D 0    Ax By D ( )   z , C 0 C       ( Ax Bj D ) ( Ax Bj D )    1 z z 1 C C  ( ) A x x   1 z z 1 C A    , since  x = 1, ( ) z z x 1 C A   z z 1 C

  18. Scan-line Algorithm 18

  19. Scan-line Algorithm 19

  20. BSP-Tree Algorithm 20

  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

  22. The Visibility Problem  Selecting the (exact?) set of polygons from the model which are visible from a given viewpoint

  23. The Visibility Problem is important Average number of polygons, visible from a viewpoint, is much smaller than the model size

  24. Indoor scene

  25. Oil-tanker ship 25

  26. Copying Machine

  27. Outdoor scenes 27

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

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

  30. 30

  31. Close details Far details 31

  32. Culling Avoid processing polygons which contribute nothing to the rendered image A primitive can be culled by: View Frustum Back Face Occlusion Culling Culling Culling

  33. View Frustum Culling Pass through scene primitives entirely inside frustum Modify remaining Remove primitives so as to primitives pass through only entirely the portion inside outside the view frustum field of view

  34. Backface Culling N cull away polygons > 90 whose front sides face away from the viewer N > 90 < 90 N

  35. 35

  36. Occlusion Culling Cull the polygons occluded by other objects in the scene Very effective in densely occluded scenes Global: involves interrelation between the polygons

  37. Visibility Culling View-frustum culling Back-face culling View Frustum Occlusion culling

  38. Hidden Surface Removal Output sensitive Polygons overlap, so somehow, we must determine which portion of each algorithms polygon to draw (is visible to the eye)

  39. Visibility in real-time rendering • interactively walk through a large model • large model  millions of polygons  acceleration necessary (e.g., visibility) 39

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

  41. Conservative Visibility Includes at least all the visible objects plus maybe some additional invisible objects May classify invisible object as visible but may never classify visible object as invisible

  42. What is visible? What is Occluded? 48

  43. Point Visibility From this point only the red objects are visible 49

  44. Cell Visibility Compute the set of all polygons visible from every possible viewpoint from a region (view-cell) From this cell the red objects are visible as well as orange ones 50

  45. The Aspect Graph Isomorphic graphs 51

  46. The Aspect Graph  ISG – Image Structure graph The planner graph, defined by the outlines of an image, created by projection of a polyhedral object, in a certain view direction

  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

  48. The Aspect Graph (Cont.)  VSP – Visibility Space Partition  Partitioning the viewspace into maximal connected regions in which the viewpoints have the same view or aspect  Visual Event A boundary of a VSP region called a VE for it marks a change in visibility

  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.

  50. Aspect graph (Cont.) 2 polygons - 12 aspect regions

  51. Aspect graph (Cont.) 3 polygons - “many” aspect regions

  52. Different aspect regions can have equal sets of visible polygons

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

  54. Visibility from the light source

  55. The Art Gallery Problem See: ftp://ftp.math.tau.ac.il/pub/~daniel/pg99.pdf

  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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend