Viewing. Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Similar documents
Models and The Viewing Pipeline. Jian Huang CS456

Projection: Mapping 3-D to 2-D. Orthographic Projection. The Canonical Camera Configuration. Perspective Projection

CSC 305 The Graphics Pipeline-1

CS230 : Computer Graphics Lecture 6: Viewing Transformations. Tamar Shinar Computer Science & Engineering UC Riverside

CSE452 Computer Graphics

Computer Graphics. Ch 6. 3D Viewing

Drawing in 3D (viewing, projection, and the rest of the pipeline)

Geometry: Outline. Projections. Orthographic Perspective

Viewing. Reading: Angel Ch.5

Rigid Body Motion and Image Formation. Jana Kosecka, CS 482

Drawing in 3D (viewing, projection, and the rest of the pipeline)

Prof. Feng Liu. Fall /19/2016

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Camera Model and Calibration

Drawing in 3D (viewing, projection, and the rest of the pipeline)

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes

3D Graphics for Game Programming (J. Han) Chapter II Vertex Processing

One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface

Viewing COMPSCI 464. Image Credits: Encarta and

CSE328 Fundamentals of Computer Graphics

Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline

Classical and Computer Viewing. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico

Computer Graphics. P05 Viewing in 3D. Part 1. Aleksandra Pizurica Ghent University

CMSC427 Transformations II: Viewing. Credit: some slides from Dr. Zwicker

CS4670: Computer Vision

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

Projection and viewing. Computer Graphics CSE 167 Lecture 4

Chapter 8 Three-Dimensional Viewing Operations

CS 563 Advanced Topics in Computer Graphics Camera Models. by Kevin Kardian

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Three-Dimensional Viewing Hearn & Baker Chapter 7

Rasterization Overview

Computer Graphics 7: Viewing in 3-D

Lecture 4. Viewing, Projection and Viewport Transformations

GEOMETRIC TRANSFORMATIONS AND VIEWING

Announcements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard

Overview. By end of the week:

3D Viewing. CS 4620 Lecture 8

CS 4204 Computer Graphics

Camera Model and Calibration. Lecture-12

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

COMP30019 Graphics and Interaction Perspective Geometry

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

Lecture 5: Transforms II. Computer Graphics and Imaging UC Berkeley CS184/284A

Homogeneous Coordinates. Lecture18: Camera Models. Representation of Line and Point in 2D. Cross Product. Overall scaling is NOT important.

Specifying Complex Scenes

Virtual Cameras and The Transformation Pipeline

Game Architecture. 2/19/16: Rasterization

Unit 3 Multiple View Geometry

CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo)

THE VIEWING TRANSFORMATION

CITSTUDENTS.IN VIEWING. Computer Graphics and Visualization. Classical and computer viewing. Viewing with a computer. Positioning of the camera

CS451Real-time Rendering Pipeline

CS6670: Computer Vision

calibrated coordinates Linear transformation pixel coordinates

Computer Viewing. Prof. George Wolberg Dept. of Computer Science City College of New York

Perspective projection and Transformations

Shadows in Computer Graphics

CS Computer Graphics: Transformations & The Synthetic Camera

Agenda. Perspective projection. Rotations. Camera models

Image Transformations & Camera Calibration. Mašinska vizija, 2018.

Scene Modeling for a Single View

3D Viewing. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 9

I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S

COMP30019 Graphics and Interaction Perspective & Polygonal Geometry

DD2423 Image Analysis and Computer Vision IMAGE FORMATION. Computational Vision and Active Perception School of Computer Science and Communication

CHAPTER 3. Single-view Geometry. 1. Consequences of Projection

(Refer Slide Time: 00:01:26)

EECS : Introduction to Computer Graphics Building the Virtual Camera ver. 1.4

EECS : Introduction to Computer Graphics Building the Virtual Camera ver. 1.5

Computer Graphics: Viewing in 3-D. Course Website:

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer

file:///c /Documents%20and%20Settings/Jason%20Raftery/My%20Doc...e%20184%20-%20Spring%201998%20-%20Sequin%20-%20Midterm%202.htm

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination

Camera model and multiple view geometry

Overview of Projections: From a 3D world to a 2D screen.

Scene Modeling for a Single View

Rendering Pipeline and Coordinates Transforms

CS 381 Computer Graphics, Fall 2012 Midterm Exam Solutions. The Midterm Exam was given in class on Tuesday, October 16, 2012.

Scene Modeling for a Single View

Computer Graphics. Lecture 04 3D Projection and Visualization. Edirlei Soares de Lima.

Viewing with Computers (OpenGL)

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52

Projective Geometry and Camera Models

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

Introduction to Computer Vision

Computer Graphics. Chapter 10 Three-Dimensional Viewing

Evening s Goals. Mathematical Transformations. Discuss the mathematical transformations that are utilized for computer graphics

Pinhole Camera Model 10/05/17. Computational Photography Derek Hoiem, University of Illinois

Lecture 4: Viewing. Topics:

Topics and things to know about them:

Computer Viewing. CITS3003 Graphics & Animation. E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley

Computer Graphics Viewing

Movie: Geri s Game. Announcements. Ray Casting 2. Programming 2 Recap. Programming 3 Info Test data for part 1 (Lines) is available

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1

3-D D Euclidean Space - Vectors

CS464 Oct 3 rd Assignment 3 Due 10/6/2017 Due 10/8/2017 Implementation Outline

Transcription:

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Announcements Reading for Thursday: Shirley Ch: 6, & 7

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Rotation About An Arbitrary Vector

Rigid Body Transformations A transformation matrix of the form x x x y t x y x y y t y 0 0 1 where the upper 2x2 submatrix is a rotation matrix and column 3 is a translation vector, is a rigid body transformation. Any series of rotations and translations results in a rotation and translation of this form (and no change in the distance between vertices) Computer Graphics 15-462 17

Transforming Normals It s tempting to think of normal vectors as being like porcupine quills, so they would transform like points Alas, it s not so. We need a different rule to transform normals. chalkboard Computer Graphics 15-462 21

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Viewing and Projection Our eyes collapse 3-D world to 2-D retinal image (brain then has to reconstruct 3D) In CG, this process occurs by projection Projection has two parts: Viewing transformations: camera position and direction Perspective/orthographic transformation: reduces 3-D to 2-D Use homogeneous transformations (of course ) Computer Graphics 15-462 17

Getting Geometry on the Screen Given geometry positioned in the world coordinate system, how do we get it onto the display? Transform to camera coordinate system Transform (warp) into canonical view volume Clip Project to display coordinates Rasterize http://i200.photobucket.com/albums/aa39/archiebot/rasterization.png Computer Graphics 15-462 13

Perspective and Orthographic Projection Computer Graphics 15-462 14

Orthographic Projection

Viewing and Projection Build this up in stages Canonical view volume to screen Orthographic projection to canonical view volume Perspective projection to orthographic space Computer Graphics 15-462 18

Orthographic Projection the focal point is at infinity, the rays are parallel, and orthogonal to the image plane good model for telephoto lens. No perspective effects. when xy-plane is the image plane (x,y,z) -> (x,y,0) front orthographic view Computer Graphics 15-462 15

Telephoto Lenses and Fashion Photography http://farm4.static.flickr.com/3057/2555706112_20a3015ddb.jpg

Canonical View Volume Why this shape? Easy to clip to Trivial to project from 3D to 2D image plane chalkboard Computer Graphics 15-462 19

Orthographic Projection X=l left plane X=r right plane Y=b bottom plane Y=t top plane Z=n near plane Z=f far plane Why near plane? Prevent points behind the camera being seen Why far plane? Allows z to be scaled to a limited fixed-point value (z-buffering) chalkboard Computer Graphics 15-462 20

Arbitrary View Positions Eye position: e Gaze direction: g view-up vector: t chalkboard Computer Graphics 15-462 21

Perspective Projection source: http://www.dartmouth.edu/~matc/math5.geometry/unit15/frisius.gif

The simplest way to look at perspective projection is as painting on a window... eye painted color color window Paint on the window whatever color you see there. source: http://blog.mlive.com/flintjournal/newsnow/2007/11/window_painting_02.jpg

Simple Perspective Camera Canonical case: camera looks along the z-axis focal point is the origin image plane is parallel to the xy-plane at distance d (We call d the focal length, mainly for historical reasons) y x Image Plane F=[0,0,0] z [0,0,d] Computer Graphics 15-462 16

Perspective Projection of a Point y_s = d/z y y s = d y z Computer Graphics 15-462 23

History of Perspective Projection source: http://en.wikipedia.org/wiki/file:reconstruction_of_the_temple_of_jerusalem.jpg source: http://en.wikipedia.org/wiki/file:giotto_-_legend_of_st_francis_-_-07-_-_confirmation_of_the_rule.jpg source: http://en.wikipedia.org/wiki/file:perugino_keys.jpg

Clipping Something is missing between projection and viewing... Before projecting, we need to eliminate the portion of scene that is outside the viewing frustum y x clipped line z image plane near far Need to clip objects to the frustum (truncated pyramid) Now in a canonical position but it still seems kind of tricky... Computer Graphics 15-462 25

Normalizing the Viewing Frustum Solution: transform frustum to a cube before clipping y x clipped line 1 y 1 x clipped line z near 0 1 z far image plane near far Converts perspective frustum to orthographic frustum Yet another homogeneous transform! Computer Graphics 15-462 26

Perspective Projection chalkboard Warping a perspective projection into and orthographic one Lines for the two projections intersect at the view plane How can we put this in matrix form? Need to divide by z haven t seen a divide in our matrices so far Requires our w from last time (or h in the book) Computer Graphics 15-462 24

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Camera Control Values All we need is a single translation and angle-axis rotation (orientation), but... Good animation requires good camera control--we need better control knobs Translation knob - move to the lookfrom point Orientation can be specified in several ways: specify camera rotations specify a lookat point (solve for camera rotations) Computer Graphics 15-462 28

A Popular View Specification Approach Focal length, image size/shape and clipping planes are in the perspective transformation In addition: lookfrom: where the focal point (camera) is lookat: the world point to be centered in the image Also specify camera orientation about the lookat-lookfrom axis Computer Graphics 15-462 29

Implementation Implementing the lookat/lookfrom/vup viewing scheme (1) Translate by -lookfrom, bring focal point to origin (2) Rotate lookat-lookfrom to the z-axis with matrix R:» v = (lookat-lookfrom) (normalized) and z = [0,0,1]» rotation axis: a = (vxz)/ vxz» rotation angle: cos! = vz and sin! = vxz glrotate"!# a x, a y, a z ) (3) Rotate about z-axis to get vup parallel to the y-axis Computer Graphics 15-462 30

The Whole Picture LOOKFROM: LOOKAT: VUP: FOV: d: focal length WORLD COORDINATES Where the camera is A point that should be centered in the image A vector that will be pointing straight up in the image Field-of-view angle. Computer Graphics 15-462 31

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Vanishing Points source: http://stevewebel.com/photographer/wp-content/uploads/2008/04/vanishing-point.jpg source: http://cavespirit.com/cavewall/5/vanishing_point_high_horizon.jpg What Causes Vanishing Points?

eye limit image plane

2 Vanishing Points source: http://www.vintage-views.com/waresmodernperspective/images/1219k6-plate1.jpg How many vanishing points can an image have?

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points