Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics

Similar documents
To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline

CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection. Emmanuel Agu

Viewing/Projections III. Week 4, Wed Jan 31

Lecture 4: Viewing. Topics:

Viewing/Projection IV. Week 4, Fri Jan 29

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

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

CS 428: Fall Introduction to. Viewing and projective transformations. Andrew Nealen, Rutgers, /23/2009 1

COMS 4160: Problems on Transformations and OpenGL

Computer Graphics 7: Viewing in 3-D

3D Geometry and Camera Calibration

Viewing Transformations I Comp 535

p =(x,y,d) y (0,0) d z Projection plane, z=d

Chap 7, 2009 Spring Yeong Gil Shin

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

3-Dimensional Viewing

MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

What and Why Transformations?

Viewing and Projection

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

Geometry: Outline. Projections. Orthographic Perspective

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

Prof. Feng Liu. Fall /19/2016

Image Warping. Some slides from Steve Seitz

Game Architecture. 2/19/16: Rasterization

3D Viewing. CS 4620 Lecture 8

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

Models and The Viewing Pipeline. Jian Huang CS456

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations

Rasterization Overview

3D graphics rendering pipeline (1) 3D graphics rendering pipeline (3) 3D graphics rendering pipeline (2) 8/29/11

Projections. Brian Curless CSE 457 Spring Reading. Shrinking the pinhole. The pinhole camera. Required:

3D Coordinates & Transformations

CS 543: Computer Graphics. Projection

Overview. By end of the week:

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

Graphics 2009/2010, period 1. Lecture 6: perspective projection

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

Viewing in 3D (Chapt. 6 in FVD, Chapt. 12 in Hearn & Baker)

OpenGL: Open Graphics Library. Introduction to OpenGL Part II. How do I render a geometric primitive? What is OpenGL

Lecture 4. Viewing, Projection and Viewport Transformations

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

CSE452 Computer Graphics

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

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

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

CPSC 314, Midterm Exam 1. 9 Feb 2007

Image Warping (Szeliski Sec 2.1.2)

CS 4204 Computer Graphics

Perspective transformations

News. Projections and Picking. Transforming View Volumes. Projections recap. Basic Perspective Projection. Basic Perspective Projection

2D and 3D Viewing Basics

CSE328 Fundamentals of Computer Graphics: Theory, Algorithms, and Applications

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

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

Image Warping : Computational Photography Alexei Efros, CMU, Fall Some slides from Steve Seitz

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

Computer Graphics. Chapter 10 Three-Dimensional Viewing

Viewing and Projection

Chap 7, 2008 Spring Yeong Gil Shin

Geometric Model of Camera

CPSC 314, Midterm Exam. 8 March 2013

Viewing. Cliff Lindsay, Ph.D. WPI

Viewing COMPSCI 464. Image Credits: Encarta and

Introduction to Computer Graphics 4. Viewing in 3D

To Do. Outline. Translation. Homogeneous Coordinates. Foundations of Computer Graphics. Representation of Points (4-Vectors) Start doing HW 1

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem

Fachhochschule Regensburg, Germany, February 15, 2017

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)

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

Three-Dimensional Viewing Hearn & Baker Chapter 7

Projection and viewing. Computer Graphics CSE 167 Lecture 4

For each question, indicate whether the statement is true or false by circling T or F, respectively.

CS6670: Computer Vision

Perspective Mappings. Contents

Computer Graphics Inf4/MSc. Computer Graphics. Lecture 6 View Projection Taku Komura

Computer Graphics. Coordinate Systems and Change of Frames. Based on slides by Dianna Xu, Bryn Mawr College

CS Computer Graphics: Transformations & The Synthetic Camera

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

Viewing and Projection

1 OpenGL - column vectors (column-major ordering)

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

Viewing. Reading: Angel Ch.5

CS451Real-time Rendering Pipeline

Viewing with Computers (OpenGL)

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

CSC 305 The Graphics Pipeline-1

Transforms 3: Projection Christian Miller CS Fall 2011

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

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

What does OpenGL do?

1. We ll look at: Types of geometrical transformation. Vector and matrix representations

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

Viewing transformations. 2004, Denis Zorin

Transcription:

Foundations of Computer Graphics Online Lecture 5: Viewing Orthographic Projection Ravi Ramamoorthi Motivation We have seen transforms (between coord sstems) But all that is in 3D We still need to make a 2D picture Project 3D to 2D. How do we do this? This lecture is about viewing transformations Demo (Projection Tutorial) Nate Robbins OpenGL tutors Projection tutorial Download others What we ve seen so far Transforms (translation, rotation, scale) as 44 homogeneous matrices Last row alwas 0 0 0 1. Last w component alwas 1 For viewing (perspective), we will use that last row and w component no longer 1 (must divide b it) Projections To lower dimensional space (here 3D -> 2D) Preserve straight lines Trivial eample: Drop one coordinate (Orthographic) Brief discussion of nonlinear mapping in 1

Orthographic Projection Characteristic: Parallel lines remain parallel Simplest form: project onto - plane, drop coordinate Useful for technical drawings etc. In general We have a cuboid that we want to map to the normalied or square cube from [-1, +1] in all aes We have parameters of cuboid (l,r ; t,b; n,f) n l t r b f Translate Orthographic Perspective Orthographic Matri First center cuboid b translating Transformation Matri Then scale into unit cube n l t f r b Translate Transformation Matri Translation (centering) Orthographic Matri Looking down, f and n are negative (n > f) OpenGL convention: positive n, f, negate internall n l t f r b Translate 2

Final Result Foundations of Computer Graphics Online Lecture 5: Viewing Perspective Projection Ravi Ramamoorthi Brief discussion of nonlinear mapping in Perspective Projection Most common computer graphics, art, visual sstem Further objects are smaller (sie, inverse distance) Parallel lines not parallel; converge to single point A A Center of projection (camera/ee location) B B Slides inspired b Greg Humphres Overhead View of Our Screen In Matrices Note negation of coord (focal plane d) (Onl) last row affected (no longer 0 0 0 1) w coord will no longer = 1. Must divide at end Looks like we ve got some nice similar triangles here? 3

Verif Verif Foundations of Computer Graphics Online Lecture 5: Viewing Derivation of gluperspective Ravi Ramamoorthi Brief discussion of nonlinear mapping in Remember projection tutorial Viewing Frustum Far plane Near plane 4

Screen (Projection Plane) gluperspective Field of view (fov) width height gluperspective(fov, aspect, Near > 0, Far > 0) Fov, aspect control fov in, directions Near, Far control viewing frustum Aspect ratio = width / height Overhead View of Our Screen Overhead View of Our Screen Simplest form: In Matrices In Matrices Aspect ratio taken into account Homogeneous, simpler to multipl through b d Must map vals based on near, far planes (not et) A and B selected to map n and f to -1, +1 respectivel 5

Z mapping derivation Z mapping derivation Simultaneous equations? Z mapping derivation Z mapping derivation Simultaneous equations? Simultaneous equations? Mapping of Z is nonlinear Brief discussion of nonlinear mapping in Man mappings proposed: all have nonlinearities Advantage: handles range of depths (10cm 100m) Disadvantage: depth resolution not uniform More close to near plane, less further awa Common mistake: set near = 0, far = inft. Don t do this. Can t set near = 0; lose depth resolution. 6

Summar: The Whole Viewing Pipeline Model coordinates Model transformation World coordinates Camera Transformation (glulookat) Slide courtes Greg Humphres Ee coordinates Perspective Transformation (gluperspective) Screen coordinates Viewport transformation Window coordinates Raster transformation Device coordinates 7