Viewing Transformation

Similar documents
Viewing and Projection Transformations

Viewing/Projections IV. Week 4, Fri Feb 1

Viewing and Projection

University of British Columbia CPSC 314 Computer Graphics Jan-Apr Tamara Munzner. Viewing 4.

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

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

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

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

University of British Columbia CPSC 314 Computer Graphics Jan-Apr Tamara Munzner. Viewing 4. Page 1

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

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

Introduction to Computer Graphics 4. Viewing in 3D

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

CS 475 / CS 675 Computer Graphics. Lecture 7 : The Modeling-Viewing Pipeline

Viewing/Projections III. Week 4, Wed Jan 31

Viewing/Projection IV. Week 4, Fri Jan 29

Three-Dimensional Viewing Hearn & Baker Chapter 7

Chap 7, 2008 Spring Yeong Gil Shin

COMP Computer Graphics and Image Processing. a6: Projections. In part 2 of our study of Viewing, we ll look at. COMP27112 Toby Howard

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Chapter 5. Projections and Rendering

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

Models and Architectures

COMP30019 Graphics and Interaction Perspective & Polygonal Geometry

COMP30019 Graphics and Interaction Perspective Geometry

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

Chapter 8 Three-Dimensional Viewing Operations

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

Rasterization Overview

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization

Projection Lecture Series

3D Viewing. CS 4620 Lecture 8

Introduction to Computer Graphics with WebGL

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

CS 418: Interactive Computer Graphics. Projection

Overview. By end of the week:

Chap 7, 2009 Spring Yeong Gil Shin

Lecture 4. Viewing, Projection and Viewport Transformations

Projection Matrix Tricks. Eric Lengyel

Homework 1: Getting Started with WebGL and Transformations EE267 Virtual Reality 2018

Three-Dimensional Graphics III. Guoying Zhao 1 / 67

3D Graphics Pipeline II Clipping. Instructor Stephen J. Guy

Viewing with Computers (OpenGL)

Chapter 4-3D Camera & Optimizations, Rasterization

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

The Graphics Pipeline and OpenGL I: Transformations!

Hidden Surfaces II. Week 9, Mon Mar 15

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

The Graphics Pipeline. Interactive Computer Graphics. The Graphics Pipeline. The Graphics Pipeline. The Graphics Pipeline: Clipping

Computer Graphics Chapter 7 Three-Dimensional Viewing Viewing

2D and 3D Viewing Basics

Announcement. Project 1 has been posted online and in dropbox. Due: 11:59:59 pm, Friday, October 14

The Graphics Pipeline and OpenGL I: Transformations!

Realtime 3D Computer Graphics & Virtual Reality. Viewing

Viewing. Part II (The Synthetic Camera) CS123 INTRODUCTION TO COMPUTER GRAPHICS. Andries van Dam 10/10/2017 1/31

Introduction to Computer Graphics with WebGL

CSE528 Computer Graphics: Theory, Algorithms, and Applications

3D Viewing. With acknowledge to: Ed Angel. Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Virtual Cameras & Their Matrices

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

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

Models and The Viewing Pipeline. Jian Huang CS456

Game Architecture. 2/19/16: Rasterization

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

Computer Graphics 7: Viewing in 3-D

So we have been talking about 3D viewing, the transformations pertaining to 3D viewing. Today we will continue on it. (Refer Slide Time: 1:15)

5.8.3 Oblique Projections

Building Models. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Viewing. Reading: Angel Ch.5

CSE328 Fundamentals of Computer Graphics

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Computer Viewing Computer Graphics I, Fall 2008

CSC 305 The Graphics Pipeline-1

Computer Graphics Viewing

Geometry: Outline. Projections. Orthographic Perspective

Chapter 5-3D Camera & Optimizations, Rasterization

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Projection and viewing. Computer Graphics CSE 167 Lecture 4

Lecture 4: Viewing. Topics:

Transformation Pipeline

CS602- Computer Graphics Solved MCQS From Midterm Papers. MIDTERM EXAMINATION Spring 2013 CS602- Computer Graphics

SUMMARY. CS380: Introduction to Computer Graphics Projection Chapter 10. Min H. Kim KAIST School of Computing 18/04/12. Smooth Interpolation

Computer graphics 2: Graduate seminar in computational aesthetics

CS452/552; EE465/505. Models & Viewing

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

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION

Computer Graphics Solved MCQs -Part 2 MCQs Questions

Local Illumination physics. Law of reflection and Snell s law of refraction

(Refer Slide Time: 00:01:26)

SE Mock Online Retest 2-CG * Required

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

3-Dimensional Viewing

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

COMPLETION OF Z-buffer Graphics Pipeline

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

Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.1~4.7

Transforms 3: Projection Christian Miller CS Fall 2011

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

Transcription:

Viewing and Projection Transformations Projective Rendering Pipeline OCS WCS VCS modeling transformation Mm.odd viewing transformation Mview OCS - object coordinate system WCS - world coordinate system VCS - viewing coordinate system CCS - clipping coordinate system NDCS - normalized device coordinate system DCS - device coordinate system projection transformation / h viewport transformation CCS NDCS DCS pixel acoorde

Viewing Transformation Defining the camera position and orientation eye point target point up vector three.js: camera.position.set(0,2,20); // eye camera.up.set(0,,0); // up vector camera.lookat(0,0,0); // specify target; compute M_view // internally: object.matrix.lookat(eye,target,up)

Computing i,j,k I Peye pref w Ept I Wpxi ftp.eh Of II Exit PeyeMriew pm qq.iq am Mia'm Mcamm

Viewing Transformation M view

Projection Transformation M proj 3D scene à 2D image pinhole camera image plane real pinhole camera camera lens

Projection definition perspective projection parallel projection

Projections Taxonomy planar projections perspective:,2,3-point oblique parallel orthographic cabinet cavalier top, front, side axonometric isometric dimetric

Perspective Projection y P(x,y,z) P(x,y,d) z=d z

Homogeneous Coordinates homogeneous cartesian ( x, y, z, h) redundant representation h=0: point at infinity (direction) geometric interpretation h P( x, y, z, h)

Perspective Projection A simple version of h / = / - z y x d M proj

View Volumes: more about M proj specifies field-of-view, used for clipping restricts domain of z stored for visibility test orthographic view volume perspective view volume

View Volumes OpenGL / WebGL canonical view volume

Orthographic View Volume

Orthographic View Volume 2 right left 2 top bot 2 far near right + left right left top + bot top bot far + near far near three.js var cam = new THREE.OrthographicCamera(left,right,top,bot,near,far)

Orthographic View Volume Derivation solving for a and b gives:

Perspective View Volume

Perspective View Volume Derivation x y z z / d = / d x y z earlier: with additional ability to scale, etc.: = ' ' ' ' z y x D C B F A E h z y x

Perspective View Volume + + + 2 ) ( 2 2 n f fn n f f b n t b t b t n l r l r l r n view volume left = -, right = bot = -, top = near =, far = 4 3 8/ 3 5/ three.js var camera = new THREE.PerspectiveCamera(fov, aspect, near, far) // which eventually calls: // matrix.makeperspective(left, right, top, bottom, near, far);

Perspective View Volume Derivation top plane: repeat for bot plane to get another eqn, then solve for F and B similar process for solving for the other unknowns, using the left/right and near/far planes

Perspective Projection -- Example Example tracks in VCS: left x=-, y=- right x=, y=- view volume left = -, right = bot = -, top = near =, far = 4

Perspective Projection -- Example Example = / h

Viewport Transformation (,) (w,h) (-,-) NDCS (0,0) DCS x a y b three.js: WebGL: renderer.setviewport(x,y,a,b); gl.viewport(x,y,a,b); gl.viewport(0,0,w,h) is default

Name Perspective Projection -- example y I P A (0, 5,6) P B (0, 5,2) z F cam Compute the projected coordinates of the given points for a perspective projection. The image plane is located at z = -2. In which direction should we move the image plane in order to obtain a larger image?

Impossible Photography? moon How could we take a photograph like the one on the left? The edges of the building on the left are parallel, despite the viewer standing on the ground while taking the photograph. How is this possible?