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

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

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

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

Computer Graphics. Bing-Yu Chen National Taiwan University

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

Computer Graphics II

CEng 477 Introduction to Computer Graphics Fall 2007

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Werner Purgathofer

Visible Surface Detection Methods

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

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

9. Visible-Surface Detection Methods

8. Hidden Surface Elimination

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

Hidden Surface Removal

Visibility: Z Buffering

4.5 VISIBLE SURFACE DETECTION METHODES

Computer Graphics: 8-Hidden Surface Removal

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

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

8. Hidden Surface Elimination

VIII. Visibility algorithms (II)

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

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

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

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

Determination (Penentuan Permukaan Tampak)

Hidden surface removal. Computer Graphics

Spatial Data Structures

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

Spatial Data Structures

CS488. Visible-Surface Determination. Luc RENAMBOT

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

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

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

Spatial Data Structures

Hidden Surface Elimination: BSP trees

Spatial Data Structures

(Refer Slide Time 03:00)

Visibility and Occlusion Culling

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

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

CHAPTER 1 Graphics Systems and Models 3

Visible Surface Determination: Intro

Spatial Data Structures

Drawing the Visible Objects

Advanced 3D-Data Structures

Z-Buffer hold pixel's distance from camera. Z buffer

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

Computer Graphics Viewing

The Traditional Graphics Pipeline

Topic #1: Rasterization (Scan Conversion)

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines

3D Object Representation

CMSC 435 Introductory Computer Graphics Pipeline. Announcements

The Traditional Graphics Pipeline

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

Graphics and Interaction Rendering pipeline & object modelling

Recursive Ray Tracing. Ron Goldman Department of Computer Science Rice University

Graphics (Output) Primitives. Chapters 3 & 4

Ray Tracing: Intersection

Real-Time Shadows. André Offringa Timo Laman

The Traditional Graphics Pipeline

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

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

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

OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS

Triangle Rasterization

3D Rasterization II COS 426

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

COMP371 COMPUTER GRAPHICS

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer

Hermite Curves. Hermite curves. Interpolation versus approximation Hermite curve interpolates the control points Piecewise cubic polynomials

Hierarchical Polygon Tiling with Coverage Masks

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

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

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

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Ray Tracing Acceleration Data Structures

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

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Computer Graphics Shadow Algorithms

More Hidden Surface Removal

MODELING AND HIERARCHY

CS 352: Computer Graphics. Hierarchical Graphics, Modeling, And Animation

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

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

these real phenomena because in Computer Graphics we know that we are creating reality.

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

Rasterization. MIT EECS Frédo Durand and Barb Cutler. MIT EECS 6.837, Cutler and Durand 1

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Course Title: Computer Graphics Course no: CSC209

Visualization Concepts

Announcements. Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class. Computer Graphics

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

Hidden Surfaces II. Week 9, Mon Mar 15

Painter s HSR Algorithm

CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination

Transcription:

Visible Surface Detection Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts Two approaches: 1. Object space methods 2. Image space methods Two main strategies: 1. Sorting 2. Coherence

Visible Surface Detection Algorithms: 1. Back face detection 2. Z buffer 3. A buffer 4. Scan line method 5. Painter s algorithm 6. BSP tree method 7. Area subdivision method 8. Octree methods 9. Ray casting method 10. Wireframe methods Back face detection V N1 N2 V N1 > 0 V N2 < 0

Z buffer most widely used simple to implement use a depth buffer with the same resolution as the image buffer scanconvert each polygon and compare the z value of each resulting pixel with the value stored in the z buffer Undate the image buffer only when the new z value is smaller than the saved z value z2 z1

Z buffer (cont d) z values can be calculated incrementally y y 1 x x+1 Ax + By + Cz + D = 0 z = A(x+1) By D C = z A C top y scan line 1 x = x m A(x (1/m)) B(y 1) D z = C bottom A/m + B = z + C

Z buffer (cont d) Large amount of memory space is needed. What to do if short of memory space? Aliasing problem! Handle only opaque surfaces Other use of z buffer

A buffer (antialiased, area average, accumulation buffer) deal with non opaque surfaces more than one surface intensity can be taken into consideration at each pixel position depth intensity depth S1 S2 S3 Each surface data field includes: RGB intensity components opacity parameter (percent of transparency) depth surface identifier percent of area coverage other surface rendering parameters

Scan Line Algorithm: combine polygon scan conversion with hidden surface removal scanline by scanline rather than polygon by polygon i j c a b A B d perform depth calculation only when more than one polygon intersects with the current scanline require sophisticated data structures to quickly locate the polygon/edges intersecting with current scanline

Painter s algorithm: depth sort the polygons an object space algorithm analogous to the way an oil painter might render a scene scan convert polygons in back to front order How to depth sort? 1. sort all polygons according to the minimum z coordinate of each 2. resolve any ambiguities this may cause when polygons z extents overlap (splitting polygons if necessary) p1 p1 p2 zmin zmax xmax p2 xmin

p2 p1 p1 p2 Five tests 1. do the polygons x extents not overlap? 2. do the polygons y extents not overlap? 3. Is P1 entirely on the opposite side of P2 plane from the view point 4. Is p2 entirely on the same side of P1 s plane as the viewpoint? 5. Do the projections of the polygons onto the xy plane not overlap? Troublesome situations: Cyclic overlap Piercing polygon

BSP tree Method binary space partitioning tree storing relative positioning information 2 3 A 4 B C B D C 1 5 D 1 A 2 3 4 5 applicable to data of arbitrary dimensions at each stage, the space is partitioned into two parts of arbitrary size each subdivision plane (or line) can have an arbitrary orientation view dependent operations can be applied apropriately to the resulting two half spaces

Area Subdivision (Warnock s algorithm) try to make an easy decision about which polygon is visible in a section of the image. If a decision cannot be made, subdivide the area recursively until one can be made. work at image precision for subdivision, and at object precision for depth comparison

For each area do the following tests 1. are all polygons disjoint from area? if yes, display background color 2. only one intersecting or contained polygon. if yes, fill with background color, and then draw contained polygon or intersecting portion 3. one single surrounding polygon, no intersecting or contained polygons. if yes, draw area with that polygon s color 4. more than one polygon is intersecting, contained in, or surrounding, but only one polygon is surrounding the area and is in front of others if yes draw area with that front polygon s color 5. otherwise, subdivide the area into 4 equal areas and recurse surrounding intersecting contained disjoint

1 2 5 2 4 3 3

Octree Methods an octree is constructed by recursively partitioning the space into eight subspaces each of which is called an octant. regular partitioning spatial presorted and octants can be visited with a tree traversal back to front or front to back hierarchical Z buffering for occlusion culling

Ray casting Method as a visibility detection method only cast rays from pixel positions along the projection path effective for scene with curved surfaces COP computing intersections e.g.: x =x0+t(x1 x0) y=y0+t(y1 y0) z=z0+t(z1 z0) 2 2 2 2 (x a) + (y b) + (z c) = r

Wireframe Methods for drawing polygon mesh, computational mesh, outline of an object, illustration,... may still want to draw the hidden lines! visibility testing can be achieved with variations of clipping methods and other visible surface methods

Coherence the degree to which parts of an environment or its projection exhibit local similarities Object coherence 2 entirely separated objects can be compared at the object level Face coherence surface properties typically vary smoothly across a face Edge coherence an edge may change visibility only where it crosses behind a visible edge or penetrates a face Scan line coherence the set of visible object spans determined for consecutive scanlines are often the same Area coherence a group of adjacent pixels is often covered by the same visible face Depth coherence adjacent parts of the same surface are typically close in depth Frame coherence two consecutive frames are likely to be similar