Www.compaq.com Tiled Polygon Traversal Using Half-Plane Edge Functions Joel McCormack & Bob McNamara.

Slides:



Advertisements
Similar presentations
Three-dimensional Shapes (3D)
Advertisements

Line clipping: Line clipping algorithm is method of eliminate lines of outside area of the object,so outside of object viewing is Removed. Typically, any.
Planar Orientations Chapter 4 ( ) in the book Written By: Tomer Heber.
Tessellations.
CSE 681 Bounding Volumes. CSE 681 Bounding Volumes Use simple volume enclose object(s) tradeoff for rays where there is extra intersection test for object.
Caching Strategies for Textures Paul Arthur Navratil.
Hidden Surface Removal Why make the effort?  Realistic models.  Wasted time drawing. OpenGL and HSR  OpenGL does handle HSR using the depth buffer.
I. The Problem of Molding Does a given object have a mold from which it can be removed? object not removable mold 1 object removable Assumptions The object.
Line Clipping Algorithms. A Cases for Clipping Lines E B H C G J I clip rectangle 2Prepared by Narendra V G CSE MIT.
Computer Graphics Viewing.
Viewing & Clipping In 2D. 2 of 44 Contents Windowing Concepts Clipping –Introduction –Brute Force –Cohen-Sutherland Clipping Algorithm Area Clipping –Sutherland-Hodgman.
CMPE 466 COMPUTER GRAPHICS Chapter 8 2D Viewing Instructor: D. Arifler Material based on - Computer Graphics with OpenGL ®, Fourth Edition by Donald Hearn,
Classes of Polygons Planar polygons Non-planar polygons Simple
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
Intersections. Intersection Problem 3 Intersection Detection: Given two geometric objects, do they intersect? Intersection detection (test) is frequently.
Query Processing in Databases Dr. M. Gavrilova.  Introduction  I/O algorithms for large databases  Complex geometric operations in graphical querying.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Interpolation Clipping.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Implementation Dr. Amy Zhang. Reading 2  Hill, Chapters  Hill, Chapter 10.
Binary Image Compression Using Efficient Partitioning into Rectangular Regions IEEE Transactions on Communications Sherif A.Mohamed and Moustafa M. Fahmy.
Status – Week 231 Victor Moya. Summary Primitive Assembly Primitive Assembly Clipping triangle rejection. Clipping triangle rejection. Rasterization.
Status – Week 226 Victor Moya. Summary Recursive descent. Recursive descent. Hierarchical Z Buffer. Hierarchical Z Buffer.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Status – Week 207 Victor Moya. Summary Z Test box. Z Test box. Z Compression. Z Compression. Z Cache. Z Cache. Stencil. Stencil. HZ Box. HZ Box. HZ Test.
Now Playing: California Stars Billy Bragg & Wilco from Mermaid Avenue
© 2004 Tomas Akenine-Möller1 Shadow Generation Hardware Vision day at DTU 2004 Tomas Akenine-Möller Lund University.
The Art Gallery Problem
Graphics Pipeline Clipping CMSC 435/634. Graphics Pipeline Object-order approach to rendering Sequence of operations – Vertex processing – Transforms.
1 A Novel Page-Based Data Structure for Interactive Walkthroughs Behzad Sajadi Yan Huang Pablo Diaz-Gutierrez Sung-Eui Yoon M. Gopi.
Photoshop Backgrounds, Buttons, Banners & Animation In PowerPoint Presentations.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
CGMB 314 Intro to Computer Graphics Fill Area Primitives.
9/7/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries Carola Wenk.
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Triangle Scan Conversion. 2 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Rasterization Rasterization (scan conversion) –Determine which.
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
Ch. 6 - Approximation via Reweighting Presentation by Eran Kravitz.
Splitting a Face Point edge already split new vertex two new faces one new vertex six new half-edges.
Using A Protractor Click on the right arrow to advance
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
Time Parallel Simulations I Problem-Specific Approach to Create Massively Parallel Simulations.
Arrangements and Duality Motivation: Ray-Tracing Fall 2001, Lecture 9 Presented by Darius Jazayeri 10/4/01.
Introduction to Computer Graphics CS 445 / 645 Lecture 9 Chapter 4: Rasterization L. McMillan MIT notes (Fall ’98)
10/15/02 (c) 2002 University of Wisconsin, CS559 Who Am I? Prof Stephen Chenney These notes will be online after the lecture – in fact they’re online already.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner Rasterization.
Virtual Light Field Group University College London Ray Tracing with the VLF (VLF-RT) Jesper Mortensen
Real Time Nonphotorealistic Rendering. How to achieve real time NPR? Economy of line: present a lot of information with very few strokes. Silhouettes.
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
How to identify complex events in the real world First part : Vision –Image segmentation –Checking for basic events : touching, intersecting, moving, pointing,
Polygon Triangulation
Year 5 - Numeracy Title page..
CMPS 3130/6130 Computational Geometry Spring 2017
3. Polygon Triangulation
Computer Graphics Clipping.
Address – 32 bits WRITE Write Cache Write Main Byte Offset Tag Index Valid Tag Data 16K entries 16.
Introduction to Polygons
Fill Area Algorithms Jan
Graphics Pipeline Clipping
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
The Art Gallery Problem
The Art Gallery Problem
Polygon Triangulation
Depth Estimation via Sampling
PMC and Booleans Point-Membership Classification
Lecture 13 Clipping & Scan Conversion
Rasterizing Polygons Lecture 29 Wed, Dec 7, 2005.
Clipping University of British Columbia CPSC 314 Computer Graphics
Clipping Polygons Lecture 31 Fri, Nov 9, 2007.
Presentation transcript:

Tiled Polygon Traversal Using Half-Plane Edge Functions Joel McCormack & Bob McNamara

What Do You Want To Do?  Partition screen into rectangular tiles  Visit all locations in triangle in one tile before any in the next tile

Why Do You Want To Do That?  Improve frame buffer memory access patterns DRAM access to open page faster than non-open page Staying on open page improves average access time... …and improves prefetching of pages into other banks  Improve texture cache access patterns Staying within limited area increases cache hits by exploiting 2D spatial coherency of texel accesses

Outline  Half-Plane Edge Functions  Fragment Stamp and Movement  A Simple Traversal Algorithm  A Tiling Traversal Algoriththm  Uses of Tiling and Even Metatiling  Conclusions

Half-Plane Edge Functions  Many rasterizers traverse polygons by surrounding them with edge functions going from vertex to vertex  E 01 ( x, y ) = ( x – x 0 )( y 1 – y 0 ) – ( y – y 0 )( x 1 – x 0 ) splits 2D plane into two halves: Non-negative on or to right of edge Negative to left of edge  If all edge functions at (x, y ) have same sign, then ( x, y ) is within polygon

Triangle Surrounded By Edge Functions  Non-negative half-planes have “shadow” lines  All three edges non-negative in shaded yellow area

Zen and the Art of Polygon Traversal  Scanline traversal like being in the military: Start exactly right here Go exactly to there, then stop Repeat  Half-plane traversal more like Zen wandering to enlightenment: Where am I? Where can I go? Have I reached my limits? Okay, how about that away? (For now.)

Fragment Stamp: Fragment Sample Points and Probe Points   marks sample point: is fragment inside object?   marks probe point: combine to determine if more object to left, right, above, below?

Fragment Stamp: Which Adjacent Stamp Positions Are Valid?  Does a stamp segment, e.g. ( RB, LB ), intersect the object (and thus indicate valid adjacent position)?  Probably, if: Each edge contains at least one stamp segment endpoint Object’s bounding box contains at least one stamp segment endpoint

Non-Tiling Traversal Example 0. Traverse first stampline 1. Traverse stamplines above 2. Traverse stamplines below Zen, yeah right. Looks like goofy scanline traversal

A Non-Tiling Traversal Algorithm Starting at leftmost vertex Proceed right as long as valid position Save first valid up position Save first valid down position 1. Jump to saved up, proceed right as long as valid Save first valid up, repeat 1 until no more up 2. Jump to saved down, proceed right as long as valid Save first valid down, repeat 2 until no more down

Tiling Traversal Observations  Easy to obey top and bottom tile boundaries Go down from initial scanline until hit tile bottom Then do original algorithm starting at Step 1 (go up)  Need new saved state to obey right tile boundary Original algorithm, but stop at right tile boundary, and save first right position in next tile over Traverse all of object in first tile column Then move to saved right position and restart algorithm  Combine both to obey all tile boundaries

Tiling Traversal Example 0. Traverse first stampline in tile ½. Traverse stamplines below in same tile 1. Traverse stamplines above in tile column 2. Traverse stamplines below in tile column (then next column) Let’s see a grubby scanline algorithm do that!

A Tiling Traversal Algorithm 0. Proceed right as long as valid position and in same tile Save first valid up and down positions ½. Jump to saved down, proceed right in same tile Save first valid down, repeat ½ while down in same tile 1. Jump to saved up, proceed right in same tile Save first valid up, repeat 1 until no more up 2. Jump to saved down, proceed right in same tile Save first valid down, repeat 2 until no more down 3. Jump to saved right (in new tile), go back to Step 0

Obvious Uses for Tiling  Optimize frame buffer access patterns Tile size & dimensions match 2D page in frame buffer All positions in object & page visited before new page Increases available time to prefetch next page Serpentine variation reduces non-prefetchable crossings  Reduce texture cache miss rate Tile size related to texture cache size Tile dimensions long and skinny to minimize texture fetches that will suffer capacity misses

Subset Metatiling  Visit all location in tile before next tile, and all tiles in metatile before next metatile  Requires three additional save states, though

Subset Metatiling Uses  Optimize hierarchical frame buffer caching Mitsubishi 3D-RAM has two cache levels  Optimize hierarchical texture caches  Or optimize frame buffer access and texture cache access simultaneously

Non-Subset Metatiling  Tiles not contained by metatiles  Visit all locations in tile also in metatile before new tile

Conclusions  Tiling is easy to add to a half-plane based rasterizer  Tiling increases frame buffer memory efficiency  Tiling increases effectiveness of texture cache  Scanline rasterizers should die a quiet death