CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 The Mystic Z Values.

Slides:



Advertisements
Similar presentations
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Advertisements

Computer Graphics Lecture 8 Arbitrary Viewing II: More Projection, Clipping and Mathematics of 3D Viewing.
CECS461 Computer Graphics II University of Missouri at Columbia Hidden Surface Removal.
Projection Matrices CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Texture Mapping II April 10, 2003.
Based on slides created by Edward Angel
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics February 26, 2007.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics May 3, 2007.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics April 19, 2007.
Viewing and Projections
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
Projection Matrices Ed Angel
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 5: Viewing
CS 4731: Computer Graphics Lecture 19: Shadows Emmanuel Agu.
Lecture 16 CSE 331 Oct 9, Announcements Hand in your HW4 Solutions to HW4 next week Remember next week I will not be here so.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Adv. Computer Graphics CS6500, Spring 2003.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Texture Mapping.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Acceleration of Rendering.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Space Partitions.
Introduction to OpenGL. What is OpenGL OpenGL is a low-level software interface to graphics hardware No commands for performing windowing tasks or obtaining.
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CS 4731: Computer Graphics Lecture 11: 3D Viewing Emmanuel Agu.
1 Session-13 CSIT 121 Spring 2006 Test-1 is on March 9 th ; Demo-5 due date extended to March 7 Test-1 is on March 9 th ; Demo-5 due date extended to.
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
INTRO TO COMPUTER GRAPHICS TEXT EDWARD ANGEL: EDITION 5 CS770/870
Advanced Computer Graphics March 06, Grading Programming assignments Paper study and reports (flipped classroom) Final project No written exams.
02/26/02 (c) 2002 University of Wisconsin, CS 559 Last Time Canonical view pipeline Orthographic projection –There was an error in the matrix for taking.
1 Projection Matrices. 2 Objectives Derive the projection matrices used for standard OpenGL projections Introduce oblique projections Introduce projection.
2 COEN Computer Graphics I Evening’s Goals n Discuss the mathematical transformations that are utilized for computer graphics projection viewing.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
2/24/04© University of Wisconsin, CS559 Spring 2004 Last Time 3D Transformations –Most are natural extensions of 2D transforms –Rotations can be represented.
CS-378: Game Technology Lecture #2.1: Projection Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
Graphics Systems and OpenGL. Business of Generating Images Images are made up of pixels.
Foundations of Computer Graphics (Fall 2012) CS 184, Lectures 13,14: Reviews Transforms, OpenGL
CS 3043 Social Implications Of Computing 10/19/2015© 2008 Keith A. Pray 1 Class 7 Intellectual Property Keith A. Pray Instructor socialimps.keithpray.net.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Lecture 6: 3D graphics Concepts 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271 
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 5.
10/3/02 (c) 2002 University of Wisconsin, CS 559 Last Time 2D Coordinate systems and transformations.
CS2910 Week 1, Class 2 Today Announce Prof. Michael Vieau’s S-341 6p Thurs Wk 2 Assignment for tomorrow Data Encoding, Part 1 Parsing Data Muddiest Point.
CS 480/680 Computer Graphics Programming with Open GL Part 6: Three Dimensions Dr. Frederick C Harris, Jr. Fall 2011.
Lecture 4.2: Hash Functions: Design* CS 436/636/736 Spring 2012 Nitesh Saxena * some slides borrowed from Gene Tsudik.
CS559: Computer Graphics Lecture 9: Rasterization Li Zhang Spring 2008.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
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
CS5500 Computer Graphics April 23, Today’s Topic Details of the front-end of the 3D pipeline: –How to construct the viewing matrix? –How to construct.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Wednesday, March 1, 2000 William H. Hsu Department.
SE 313 – Computer Graphics and Visual Programming Lecture 3: OpenGL and glut Lecturer: Gazihan Alankuş Please look at the last slides for assignments (marked.
CS 325 Introduction to Computer Graphics 03 / 10 / 2010 Instructor: Michael Eckmann.
1 Computer Graphics Week11 : Hidden Surface Removal.
CS5500 Computer Graphics March 20, Computer Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts.
CSE 167 [Win 17], Lecture 5: Viewing Ravi Ramamoorthi
Week 2 - Friday CS361.
3D Computer Graphics (3080/GV10) Week 5-6 Tutorial 3
CENG 477 Introduction to Computer Graphics
Projections and Normalization
Introduction to Computer Graphics with WebGL
Isaac Gang University of Mary Hardin-Baylor
Last Time Canonical view pipeline Projection Local Coordinate Space
Interactive Computer Graphics Viewing
CS5500 Computer Graphics April 24, 2006.
Introduction to Computer Graphics
Presentation transcript:

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 The Mystic Z Values

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Today’s Short Film Special Effects in A.I.

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Announcement Assignment 1 still due on March 5. Volunteers wanted for paper presentations on March 18 & 25: –2 presentations each date. –+5 bonus for presentation grades. –Paper list to be posted next week.

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Z Buffer THE choice of hidden surface removal algorithms in computer graphics. Also called “Depth Buffer.” Note that Z  distance.

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 “So, Where are the problem?” The Z values in OpenGL depth buffer are not exactly the Z in world space (or eye space). For example, gluPerspective in the next slide:

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Projection Matrix gluPerspective(fovY, aspect, Zn, Zf) produces projection matrix of: [A000] [0f00] [00BC] [00-10] Where B = (Zf+Zn)/(Zn-Zf), C=2*Zf*Zn/(Zn-Zf) So Z buffer will get B*Z + C

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Why Not Just Use Z? We want Z to be within 0 and 1. So it may be represented in fewer bits (such as 16-bit or 24-bit Z values).

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 A Derivation: Step (0) Ys/D=Y/(Z+D), If we let Ws=(Z+D)/D, then Ys=Y/Ws and Zs=Z/Ws. Exercise: What is the projection matrix? Z Y D Ys

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Step (1): Move the eye to Z=0 Ys=Y/(Z/D), Ws=Z/D, so Zs=(Z-D)/Ws Exercise: What is the projection matrix? Z Y D Ys

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 A Derivation: Step (2) Now, we want to map Zn  0 and Zf  1. If the matrix is: [1000] [0100] [00AB] [001/D0] Then: A*Zn+B=0, A*Zf+B=Zf/D. Exercise: What are A and B?

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 References Chapter 18 of “Jim Blinn's Corner: A Trip Down the Graphics Pipeline” Kenny Hoff’s Note on “Deriving the OpenGL Perspective Depth Transformmation” Steve Baker, “Learning to Love your Z-buffer”