3D Computer Graphics (3080/GV10) Week 5-6 Tutorial 3

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Goals of the course: 1. to introduce real-time 3D graphics programming with openGL.
Graphics Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
GRAFIKA KOMPUTER ~ M. Ali Fauzi.
Projection Matrix Tricks Eric Lengyel Outline  Projection Matrix Internals  Infinite Projection Matrix  Depth Modification  Oblique Near Clipping.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Viewing/Projections I.
CHAPTER 4 Geometric Transformations: The Pipeline Vivian by Richard S. Wright Jr.
Projection Matrices CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Based on slides created by Edward Angel
Viewing and Transformation
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Computer Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Projection Matrices Ed Angel
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 5: Viewing
Viewing Doug James’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals of Computer Graphics, Chap 7 Wen-Chieh (Steve) Lin Institute of Multimedia.
4.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 4 Projection Clipping Viewport Transformation.
OpenGL (II). How to Draw a 3-D object on Screen?
CS 4731: Computer Graphics Lecture 11: 3D Viewing Emmanuel Agu.
Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee.
Viewing and Projections
OpenGL Matrices and Transformations Angel, Chapter 3 slides from AW, Red Book, etc. CSCI 6360.
The Viewing Pipeline (Chapter 4) 5/26/ Overview OpenGL viewing pipeline: OpenGL viewing pipeline: – Modelview matrix – Projection matrix Parallel.
1 Projection Matrices. 2 Objectives Derive the projection matrices used for standard OpenGL projections Introduce oblique projections Introduce projection.
GRAFIKA KOMPUTER ~ M. Ali Fauzi. Drawing 2 D Graphics.
Foundations of Computer Graphics (Fall 2012) CS 184, Lectures 13,14: Reviews Transforms, OpenGL
University of Palestine Computer Graphics ITGD3107 Prepare: Mohammed J. el-masre Nidal M. El-Borbar Supervision:
Computer Graphics Bing-Yu Chen National Taiwan University.
Computer Graphics I, Fall 2010 Computer Viewing.
Games Development 1 Camera Projection / Picking CO3301 Week 8.
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
OpenGL Viewing and Modeling Transformation Geb Thomas Adapted from the OpenGL Programming Guidethe OpenGL Programming Guide.
CS 445 / 645 Introduction to Computer Graphics Lecture 10 Camera Models Lecture 10 Camera Models.
Computer Graphics Camera Projection / Picking CO2409 Week 8 - Optional Advanced Material Not on Exam.
Viewing and Transformation. Pixel pipeline Vertex pipeline Course Map Transformation & Lighting Primitive assembly Viewport culling & clipping Texture.
The Camera Analogy ► Set up your tripod and point the camera at the scene (viewing transformation) ► Arrange the scene to be photographed into the desired.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 5: Viewing
©2005, Lee Iverson Lee Iverson UBC Dept. of ECE EECE 478 Viewing and Projection.
Viewpoints and Transformations CSIS 5838: Graphics and Animation for Gaming.
Taxonomy of Projections FVFHP Figure Taxonomy of Projections.
Viewing and Projection
Chap 3 Viewing and Transformation
Viewing and Projection
CIS 681 Review: OpenGL. CIS 681 Command Syntax OpenGL commands start with a gl. This is followed by the base command such as Color. Followed by the number.
CS5500 Computer Graphics March 20, Computer Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Computer Viewing Isaac Gang University of Mary Hardin-Baylor.
OpenGL LAB III.
CS380 LAB II OpenGL Donghyuk Kim Reference1. [OpenGL course slides by Rasmus Stenholt] Reference2. [
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Viewing/Projections I.
OpenGL Matrices and Transformations Angel, Chapter 3 slides from AW, Red Book, etc. CSCI 6360/4360.
Viewing.
Computer Viewing.
CSE 167 [Win 17], Lecture 5: Viewing Ravi Ramamoorthi
Isaac Gang University of Mary Hardin-Baylor
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
CSCE 441 Computer Graphics 3-D Viewing
Reference1. [OpenGL course slides by Rasmus Stenholt]
Projections and Normalization
CSL 859: Advanced Computer Graphics
Computer Graphics (Spring 2003)
Isaac Gang University of Mary Hardin-Baylor
Chap 3 Viewing Pipeline Reading:
University of New Mexico
Computer Graphics Computer Viewing
Viewing/Projections I Week 3, Fri Jan 25
Computer Viewing Ed Angel Professor Emeritus of Computer Science
Transformation Back-face culling View frustum culling
Presentation transcript:

3D Computer Graphics (3080/GV10) Week 5-6 Tutorial 3 Andrew Cox

OpenGL Transformation Pipeline ModelView Matrix Camera Space Projection Matrix Object Space Homogeneous Clip Space Perspective Divide Normalized Device Coordinates Viewport Transform Viewport Coordinates Slide adapted from Eric Lengyel [1]

OpenGL Perspective Projection Matrix n, f = distances to near, far planes e = focal length = 1 / tan(FOV / 2) a = viewport height / width Picks up viewspace z and places negated in w: division by Z gives perspective Slide adapted from Eric Lengyel [1]

Slide courtesy of Eric Lengyel [1]

Matrix Multiplication and Concatenation

Order of OpenGL Transformations OpenGL calls define a matrix, then concatenate it with existing one Transformations applied in reverse of lexical program order

Matrix Modes GL tracks two matrix stacks Projection ModelView The matrix applied to vertices is The matrix commands apply to the current mode: glMatrixMode(GL_PROJECTION); glMatrixMode(GL_MODELVIEW);

glLoadIdentity() Matrix commands are concatenated with matrix of current mode Includes gluPerspective () etc. Clear out current matrix with glLoadIdentity()

References Eric Lengyel, Projection Matrix Tricks, Game Developers Conference 2007, <http://www.terathon.com/lengyel/>.