Computer Graphics II

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

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

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

Visible Surface Detection Methods

Drawing the Visible Objects

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

8. Hidden Surface Elimination

9. Visible-Surface Detection Methods

CEng 477 Introduction to Computer Graphics Fall 2007

Werner Purgathofer

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

Computer Graphics. Bing-Yu Chen National Taiwan University

Computer Graphics: 8-Hidden Surface Removal

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

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

Hidden-Surface Removal.

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

(Refer Slide Time 03:00)

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

4.5 VISIBLE SURFACE DETECTION METHODES

VIII. Visibility algorithms (II)

Hidden surface removal. Computer Graphics

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

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

Spatial Data Structures

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.

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Spatial Data Structures

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

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

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

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

Spatial Data Structures

Visibility: Z Buffering

Spatial Data Structures

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

Spatial Data Structures

Hidden Surface Elimination: BSP trees

Topic #1: Rasterization (Scan Conversion)

Advanced 3D-Data Structures

CS488. Visible-Surface Determination. Luc RENAMBOT

Hidden Surface Removal

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

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

Determination (Penentuan Permukaan Tampak)

Hidden Surfaces II. Week 9, Mon Mar 15

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

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

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

Intro to Modeling Modeling in 3D

Algorithms for GIS:! Quadtrees

Visibility and Occlusion Culling

Computer Graphics Viewing

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

Solid Modeling. Thomas Funkhouser Princeton University C0S 426, Fall Represent solid interiors of objects

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Visibility. Welcome!

CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations

(a) rotating 45 0 about the origin and then translating in the direction of vector I by 4 units and (b) translating and then rotation.

CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination (Total: 100 marks)

The Visibility Problem and Binary Space Partition. (slides by Nati Srebro)

Lecture 4. Viewing, Projection and Viewport Transformations

3D Object Representation

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. Rendering. by Brian Wyvill University of Calgary. cpsc/enel P 1

CS535 Fall Department of Computer Science Purdue University

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

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

The Traditional Graphics Pipeline

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

UNIVERSITY OF WATERLOO Faculty of Mathematics

Computer Graphics. The Two-Dimensional Viewing. Somsak Walairacht, Computer Engineering, KMITL

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

Surface and Solid Geometry. 3D Polygons

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

The Traditional Graphics Pipeline

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

Graphics (Output) Primitives. Chapters 3 & 4

Universiteit Leiden Computer Science

Ray Tracing: Intersection

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

COS 226 Lecture 15: Geometric algorithms. Warning: intuition may mislead (continued)

Color quantization using modified median cut

Speeding up your game

Projection and viewing. Computer Graphics CSE 167 Lecture 4

COMP30019 Graphics and Interaction Ray Tracing

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

The Traditional Graphics Pipeline

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

Rendering. Mike Bailey. Rendering.pptx. The Rendering Equation

From Vertices To Fragments-1

We can use a max-heap to sort data.

High-Dimensional Computational Geometry. Jingbo Shang University of Illinois at Urbana-Champaign Mar 5, 2018

General Hidden Surface Removal Algorithms. Binghamton University. EngiNet. Thomas J. Watson. School of Engineering and Applied Science CS 460/560

MODELING AND HIERARCHY

Visualization Concepts

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

Transcription:

Computer Graphics II Autumn 2017-2018

Outline Visible Surface Determination Methods (contd.) 1 Visible Surface Determination Methods (contd.)

Outline Visible Surface Determination Methods (contd.) 1 Visible Surface Determination Methods (contd.)

Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.)

Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.) Takes advantage of coherence of scene by locating those projection areas (of frame buffer) that represent part of a single surface

Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.) Takes advantage of coherence of scene by locating those projection areas (of frame buffer) that represent part of a single surface Method is applied by recursively dividing entire view plane area into smaller rectangles until a sub-division...

Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.) Takes advantage of coherence of scene by locating those projection areas (of frame buffer) that represent part of a single surface Method is applied by recursively dividing entire view plane area into smaller rectangles until a sub-division... contains projection of part of a single visible surface

Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.) Takes advantage of coherence of scene by locating those projection areas (of frame buffer) that represent part of a single surface Method is applied by recursively dividing entire view plane area into smaller rectangles until a sub-division... contains projection of part of a single visible surface contains no surface projection

Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.) Takes advantage of coherence of scene by locating those projection areas (of frame buffer) that represent part of a single surface Method is applied by recursively dividing entire view plane area into smaller rectangles until a sub-division... contains projection of part of a single visible surface contains no surface projection rectangular area is size of single pixel

Area-Subdivision Method (contd.) Method relies crucially on being able to efficiently test when area is covered by a single surface or that we need to divide and conquer to reduce complexity

Area-Subdivision Method (contd.) Method relies crucially on being able to efficiently test when area is covered by a single surface or that we need to divide and conquer to reduce complexity Starting with entire view (= frame buffer) we recurse by splitting scene into smaller areas if scene too complex (A 1024x1024 pixel viewing area would require 10 levels to reach single pixel.)

Area-Subdivision Method (contd.) Method relies crucially on being able to efficiently test when area is covered by a single surface or that we need to divide and conquer to reduce complexity Starting with entire view (= frame buffer) we recurse by splitting scene into smaller areas if scene too complex At a step of recursion, four possibilities for a surface:

Area-Subdivision Method (contd.) Method relies crucially on being able to efficiently test when area is covered by a single surface or that we need to divide and conquer to reduce complexity Starting with entire view (= frame buffer) we recurse by splitting scene into smaller areas if scene too complex At a step of recursion, four possibilities for a surface:

Area-Subdivision Method (contd.) Method relies crucially on being able to efficiently test when area is covered by a single surface or that we need to divide and conquer to reduce complexity Starting with entire view (= frame buffer) we recurse by splitting scene into smaller areas if scene too complex At a step of recursion, four possibilities for a surface: Surrounding and inside cases are simpler to detect than overlapping and outside cases

Area-Subdivision Method (contd.) No need to recurse further if an area has 1 no inside, overlapping or surrounding surfaces (all surfaces outside) 2 only one inside, overlapping or surrounding surface 3 one surrounding surface that obscures all other surfaces within area Once a single inside, overlapping or surrounding surface is identified surface color values are written to frame buffer So trickiest case, then, is testing for case 3 above

Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces):

Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces): sort surfaces according to min. depth from view plane

Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces): sort surfaces according to min. depth from view plane for each surrounding surface if its max. depth is closer than min. depth of all other surfaces then case 3 applies

Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces): sort surfaces according to min. depth from view plane for each surrounding surface if its max. depth is closer than min. depth of all other surfaces then case 3 applies Approach 2: Alternatively, return to surface plane equations to calculate depth values at the four corners of A for every surface At the corner (x bl, y bl ) of A, depth is z bl = ax bl by bl d c (with a, b, c, d different for every surface)

Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces): sort surfaces according to min. depth from view plane for each surrounding surface if its max. depth is closer than min. depth of all other surfaces then case 3 applies Approach 2: Alternatively, return to surface plane equations to calculate depth values at the four corners of A for every surface If four largest zs all come from the same surrounding surface then this obscures all others

Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces): sort surfaces according to min. depth from view plane for each surrounding surface if its max. depth is closer than min. depth of all other surfaces then case 3 applies Approach 2: Alternatively, return to surface plane equations to calculate depth values at the four corners of A for every surface If four largest zs all come from the same surrounding surface then this obscures all others If one obscuring surface write this to region A of framebuffer

Outline Visible Surface Determination Methods (contd.) 1 Visible Surface Determination Methods (contd.)

BSP-Tree Method Efficient method for determining object visibility by painting surfaces into frame buffer from back to front, like painter s alg. Most useful when view reference point changes but objects in scene are at fixed positions Partitioning planes are usually (structural) polygon facets Some polygons will need to be split into two A/B above We process (paint) the BSP by drawing stuff on far side of hyperplane before near side, where far and near is relative to view point

Octree Method When an octree representation is used for the viewing volume we can identify visible surfaces by searching octree nodes in front-to-back order visit nodes 0 3 before processing back half

Octree Method When an octree representation is used for the viewing volume we can identify visible surfaces by searching octree nodes in front-to-back order This search is performed recursively

Octree Method When an octree representation is used for the viewing volume we can identify visible surfaces by searching octree nodes in front-to-back order This search is performed recursively The frame buffer is drawn in (recursive) quadrants

Octree Method When an octree representation is used for the viewing volume we can identify visible surfaces by searching octree nodes in front-to-back order This search is performed recursively The frame buffer is drawn in (recursive) quadrants As view direction changes, octants are renumbered so that (new) front is again processed first

Comparison of Visibility-Detection Methods Effectiveness depends on characteristics of scene to render If surfaces are widely distributed, with little depth overlap along viewing direction then painter s algorithm (depth-sorting) or BSP-tree method works well But these generally work well only if scene has few surfaces Scan-line method also works well when few surfaces in scene Either of these three methods work effectively for scenes containing up to several thousand polygon surfaces Beyond this, depth-buffer or octree (if this was used for representing viewing volume) is best approach

Comparison of Visibility-Detection Methods (contd.) Depth-buffer works well in scenes with large poly counts because size of surface areas decrease as no. of surfaces increase. So D-B method has poor relative performance for low counts and good relative performance for high counts Octrees have advantage that visibility-detection process is fast and simple: no sorting or intersection calculations required