Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Similar documents
Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts

8. Hidden Surface Elimination

Computer Graphics. Bing-Yu Chen National Taiwan University

Visible-Surface Detection Methods. Chapter? Intro. to Computer Graphics Spring 2008, Y. G. Shin

8. Hidden Surface Elimination

Hidden Surface Removal

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

CEng 477 Introduction to Computer Graphics Fall 2007

Computer Graphics II

9. Visible-Surface Detection Methods

Hidden surface removal. Computer Graphics

CSE528 Computer Graphics: Theory, Algorithms, and Applications

3D Object Representation

CSE328 Fundamentals of Computer Graphics: Concepts, Theory, Algorithms, and Applications

Overview. Pipeline implementation I. Overview. Required Tasks. Preliminaries Clipping. Hidden Surface removal

Computer Graphics: 8-Hidden Surface Removal

Determination (Penentuan Permukaan Tampak)

VIII. Visibility algorithms (II)

Today. CS-184: Computer Graphics. Lecture #10: Clipping and Hidden Surfaces. Clipping. Hidden Surface Removal

Clipping. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

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

Visibility: Z Buffering

Computer Graphics. Rendering. by Brian Wyvill University of Calgary. cpsc/enel P 1

4.5 VISIBLE SURFACE DETECTION METHODES

(Refer Slide Time 03:00)

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

CS488. Visible-Surface Determination. Luc RENAMBOT

Hidden Surface Elimination: BSP trees

Visible Surface Detection Methods

Visibility and Occlusion Culling

More Visible Surface Detection. CS116B Chris Pollett Mar. 16, 2005.

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

Werner Purgathofer

Visible Surface Determination: Intro

Class of Algorithms. Visible Surface Determination. Back Face Culling Test. Back Face Culling: Object Space v. Back Face Culling: Object Space.

Spatial Data Structures

Spatial Data Structures

VISIBILITY & CULLING. Don t draw what you can t see. Thomas Larsson, Afshin Ameri DVA338, Spring 2018, MDH

Two basic types: image-precision and object-precision. Image-precision For each pixel, determine which object is visable Requires np operations

Spatial Data Structures

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Hidden Surfaces II. Week 9, Mon Mar 15

Clipping & Culling. Lecture 11 Spring Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling

Spatial Data Structures

Hidden-Surface Removal.

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Pipeline Operations. CS 4620 Lecture 10

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Collision Detection based on Spatial Partitioning

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

The University of Calgary

Drawing the Visible Objects

Rendering. Basic Math Review. Rasterizing Lines and Polygons Hidden Surface Remove Multi-pass Rendering with Accumulation Buffers.

Friday, 11 January 13. Object Representation

Lecture 11: Ray tracing (cont.)

CS559: Computer Graphics. Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008

Spatial Data Structures

Renderer Implementation: Basics and Clipping. Overview. Preliminaries. David Carr Virtual Environments, Fundamentals Spring 2005

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

COMP30019 Graphics and Interaction Ray Tracing

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Computer Graphics Shadow Algorithms

More Hidden Surface Removal

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Visualization Concepts

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

Visible-Surface Detection 1. 2IV60 Computer graphics set 11: Hidden Surfaces. Visible-Surface Detection 3. Visible-Surface Detection 2

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

Advanced 3D-Data Structures

THE DEPTH-BUFFER VISIBLE SURFACE ALGORITHM

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

COMP371 COMPUTER GRAPHICS

Intersection Acceleration

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Computer Graphics Geometry and Transform

CS452/552; EE465/505. Clipping & Scan Conversion

CS 488. More Shading and Illumination. Luc RENAMBOT

Lecture 4. Viewing, Projection and Viewport Transformations

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014

Incremental Form. Idea. More efficient if we look at d k, the value of the decision variable at x = k

CS 563 Advanced Topics in Computer Graphics Culling and Acceleration Techniques Part 1 by Mark Vessella

Collision and Proximity Queries

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

The Traditional Graphics Pipeline

Chapter IV Fragment Processing and Output Merging. 3D Graphics for Game Programming

CS4620/5620: Lecture 14 Pipeline

Computer Graphics. - Rasterization - Philipp Slusallek

Graphics and Interaction Rendering pipeline & object modelling

Realtime 3D Computer Graphics Virtual Reality

Real-Time Shadows. André Offringa Timo Laman

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

The Traditional Graphics Pipeline

Binary Space Partition Trees. Overview. Binary Space Partitioning Trees (Fuchs, Kedem and Naylor `80)

Speeding up your game

Computer Graphics Viewing

Transcription:

Visible Surface Determination Visibility Culling Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line 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 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 Page 1 1

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

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 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 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 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) Page 3 3

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 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 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 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? Page 4 4

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 Allows only convex polygons in the scene Grouped into clusters that are linearly separable For any viewpoint, the cluster priority is precomputed 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 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 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 Page 5 5

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 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 Page 6 6