Visible-Surface Detection Methods

Similar documents
Scan-Line Fill. Scan-Line Algorithm. Sort by scan line Fill each span vertex order generated by vertex list

INTRODUCTION TO RENDERING TECHNIQUES

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

A Short Introduction to Computer Graphics

Introduction to Computer Graphics

Vector storage and access; algorithms in GIS. This is lecture 6

Lezione 4: Grafica 3D*(II)

Computer Graphics. Geometric Modeling. Page 1. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science - Technion. An Example.

Dhiren Bhatia Carnegie Mellon University

2.3 WINDOW-TO-VIEWPORT COORDINATE TRANSFORMATION

The Essentials of CAGD

CATIA V5 Surface Design

Reflection and Refraction

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

Essay 5 Tutorial for a Three-Dimensional Heat Conduction Problem Using ANSYS Workbench

A VOXELIZATION BASED MESH GENERATION ALGORITHM FOR NUMERICAL MODELS USED IN FOUNDRY ENGINEERING

Curves and Surfaces. Goals. How do we draw surfaces? How do we specify a surface? How do we approximate a surface?

Visualization of 2D Domains

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

Pro/ENGINEER Wildfire 4.0 Basic Design

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

COMPUTER GRAPHICS IMPORTANT QUESTION AND ANSWERS. Computer graphics

MASKS & CHANNELS WORKING WITH MASKS AND CHANNELS

Image Synthesis. Transparency. computer graphics & visualization

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

Cabri Geometry Application User Guide

Graphic Design. Background: The part of an artwork that appears to be farthest from the viewer, or in the distance of the scene.

G.H. Raisoni College of Engineering, Nagpur. Department of Information Technology

Seminar. Path planning using Voronoi diagrams and B-Splines. Stefano Martina

Triangulation by Ear Clipping

Data Storage 3.1. Foundations of Computer Science Cengage Learning

SolidWorks Implementation Guides. Sketching Concepts

3D Interactive Information Visualization: Guidelines from experience and analysis of applications

Topology. Shapefile versus Coverage Views

Investigating Area Under a Curve

CATIA Drafting TABLE OF CONTENTS

Exercise: Building and zone geometry import from SketchUp

Visibility Map for Global Illumination in Point Clouds

1. Relational database accesses data in a sequential form. (Figures 7.1, 7.2)

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

Lecture Notes, CEng 477

Learning Module 4 - Thermal Fluid Analysis Note: LM4 is still in progress. This version contains only 3 tutorials.

Computational Geometry. Lecture 1: Introduction and Convex Hulls

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

MMGD0203 Multimedia Design MMGD0203 MULTIMEDIA DESIGN. Chapter 3 Graphics and Animations

TWO-DIMENSIONAL TRANSFORMATION

Creating 2D Drawings from 3D AutoCAD Models

Enhanced LIC Pencil Filter

Binary Space Partitions

Adobe Illustrator CS5 Part 1: Introduction to Illustrator

Introduction to the TI-Nspire CX

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

Visualization and Feature Extraction, FLOW Spring School 2016 Prof. Dr. Tino Weinkauf. Flow Visualization. Image-Based Methods (integration-based)

(a) We have x = 3 + 2t, y = 2 t, z = 6 so solving for t we get the symmetric equations. x 3 2. = 2 y, z = 6. t 2 2t + 1 = 0,

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Raster Data Structures

Lecture 9: Geometric map transformations. Cartographic Transformations

EE602 Algorithms GEOMETRIC INTERSECTION CHAPTER 27

3D Building Roof Extraction From LiDAR Data

Comp 410/510. Computer Graphics Spring Introduction to Graphics Systems

Direct Volume Rendering Elvins

Welcome to CorelDRAW, a comprehensive vector-based drawing and graphic-design program for the graphics professional.

Arrangements And Duality

Volumetric Meshes for Real Time Medical Simulations

CS635 Spring Department of Computer Science Purdue University

CHAPTER 8, GEOMETRY. 4. A circular cylinder has a circumference of 33 in. Use 22 as the approximate value of π and find the radius of this cylinder.

Intersection of a Line and a Convex. Hull of Points Cloud

Computer Graphics Global Illumination (2): Monte-Carlo Ray Tracing and Photon Mapping. Lecture 15 Taku Komura

The following is an overview of lessons included in the tutorial.

Modern Graphics Engine Design. Sim Dietrich NVIDIA Corporation

Working with the BCC Clouds Generator

Number Sense and Operations

Hardware design for ray tracing

3D Scanner using Line Laser. 1. Introduction. 2. Theory

SkillsUSA 2014 Contest Projects 3-D Visualization and Animation

AutoCAD New Icon Quick Reference

CATIA: Navigating the CATIA V5 environment. D. CHABLAT / S. CARO Damien.Chablat@irccyn.ec-nantes.fr

Model Repair. Leif Kobbelt RWTH Aachen University )NPUT $ATA 2EMOVAL OF TOPOLOGICAL AND GEOMETRICAL ERRORS !NALYSIS OF SURFACE QUALITY

Basic Shapes. Most paintings can be broken down into basic shapes. See how this famous painting by Cézanne can be broken down into basic shapes.

Working With Animation: Introduction to Flash

Understand the Sketcher workbench of CATIA V5.

SOEM 024: Computer Aided Design. E. Rozos

A unified representation for interactive 3D modeling

HOW TO LINK AND PRESENT A 4D MODEL USING NAVISWORKS. Timo Hartmann t.hartmann@ctw.utwente.nl

Machine vision systems - 2

HowTo Rhino & ICEM. 1) New file setup: choose Millimeter (automatically converts to Meters if imported to ICEM)

The Flat Shape Everything around us is shaped

PowerPoint: Graphics and SmartArt

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Monte Carlo Path Tracing

DATA VISUALIZATION OF THE GRAPHICS PIPELINE: TRACKING STATE WITH THE STATEVIEWER

VRayPattern also allows to curve geometry on any surface

GIS Data in ArcGIS. Pay Attention to Data!!!

Microsoft Excel 2010 Charts and Graphs

Procedure: Geometrical Optics. Theory Refer to your Lab Manual, pages Equipment Needed

EXPERIMENT 6 OPTICS: FOCAL LENGTH OF A LENS

FREE FALL. Introduction. Reference Young and Freedman, University Physics, 12 th Edition: Chapter 2, section 2.5

SPECIALIZED VISUALIZATION SYSTEMS FOR DIFFERENTIAL GAMES

SolidWorks. SolidWorks Teacher Guide. and Student Courseware

Grade 6 Mathematics Performance Level Descriptors

Transcription:

Visible-Surface Detection Methods Donald Hearn, M. Pauline Baker <Computer Graphics> 2001/08/03

Contents Abstract Introduction Back-Face Detection Depth-Buffer Method A-Buffer Method Scan-Line Method Depth-Sorting Method BSP-Tree Method Area-Subdivision Method Octree Method Ray-Casting Method Image-Space Method vs. Object-Space Method Curved Surfaces Wireframe Methods Summary 2

Abstract Hidden-surface elimination methods Identifying visible parts of a scene from a viewpoint Numerous algorithms More memory - storage More processing time execution time Only for special types of objects - constraints Deciding a method for a particular application Complexity of the scene Type of objects Available equipment Static or animated scene 3 <Ex. Wireframe Displays>

Introduction

Classification of Visible-Surface Detection Algorithms Object-space methods vs. Image-space methods Object definition directly vs. their projected images Most visible-surface algorithms use image-space methods Object-space can be used effectively in some cases Ex) Line-display algorithms Object-space methods Compares objects and parts of objects to each other Image-space methods Point by point at each pixel position on the projection plane 5

Sorting and Coherence Methods To improve performance Sorting Facilitate depth comparisons Ordering the surfaces according to their distance from the viewplane Coherence Take advantage of regularity Epipolar geometry Topological coherence 6

Back-Face Detection

Inside-outside test Korea University A point (x, y, z) is inside a surface with plane parameters A, B, C, and D if Ax + By + Cz + D The polygon is a back face if < 0 V N > 0 N = (A, B, C) V V is a vector in the viewing direction from the eye(camera) N is the normal vector to a polygon surface 8

Advanced Configuration Korea University In the case of concave polyhedron Need more tests Determine faces totally or partly obscured by other faces In general, back-face removal can be expected to eliminate about half of the surfaces from further visibility tests <View of a concave polyhedron with one face partially hidden by other surfaces> 9

Depth-Buffer Method

Characteristics Commonly used image-space approach Compares depths of each pixel on the projection plane Referred to as the z-buffer method Usually applied to scenes of polygonal surfaces Depth values can be computed very quickly Easy to implement Y v S 3 S 2 S 1 (x, y) X v 11 Z v

Depth Buffer & Refresh Buffer Two buffer areas are required Depth buffer Store depth values for each (x, y) position All positions are initialized to minimum depth Usually 0 most distant depth from the viewplane Refresh buffer Stores the intensity values for each position All positions are initialized to the background intensity 12

Algorithm Initialize the depth buffer and refresh buffer depth(x, y) = 0, refresh(x, y) = I backgnd For each position on each polygon surface Calculate the depth for each (x, y) position on the polygon If z > depth(x, y), then set depth(x, y) = z, refresh(x, y) = I surf (x, y) Advanced With resolution of 1024 by 1024 Over a million positions in the depth buffer Process one section of the scene at a time Need a smaller depth buffer The buffer is reused for the next section 13

A-Buffer Method

Characteristics An extension of the ideas in the depth-buffer method The origin of this name At the other end of the alphabet from z-buffer Antialiased, area-averaged, accumulation-buffer Surface-rendering system developed by Lucasfilm REYES(Renders Everything You Ever Saw) A drawback of the depth-buffer method Deals only with opaque surfaces Can t accumulate intensity values for more than one surface Background opaque surface Foreground transparent surface 15

Algorithm(1 / 2) Each position in the buffer can reference a linked list of surfaces Several intensities can be considered at each pixel position Object edges can be antialiased Each position in the A-buffer has two fields Depth field Stores a positive or negative real number Intensity field Stores surface-intensity information or a pointer value d > 0 I d < 0 Surf1 Surf2 Depth Intensity field (a) field Depth field Intensity (b) field <Organization of an A-buffer pixel position : (a) single-surface overlap (b) multiple-surface overlap> 16

Algorithm(2 / 2) If the depth field is positive The number at that position is the depth The intensity field stores the RGB If the depth field is negative Multiple-surface contributions to the pixel The intensity field stores a pointer to a linked list of surfaces Data for each surface in the linked list RGB intensity components Opacity parameters(percent of transparency) Depth Percent of area coverage Surface identifier Pointers to next surface 17

Scan-Line Method

Characteristics Extension of the scan-line algorithm for filling polygon interiors For all polygons intersecting each scan line Processed from left to right Depth calculations for each overlapping surface The intensity of the nearest position is entered into the refresh buffer 19

Tables for The Various Surfaces Edge table Coordinate endpoints for each line Slope of each line Pointers into the polygon table Identify the surfaces bounded by each line Polygon table Coefficients of the plane equation for each surface Intensity information for the surfaces Pointers into the edge table 20

Active List & Flag Active list Contain only edges across the current scan line Sorted in order of increasing x Flag for each surface Indicate whether inside or outside of the surface At the leftmost boundary of a surface The surface flag is turned on At the rightmost boundary of a surface The surface flag is turned off 21

Example Active list for scan line 1 Edge table y v A B E F Scan line 1 AB, BC, EH, and FG S 1 S 2 Scan line 2 Between AB and BC, only H C Scan line 3 the flag for surface S 1 is on D G No depth calculations are necessary x v Intensity for surface S 1 is entered into the refresh buffer Similarly, between EH and FG, only the flag for S 2 is on 22

Example(cont.) For scan line 2, 3 AD, EH, BC, and FG Between AD and EH, only the flag for S 1 is on Between EH and BC, the flags for both surfaces are on Depth calculation is needed Intensities for S 1 are loaded into the refresh buffer until BC Take advantage of coherence Pass from one scan line to next Scan line 3 has the same active list as scan line 2 Unnecessary to make depth calculations between EH and BC 23

Drawback Only if surfaces don t cut through or otherwise cyclically overlap each other If any kind of cyclic overlap is present Divide the surfaces 24

Depth-Sorting Method

Operations Image-space and object-space operations Sorting operations in both image and objectspace The scan conversion of polygon surfaces in image-space Basic functions Surfaces are sorted in order of decreasing depth Surfaces are scan-converted in order, starting with the surface of greatest depth 26

Algorithm Referred to as the painter s algorithm In creating an oil painting First paints the background colors The most distant objects are added Then the nearer objects, and so forth Finally, the foregrounds are painted over all objects Each layer of paint covers up the previous layer Process Sort surfaces according to their distance from the viewplane The intensities for the farthest surface are then entered into the refresh buffer Taking each succeeding surface in decreasing depth order 27

Overlapping Tests Tests for each surface that overlaps with S Easy Difficult The bounding rectangle in the xy plane for the two surfaces do not overlap (1) Surface S is completely behind the overlapping surface relative to the viewing position (2) The overlapping surface is completely in front of S relative to the viewing position (3) The projections of the two surfaces onto the viewplane do not overlap (4) If all the surfaces pass at least one of the tests, none of them is behind S No reordering is then necessary and S is scan converted 28

Overlapping Test Examples Korea University S S x v (1) (2) x v z v z v S S S S z v x v (3) (4) z v x v 29

Surface Reordering If all four tests fail with S Interchange surfaces S and S in the sorted list Repeat the tests for each surface that is reordered in the list S S S S S z v <S S > x v z v <S S, then S S > x v 30

Drawback If two or more surfaces alternately obscure each other Infinite loop Flag any surface that has been reordered to a farther depth It can t be moved again If an attempt to switch the surface a second time Divide it into two parts to eliminate the cyclic loop The original surface is then replaced by the two new surfaces 31

BSP-Tree Method

Characteristics Binary Space-Partitioning(BSP) Tree Determining object visibility by painting surfaces onto the screen from back to front Like the painter s algorithm Particularly useful The view reference point changes The objects in a scene are at fixed positions 33

Process Identifying surfaces inside and outside the partitioning plane Intersected object Divide the object into two separate objects(a, B) P 2 P 1 P 1 C D front back A P 2 P 2 front back front back front back B front back A C B D 34

Area-Subdivision Method

Characteristics Takes advantage of area coherence Locating view areas that represent part of a single surface Successively dividing the total viewing area into smaller rectangles Until each small area is the projection of part of a single visible surface or no surface Require tests Identify the area as part of a single surface Tell us that the area is too complex to analyze easily Similar to constructing a quadtree 36

Process Staring with the total view Apply the identifying tests If the tests indicate that the view is sufficiently complex Subdivide Apply the tests to each of the smaller areas Until belonging to a single surface Until the size of a single pixel Example With a resolution 1024 1024 10 times before reduced to a point 37

Identifying Tests Four possible relationships Surrounding surface Completely enclose the area Overlapping surface Partly inside and partly outside the area Inside surface Outside surface Surrounding Surface Inside Surface No further subdivisions are needed if one of the following conditions is true All surface are outside surfaces with respect to the area Overlapping Surface Outside Surface Only one inside, overlapping, or surrounding surface is in the area A surrounding surface obscures all other surfaces within the area boundaries from depth sorting, plane equation 38

Octree Method

Characteristics Extension of area-subdivision method Projecting octree nodes onto the viewplane Front-to-back order Depth-first traversal The nodes for the front suboctants of octant 0 are visited before the nodes for the four back suboctants The pixel in the framebuffer is assigned that color if no values have previously been stored 6 Only the front colors are loaded 4 5 0 1 40 7 3 2

Displaying An Octree Korea University Map the octree onto a quadtree of visible areas Traversing octree nodes from front to back in a recursive procedure 6 The quadtree representation for the 5 visible surfaces is loaded into the 4 framebuffer 1 0 7 2 3 41 Octants in Space

Ray-Casting Method

Characteristics Based on geometric optics methods Trace the paths of light rays Line of sight from a pixel position on the viewplane through a scene Determine which objects intersect this line Identify the visible surface whose intersection point is closest to the pixel Infinite number of light rays Consider only rays that pass through pixel positions Trace the light-ray paths backward from the pixels Effective visibility-detection method For scenes with curved surfaces 43

Image-Space Method vs. Object-Space Method Korea University Image-Space Method Depth-Buffer Method A-Buffer Method Scan-Line Method Area-Subdivision Method Object-Space Method Back-Face Detection BSP-Tree Method Area-Subdivision Method Octree Methods Ray-Casting Method 44

Curved Surfaces

Abstract Effective methods for curved surfaces Ray-casting Octree methods Approximate a curved surface as a set of plane, polygon surfaces Use one of the other hidden-surface methods More efficient as well as more accurate than using ray casting and the curved-surface equation 46

Curved-Surface Representations Implicit equation of the form Parametric representation Explicit surface equation Useful for some cases f ( x, y, z) = z = A height function over an xy ground plane Scan-line and ray-casting algorithms f ( x, y) Involve numerical approximation techniques 0 47

Surface Contour Plots Korea University Display a surface function with a set of contour lines that show the surface shape Useful in math, physics, engineering,... With an explicit representation Plot the visible-surface contour lines To obtain an xy plot y = f ( x, z) Plotted for values of z Using a specified interval z 48 <Color-coded surface contour plot>

Wireframe Methods

Characteristics In wireframe display Visibility tests are applied to surface edges Visible edge sections are displayed Hidden edge sections can be eliminated or displayed differently from the visible edges Procedures for determining visibility of edges Wireframe-visibility(Visible-line detection, Hidden-line detection) methods 50

Wireframe Visibility Methods Compare each line to each surface Direct approach to identifying the visible lines Depth values are compared to the surfaces Use coherence methods No actual testing each coordinate With depth-sorting Interiors are in the background color Boundaries are in the foreground color Processing the surfaces from back to front Hidden lines are erased by the nearer surfaces 51

Summary

Comparison(1 / 2) Back-face detection methods Fast and effective as an initial screening Eliminate many polygons from further visibility tests In general, this can t completely identify all hidden surfaces Depth-buffer(z-buffer) method Fast and simple Two buffers Refresh buffer for the pixel intensities Depth buffer for the depth of the visible surface 53

Comparison(2 / 2) A-buffer method An improvement on the depth-buffer approach Additional information Antialiased and transparent surfaces Other visible-surface detection schemes Scan-line method Depth-sorting method(painter s algorithm) BSP-tree method Area subdivision method Octree methods Ray casting 54