01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling.

Slides:



Advertisements
Similar presentations
Computer Graphics - Rasterization -
Advertisements

Visible-Surface Detection(identification)
Collisions and Intersections When objects move, test for collision. When projecting surfaces, check for intersections. (Many slides adapted from Amitabh.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
03/12/02 (c) 2002 University of Wisconsin, CS559 Last Time Some Visibility (Hidden Surface Removal) algorithms –Painter’s Draw in some order Things drawn.
David Luebke5/11/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
Visibility in Computer Graphics Toni Sellarès Unversitat de Girona
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Hidden Surface Removal 고려대학교 컴퓨터 그래픽스 연구실.
Part I: Basics of Computer Graphics
Course Website: Computer Graphics 15: More Surface Detection Methods.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
Computer Graphics 14: Surface Detection Methods
Hidden Surface Elimination Wen-Chieh (Steve) Lin Institute of Multimedia Engineering I-Chen Lin’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Visibility II Week 7,
1 Clipping and Hidden Surfaces CS-184: Computer Graphics Prof. James O’Brien.
Visible-surface Detection Computer Graphics Seminar MUM
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Spatial Data Structure: Quadtree, Octree,and BSP tree Mengxia Zhu Fall 2007.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Other Rendering Techniques Types of rendering – Wireframe techniques – Scan-line conversion – Reyes.
Hidden Surface Removal
Graphics Pipeline Hidden Surfaces CMSC 435/634. Visibility We can convert simple primitives to pixels Which primitives (or parts of primitives) should.
Graphics Pipeline Hidden Surface CMSC 435/634. Visibility We can convert simple primitives to pixels/fragments How do we know which primitives (or which.
10/29/02 (c) 2002 University of Wisconsin, CS559 Today Hidden Surface Removal Exact Visibility.
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
Computer Graphics 2 Lecture 8: Visibility Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
The BSP-tree from Prof. Seth MIT.. Motivation for BSP Trees: The Visibility Problem We have a set of objects (either 2d or 3d) in space. We have.
Visible-Surface Detection Jehee Lee Seoul National University.
Hidden Surface Removal 1.  Suppose that we have the polyhedron which has 3 totally visible surfaces, 4 totally invisible/hidden surfaces, and 1 partially.
CS-378: Game Technology Lecture #2.2: Clipping and Hidden Surfaces Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney,
3/23/04© University of Wisconsin, CS559 Spring 2004 Last Time Antialiasing –Area-weighted sampling Visibility –Painters algorithm –Depth buffer (Z-buffer)
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Visible-Surface Detection Methods
CS 325 Introduction to Computer Graphics 03 / 22 / 2010 Instructor: Michael Eckmann.
Binary Space Partitioning Trees Ray Casting Depth Buffering
CS 376 Introduction to Computer Graphics 03 / 21 / 2007 Instructor: Michael Eckmann.
Hidden Surface Removal
Implementation II.
1 3D Hidden Surface Removal 김 성 남. 2 Contents Goal Motivation Approaches - back face detection - depth buffer - A-buffer - Scan line - Depth.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Visible Surface Determination (VSD) To render or not to render, that is the question… 1 of.
Where We Stand At this point we know how to: –Convert points from local to window coordinates –Clip polygons and lines to the view volume –Determine which.
Computer Graphics I, Fall 2010 Implementation II.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 5 Hidden Surface Removal and Rasterization Taku Komura.
Visible surface determination. Problem outline Given a set of 3D objects and a viewing specification, we wish to determine which lines or surfaces are.
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
Hidden Surface Removal. 2 Goal: Determine which surfaces are visible and which are not. Z-Buffer is just one of many hidden surface removal algorithms.
Lecture 30: Visible Surface Detection
Computer Graphics Implementation II
(c) 2002 University of Wisconsin, CS559
Solid Area Scan Conversion or Visible Surface Detection
Visible-Surface Detection Methods
© University of Wisconsin, CS559 Fall 2004
Hidden Surfaces Dr. Scott Schaefer.
CSCE 441: Computer Graphics Hidden Surface Removal
Implementation II Ed Angel Professor Emeritus of Computer Science
Visibility Computations
Lecture 32: Visible Surface Detection
Hidden Surface Removal
Introduction to Computer Graphics with WebGL
Hidden Surface Removal
Lecture 31: Visible Surface Detection
Implementation II Ed Angel Professor Emeritus of Computer Science
Visible-Surface Determination
Presentation transcript:

01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling

01/28/09Dinesh Manocha, COMP770 Visible Surface Determination Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

01/28/09Dinesh Manocha, COMP770 Area Partitioning Algorithms Divide-and-conquer strategy: spatial partitioning in the projection plane An area of the projection plane is examined If all polygons visible in that area can be easily decided, they are displayed Otherwise, it is recursively decided Exploits area coherence

01/28/09Dinesh Manocha, COMP770 Warnock Algorithm: Recursive Subdivision At each stage, the projection of each polygon has one of four relationships to the area of interest Surrounding polygons completely contain the area of interest Intersecting polygons intersect the area of interest Contained polygons are completely inside the area Disjoint polygons are completely outside the area

01/28/09Dinesh Manocha, COMP770 Warnock Algorithm: Easy Rejection Decision All the polygons are disjoint from the area There is only one intersecting or contained polygon There is a single surrounding polygon More than one polygon is intersecting, contained in, or surrounding the are, but one is a surrounding polygon that in front of all the other polygons.

Warnock Algorithm: Terminating Criteria Stop subdividing until the display resolution is reached If none of the easy rejection decision can be made at a pixel, compute the depth of all relevant polygons at the center of pixel-size area The polygon with the closest Z coordinate defines the shading of the area For anti-aliasing, several further levels of subdivision may be used

Warnock Algorithm: Complexity & Implementation Complexity of Warnock algorithm Implementation issues: –Exact intersection of a polygon with a window –Computing whether a surrounding polygon is in front of all the polygon –Robustness and accuracy issues

Weiler-Atherton Algorithm: Overview Eliminates the image-precision operations to terminate Subdivides the screen area against polygon boundaries as opposed to rectangle boundaries Uses a concave polygon clipping algorithm

02/12/01Dinesh Manocha, COMP236 Weiler-Atherton Algorithm Compute the closest polygon (P) along the Z axis Clip all the polygons w.r.t. P Generate two lists containing the pieces inside and outside P All polygons on the inside list that are behind P are discarded Recursively apply the algorithms to polygon on the inside list that are in front of P Display the inside list and apply the algorithm to process the polygons on the outside list

z-buffer Algorithm Store a z-buffer along with the frame buffer. A z- value is stored for each pixel Each z-value is initialized to back of the clipping plane. The frame buffer is initialized to the background color Polygons are scan-converted in arbitrary order If the polygon being scan-converted at a pixel is no farther from the viewer than is the point whose color and depth are currently in the buffers, then the new point’s color and depth replace the old values

z-buffer Algorithm: Advantages Simplicity Polygons can be rendered in any order The primitives need not be polygons (need to compute depth and shading values at each pixel) The time taken by the visible-surface calculation tends to be independent of the number of polygons on average or is the complexity linear??? Can be extended to handle CSG objects The z-buffer can be saved with the image and used later to merge in other objects whose z can be computed

z-buffer Algorithm: Disadvantages High memory requirements The required z-precision is maintained at a higher resolution as compared to x,y precision Aliasing problems (due to finite-precision) Rendering almost co-linear edges or co-planar polygons (visible artifacts) Issues in implementing transparency and translucency effects (due to arbitrary order of rendering)

02/12/01Dinesh Manocha, COMP236 List Priority Algorithms Determine a visibility ordering for objects ensuring that a correct image results if the objects are rendered in that order Use a combination of object precision and image precision operations Object precision: depth comparisons and object splitting Image precision: scan conversion The list of sorted objects is created with object precision Two examples: Depth sort algorithm and BSP’s

02/12/01Dinesh Manocha, COMP236 Depth Sort Algorithm To paint the polygons into the frame buffer in order of decreasing distance from the viewpoint Sort the polygons according to the farthest Z coordinate Resolve any ambiguities when the polygons’ z extents overlap and split them if necessary Scan convert each polygon in ascending order of farthest z coordinate (back-to-front) A simplified version where an explicit priority is associated with each polygon: painter’s algorithm

02/12/01Dinesh Manocha, COMP236 Depth Sort Algorithm: Ambiguities Let the polygon at the far end of the list be P. It is tested again each polygon Q whose z extent overlaps with that of P. Perform 5 tests: Do the polygons’ x extents not overlap Do the polygons’ y extend not overlap Is P entirely on the opposite side of Q’s plane from the viewpoint Is Q entirely on the same side of P’s plane as the viewpoint Do the projection onto (x,y) plane not overlap

02/12/01Dinesh Manocha, COMP236 Depth Sort Algorithm: Ambiguities If all the five tests fail, repeat them by reversing P and Q. If the tests fail again, either P or Q must be split by the plane of the other. The algorithm is recursively applied to the split pieces All these tests are conservative What is its complexity?

02/12/01Dinesh Manocha, COMP236 Binary Space Partitioning Algorithms For static scenes with moving viewpoints Uses general priority characteristics to pre-compute, off-line, the priority lists At run time computes a back-to-front priority of all the polygons in the scene

02/12/01Dinesh Manocha, COMP236 Binary Space Partitioning: Schumacker Algorithm Allows only convex polygons in the scene Grouped into clusters that are linearly separable For any viewpoint, the cluster priority is pre- computed The simplest cluster is a polygon. They can be complex polygonal or non-polygonal surface or volumes Within certain types of clusters, the priority of individual polygons is independent of the viewpoint

02/12/01Dinesh Manocha, COMP236 BSP Trees: Fuchs et al. For a given viewpoint a polygon is correctly rendered if all the polygons on its side away from the viewpoint are rendered first; then the polygon is rendered; and finally all the polygons on the side nearer the viewpoint are rendered

02/12/01Dinesh Manocha, COMP236 Constructing the BSP Trees It recursively subdivides the space into two half spaces Uses one of the polygons in the scene as the separating or dividing plane Other polygons in the scene that are entirely on one side of the separating plane are placed in the appropriate half space Polygons that intersect the separating plane are split along the separating plane Each half space is recursively divided until there is a single polygon in each half space

02/12/01Dinesh Manocha, COMP236 BSP Trees It is not unique. Depends on the choice of initial polygon and subsequent half spaces It is advantageous if separating planes create the minimum number of polygon splits Fuchs et al.’83 show that testing only 5 or 6 polygons as potential separating planes give a near optimal result Many other applications besides visiblity culling: collision detection, boolean set operations and model representation

02/12/01Dinesh Manocha, COMP236 List Priority (LP) vs z-buffer LP algorithms do not need to check for z at each pixel LP display polygons in a back-to-front order Shading calculations are performed more than once at each pixel LP algorithms introduce new edges due to the subdivision process