Status – Week 280 Victor Moya. Rasterization Setup triangles. Setup triangles. Fill triangle: Interpolate parameters. Fill triangle: Interpolate parameters.

Slides:



Advertisements
Similar presentations
Computer Graphics- SCC 342
Advertisements

Computer Graphics Tz-Huan Huang National Taiwan University (Slides are based on Prof. Chen’s)
CS 450: COMPUTER GRAPHICS FILLING POLYGONS SPRING 2015 DR. MICHAEL J. REALE.
Polygon Rasterization
10/10/02 (c) 2002 University of Wisconsin, CS 559 Last Time Finished viewing: Now you know how to: –Define a region of space that you wish to view – the.
Informationsteknologi Wednesday, November 7, 2007Computer Graphics - Class 51 Today’s class Geometric objects and transformations.
Introduction to 3D Graphics Lecture 5: From Realism to Real-Time Anthony Steed University College London.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
Gopi -ICS186AW03 - Slide1 Graphics Pipeline: First Pass.
Rasterization May 14, Triangles Only We will discuss the rasterization of triangles only. Why? –Polygon can be decomposed into triangles. –A triangle.
Status – Week 231 Victor Moya. Summary Primitive Assembly Primitive Assembly Clipping triangle rejection. Clipping triangle rejection. Rasterization.
Status – Week 277 Victor Moya.
Status – Week 279 Victor Moya. Rasterization Setup triangles (calculate slope values). Setup triangles (calculate slope values). Fill triangle: Interpolate.
Status – Week 240 Victor Moya. Summary Post Geometry Pipeline. Post Geometry Pipeline. Rasterization. Rasterization. Triangle Setup. Triangle Setup. Triangle.
Status – Week 283 Victor Moya. 3D Graphics Pipeline Akeley & Hanrahan course. Akeley & Hanrahan course. Fixed vs Programmable. Fixed vs Programmable.
Status – Week 281 Victor Moya. Objectives Research in future GPUs for 3D graphics. Research in future GPUs for 3D graphics. Simulate current and future.
Status – Week 239 Victor Moya. Summary Primitive Assembly Primitive Assembly Clipping triangle rejection. Clipping triangle rejection. Rasterization.
Rasterization Foley, Ch: 3. Pixels are represented as disjoint circles centered on uniform grid Each (x,y) of the grid has a pixel Y X (1,1) (1,2) (0,0)
Status – Week 260 Victor Moya. Summary shSim. shSim. GPU design. GPU design. Future Work. Future Work. Rumors and News. Rumors and News. Imagine. Imagine.
Part I: Basics of Computer Graphics Rendering Polygonal Objects (Read Chapter 1 of Advanced Animation and Rendering Techniques) Chapter
Status – Week 227 Victor Moya. Summary How to lose a week. How to lose a week. Rasterization. Rasterization.
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
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.
CS 551 / 645: Introductory Computer Graphics
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
Rasterization Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by David Luebke)
Triangle Scan Conversion. 2 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Rasterization Rasterization (scan conversion) –Determine which.
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
Clipping Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by David Luebke)
CAP4730: Computational Structures in Computer Graphics
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
Drawing Triangles CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
MIT EECS Frédo Durand and Barb Cutler
Introduction to Computer Graphics CS 445 / 645 Lecture 9 Chapter 4: Rasterization L. McMillan MIT notes (Fall ’98)
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner Rasterization.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Chapter III Rasterization
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
11/5/2002 (c) University of Wisconsin, CS 559 Last Time Local Shading –Diffuse term –Specular term –All together –OpenGL brief overview.
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
MIT EECS 6.837, Durand and Cutler The Graphics Pipeline: Line Clipping & Line Rasterization.
Rendering.
Midterm Review. Overall No OpenGL programming questions, but programming pipeline and concepts of important OpenGL functions are required. – Parameter.
2 3D Viewing Process  3D viewing process MC Model Space Model Transformation Model Transformation WC World Space Viewing Transformation Viewing Transformation.
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
Rasterization Overview Raster Display Device. Scan Conversion / Rasterization: converting vector graphics into raster graphics (determining pixels in.
3D Ojbects: Transformations and Modeling. Matrix Operations Matrices have dimensions: Vectors can be thought of as matrices: v=[2,3,4,1] is a 1x4 matrix.
Rasterization, or “What is glBegin(GL_LINES) really doing?” Course web page: February 23, 2012  Lecture 4.
Rendering Pipeline Fall, 2015.
Advanced D3D Programming Sim Dietrich
2.6 Solving Systems of Linear Inequalities
Computer Graphics Filling.
Polygon Fill Flood fill algorithm. The algorithm starts at a pixel and perform a depth first traversal of the adjacent pixels and fills the visited pixel.
Texture Mapping cgvr.korea.ac.kr.
Clipping Polygon Clipping Polygon : Area primitive
3D rezanje 3D Clipping view frustrum clipping planes clipped.
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
Software Rasterization
CSL 859: Advanced Computer Graphics
Lecture 13 Clipping & Scan Conversion
(c) 2002 University of Wisconsin, CS559
3D rezanje 3D Clipping view frustrum clipping planes clipped.
Rasterizing Polygons Lecture 29 Wed, Dec 7, 2005.
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Polygons.
Clipping Polygons Lecture 31 Fri, Nov 9, 2007.
Translation in Homogeneous Coordinates
Presentation transcript:

Status – Week 280 Victor Moya

Rasterization Setup triangles. Setup triangles. Fill triangle: Interpolate parameters. Fill triangle: Interpolate parameters. Parameters: R, G, B, z, r, s, t, q. Parameters: R, G, B, z, r, s, t, q.

Pixel Planes Calculate 3 edge functions: if all the edge functions are positive in a point (x, y) the point is inside the triangle. Calculate 3 edge functions: if all the edge functions are positive in a point (x, y) the point is inside the triangle. E(x, y) = (x – X)dY – (y – Y)dX E(x, y) = (x – X)dY – (y – Y)dX E(x, y) > 0 if (x, y) is to the “right” side. E(x, y) > 0 if (x, y) is to the “right” side. E(x, y) = 0 if (x, y) is exactly on the line. E(x, y) = 0 if (x, y) is exactly on the line. E(x, y) < 0 if (x, y) is to the “left” side. E(x, y) < 0 if (x, y) is to the “left” side. Incrementally: Incrementally: E(x + 1, y) = E(x, y) + dY E(x + 1, y) = E(x, y) + dY E(x, y + 1) = E(x, y) - dX E(x, y + 1) = E(x, y) - dX

Classification (xi, yi) 0 < i <= N (xi, yi) 0 < i <= N (x0, y0) = (xN, yN) (x0, y0) = (xN, yN) dXi = Xi – X(i-1) dXi = Xi – X(i-1) dYi = Yi – Y(i-1) dYi = Yi – Y(i-1) Ei(Xs, Ys) = (Xs – Xi)dYi – (Ys – Yi)dXi Ei(Xs, Ys) = (Xs – Xi)dYi – (Ys – Yi)dXi 0 < i <= N 0 < i <= N E(x + 1, y) = Ei(x, y) + dYi E(x + 1, y) = Ei(x, y) + dYi E(x - 1, y) = Ei(x, y) - dYi E(x - 1, y) = Ei(x, y) - dYi E(x, y + 1) = Ei(x, y) - dYi E(x, y + 1) = Ei(x, y) - dYi E(x, y - 1) = Ei(x, y) + dXi E(x, y - 1) = Ei(x, y) + dXi Ei >= 0 for all 0 = 0 for all 0 < i <= N Traverse the area of the polygon: bounding box or advance to the next line. Traverse the area of the polygon: bounding box or advance to the next line.

Olano and Greer Triangle Scan Conversion using 2D Homogeneous Coordinates Triangle Scan Conversion using 2D Homogeneous Coordinates Based in Pixel Planes (Pineda) approach but using homogeneous coordinates. Based in Pixel Planes (Pineda) approach but using homogeneous coordinates. Avoids the need of clipping. Avoids the need of clipping. Adds a hither edge function. Adds a hither edge function. Perspective correct interpolation. Perspective correct interpolation.

Algorithm To summarize the algorithm: To summarize the algorithm: setup: setup: three edge functions = M-1 three edge functions = M-1 = inverse of 2D homogeneous vertex matrix for each clip edge = inverse of 2D homogeneous vertex matrix for each clip edge clip edge function = dot product test * M-1 clip edge function = dot product test * M-1 interpolation function for 1/w = sum of rows of M-1 interpolation function for 1/w = sum of rows of M-1 for each parameter for each parameter interpolation function = parameter vector * M-1 interpolation function = parameter vector * M-1 pixel processing: pixel processing: interpolate linear edge and parameter functions interpolate linear edge and parameter functions where all edge functions are positive where all edge functions are positive w = 1/(1/w) w = 1/(1/w) for each parameter for each parameter perspective-correct parameter = parameter * w perspective-correct parameter = parameter * w