Perspective. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 5

Similar documents
History of projection. Perspective. History of projection. Plane projection in drawing

Perspective. Announcement: CS4450/5450. CS 4620 Lecture 3. Will be MW 8:40 9:55 How many can make the new time?

Perspective. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

History of projection

Section 8. Objectives

Reading. Angel. Chapter 5. Optional

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

Visual Imaging in the Electronic Age. Drawing Perspective Images

Visual Imaging in the Electronic Age. Drawing Perspective Images

3D Viewing I. Acknowledgement: Some slides are from the Dr. Andries van Dam lecture. CMSC 435/634 August D Viewing I # /27

3D Viewing I. From 3D to 2D: Orthographic and Perspective Projection Part 1

Reading. Projections. The 3D synthetic camera model. Imaging with the synthetic camera. Angel. Chapter 5. Optional

Transform 3D objects on to a 2D plane using projections

The principles of CCTV design in VideoCAD

3D COMPUTER GRAPHICS

Exploring 3D in Flash

Projections. Conceptual Model of the 3D viewing process

CS354 Computer Graphics Viewing and Projections

Engineering Drawing Lecture 5 PROJECTION THEORY

6.A44 Computational Photography

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

Virtual and Digital Cameras

Graphic Communications

Building a Real Camera. Slides Credit: Svetlana Lazebnik

IMAGE FORMATION. Light source properties. Sensor characteristics Surface. Surface reflectance properties. Optics

Two strategies for realistic rendering capture real world data synthesize from bottom up

Introduction to Computer Graphics (CS602) Lecture 19 Projections

MULTIPLE CHOICE QUESTIONS - CHAPTER 6

Image Formation. Dr. Gerhard Roth. COMP 4102A Winter 2015 Version 3

ENGINEERING GRAPHICS 1E9

Visual Imaging in the Electronic Age. Drawing Perspective Images

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Building a Real Camera

Understanding Focal Length

Parity and Plane Mirrors. Invert Image flip about a horizontal line. Revert Image flip about a vertical line.

11/12/2015 CHAPTER 7. Axonometric Drawings (cont.) Axonometric Drawings (cont.) Isometric Projections (cont.) 1) Axonometric Drawings

Image Formation III Chapter 1 (Forsyth&Ponce) Cameras Lenses & Sensors

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Viewing. Part I (History and Overview of Projections) Bin Sheng 1 / 46 10/04/2016

Lenses, exposure, and (de)focus

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Viewing. Part I (History and Overview of Projections) Andries van Dam 1 / 46 10/05/2017

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Brief history of perspective Geometric perspective was developed during the renaissance ( 15 th century) by Filippo Brunelleschi. Renaissance artists

Multi Viewpoint Panoramas

CSE 473/573 Computer Vision and Image Processing (CVIP)

Panoramas. CS 178, Spring Marc Levoy Computer Science Department Stanford University

Unit 1: Image Formation

Computer Vision. The Pinhole Camera Model

ONE-POINT PERSPECTIVE

Camera Simulation. References. Photography, B. London and J. Upton Optics in Photography, R. Kingslake The Camera, The Negative, The Print, A.

Cameras. CSE 455, Winter 2010 January 25, 2010

Mirrors, Lenses &Imaging Systems

Why learn about photography in this course?

How do we see the world?

lecture 24 image capture - photography: model of image formation - image blur - camera settings (f-number, shutter speed) - exposure - camera response

CS-184: Computer Graphics. Today

Perspective in 2D Games

Beginning Engineering Graphics 3 rd Week Lecture Notes Instructor: Edward N. Locke Topic: The Coordinate System, Types of Drawings and Orthographic

Topic 6 - Optics Depth of Field and Circle Of Confusion

Optics Practice. Version #: 0. Name: Date: 07/01/2010

I B.TECH- I SEMESTER DEPARTMENT OF MECHANICAL ENGINEERING ENGINEERING DRAWING

CLASS views from detail on a grid paper. (use appropriate line types to show features) - Optional views. Turn in for grading on class 6 (06/04)

Lecture 02 Image Formation 1

Geometry of Aerial Photographs

Introduction to Projection The art of representing a three-dimensional object or scene in a 2D space is called projection.

Lab 11: Lenses and Ray Tracing

Exposure settings & Lens choices

Panoramas. CS 178, Spring Marc Levoy Computer Science Department Stanford University

6.098 Digital and Computational Photography Advanced Computational Photography. Bill Freeman Frédo Durand MIT - EECS

Drawing: technical drawing TECHNOLOGY

Lecture 2 of 41. Viewing 1 of 4: Overview, Projections

Lecture 2 of 41. Viewing 1 of 4: Overview, Projections

A shooting direction control camera based on computational imaging without mechanical motion

Graphics and Interaction Perspective Geometry

Panoramas. CS 178, Spring Marc Levoy Computer Science Department Stanford University

ECEN 4606, UNDERGRADUATE OPTICS LAB

Determination of Focal Length of A Converging Lens and Mirror

28 Thin Lenses: Ray Tracing

VIEWING 1. CLASSICAL AND COMPUTER VIEWING. Computer Graphics

CS475/CS675 Computer Graphics

Ch 24. Geometric Optics

DSLR Cameras have a wide variety of lenses that can be used.

technical drawing

Projections Computer Graphics and Visualization

The Camera : Computational Photography Alexei Efros, CMU, Fall 2008

Cameras and Sensors. Today. Today. It receives light from all directions. BIL721: Computational Photography! Spring 2015, Lecture 2!

Perspective in 2D Games

This document explains the reasons behind this phenomenon and describes how to overcome it.

Multiview Drawing. Definition: Graphical representation of a 3- dimensional object on one plane (sheet of paper) using two or more views.

Lecture 22: Cameras & Lenses III. Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2017

LENSES. INEL 6088 Computer Vision

LENSES. A lens is any glass, plastic or transparent refractive medium with two opposite faces, and at least one of the faces must be curved.

Perspective in 2D Games

Volume 1 - Module 6 Geometry of Aerial Photography. I. Classification of Photographs. Vertical

Cameras. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Imaging Optics Fundamentals

Reading. Projections. Projections. Perspective vs. parallel projections. Foley et al. Chapter 6. Optional. Perspective projections pros and cons:

Lens Openings & Shutter Speeds

Technical information about PhoToPlan

The Elements and Principles of Design. The Building Blocks of Art

REFLECTION THROUGH LENS

Transcription:

Perspective CS 4620 Lecture 5 2018 Steve Marschner 1

Parallel projection To render an image of a 3D scene, we project it onto a plane Simplest kind of projection is parallel projection image projection plane scene 2018 Steve Marschner 2

Orthographic in traditional drawing [Carlbom & Paciorek 78] projection plane parallel to a coordinate plane projection direction perpendicular to projection plane 2018 Steve Marschner 3

Other parallel in traditional drawing axonometric: projection plane perpendicular to projection direction but not parallel to coordinate planes [Carlbom & Paciorek 78] 2018 Steve Marschner 4

Orthographic projection In graphics usually we lump axonometric with orthographic projection plane perpendicular to projection direction image height determines size of objects in image 2018 Steve Marschner 5

Orthographic projection In graphics usually we lump axonometric with orthographic projection plane perpendicular to projection direction image height determines size of objects in image 2018 Steve Marschner 5

Orthographic projection In graphics usually we lump axonometric with orthographic projection plane perpendicular to projection direction image height determines size of objects in image 2018 Steve Marschner 5

Orthographic projection In graphics usually we lump axonometric with orthographic projection plane perpendicular to projection direction image height determines size of objects in image 2018 Steve Marschner 5

Generating eye rays orthographic Ray origin (varying): pixel position on viewing window Ray direction (constant): view direction viewing window pixel position viewing ray but where exactly is the view rectangle? 2018 Steve Marschner 6

Generating eye rays orthographic Positioning the view rectangle establish three vectors to be camera basis: u, v, w view rectangle is in u v plane, specified by l, r, t, b (often l = r and b = t) Generating rays for (u, v) in [l, r] [b, t] ray.origin = e + u u + v v ray.direction = w w e v u 2018 Steve Marschner 7

Establishing the camera basis Could require user to provide e, u, v, and w but this is error prone and unintuitive Instead, calculate basis from things the user cares about viewpoint: where the camera is e view direction: which way the camera is looking d view plane normal (normally same as view direction) up vector: how the camera is oriented This is enough to calculate u, v, and w set w parallel to v.p. normal, facing away from d set u perpendicular to w and perpendicular to up-vector set v perpendicular to w and u to form a right-handed ONB 2018 Steve Marschner 8

Camera basis v d up v w u d w u d forming the basis with d and v given forming the basis with d and up vector given 2018 Steve Marschner 9

Orthographic views in Ray 1 <camera type="orthographiccamera"> <viewpoint>10 4.2 6</viewPoint> <viewdir>-5-2.1-3</viewdir> <viewup>0 1 0</viewUp> <viewwidth>8</viewwidth> <viewheight>5</viewheight> </camera> <camera type="orthographiccamera"> <viewpoint>10 0 0</viewPoint> <viewdir>-1 0 0</viewDir> <viewup>0 1 0</viewUp> <viewwidth>8</viewwidth> <viewheight>5</viewheight> </camera> 2018 Steve Marschner 10

History of projection Ancient times: Greeks wrote about laws of perspective Renaissance: perspective is adopted by artists Duccio c. 1308 2018 Steve Marschner 11

History of projection Later Renaissance: perspective formalized precisely da Vinci c. 1498 2018 Steve Marschner 12

Plane projection in drawing Albrecht Dürer 2018 Steve Marschner 13

Plane projection in drawing source unknown 2018 Steve Marschner 14

Plane projection in photography This is another model for what we are doing applies more directly in realistic rendering [Source unknown] 2018 Steve Marschner 15

Plane projection in photography [Richard Zakia] 2018 Steve Marschner 16

Perspective projection (normal) Perspective is projection by lines through a point; normal = plane perpendicular to view direction magnification determined by: image height object depth image plane distance f.o.v. α = 2 atan(h/(2d)) y = d y / z normal case corresponds to common types of cameras 2018 Steve Marschner 17

Perspective projection (normal) Perspective is projection by lines through a point; normal = plane perpendicular to view direction magnification determined by: image height object depth image plane distance f.o.v. α = 2 atan(h/(2d)) y = d y / z normal case corresponds to common types of cameras 2018 Steve Marschner 17

Perspective projection (normal) Perspective is projection by lines through a point; normal = plane perpendicular to view direction magnification determined by: image height object depth image plane distance f.o.v. α = 2 atan(h/(2d)) y = d y / z normal case corresponds to common types of cameras 2018 Steve Marschner 17

Perspective projection (normal) Perspective is projection by lines through a point; normal = plane perpendicular to view direction magnification determined by: image height object depth image plane distance f.o.v. α = 2 atan(h/(2d)) y = d y / z normal case corresponds to common types of cameras 2018 Steve Marschner 17

Generating eye rays perspective Use window analogy directly Ray origin (constant): viewpoint Ray direction (varying): toward pixel position on viewing window viewpoint viewing window pixel position viewing ray 2018 Steve Marschner 18

Generating eye rays perspective Positioning the view rectangle establish three vectors to be camera basis: u, v, w view rectangle is parallel to u v plane, at w = d, specified by l, r, t, b Generating rays for (u, v) in [l, r] [b, t] ray.origin = e ray.direction = d w + u u + v v w v e u 2018 Steve Marschner 19

Perspective views in Ray 1 <camera type="perspectivecamera"> <viewpoint>10 4.2 6</viewPoint> <viewdir>-5-2.1-3</viewdir> <viewup>0 1 0</viewUp> <projdistance>12</projdistance> <viewwidth>8</viewwidth> <viewheight>5</viewheight> </camera> <camera type="perspectivecamera"> <viewpoint>2.5 1.05 1.5</viewPoint> <viewdir>-5-2.1-3</viewdir> <viewup>0 1 0</viewUp> <projdistance>3</projdistance> <viewwidth>8</viewwidth> <viewheight>5</viewheight> </camera> 2018 Steve Marschner 20

Field of view (or f.o.v.) The angle between the rays corresponding to opposite edges of a perspective image simpler to compute for normal perspective have to decide to measure vert., horiz., or diag. In cameras, determined by focal length confusing because of many image sizes for 35mm format (36mm by 24mm image) 18mm = 67 v.f.o.v. super-wide angle 28mm = 46 v.f.o.v. wide angle 50mm = 27 v.f.o.v. normal 100mm = 14 v.f.o.v. narrow angle ( telephoto ) 2018 Steve Marschner 21

Field of view Determines strength of perspective effects close viewpoint wide angle prominent foreshortening far viewpoint narrow angle little foreshortening [Ansel Adams] 2018 Steve Marschner 22

Choice of field of view In photography, wide angle lenses are specialty tools hard to work with easy to create weird-looking perspective effects In graphics, you can type in whatever f.o.v. you want and people often type in big numbers! [Ken Perlin] 2018 Steve Marschner 23

Perspective distortions Lengths, length ratios [Carlbom & Paciorek 78] 2018 Steve Marschner 24

Oblique projection View direction no longer coincides with projection plane normal (one more parameter) objects at different distances still same size objects are shifted in the image depending on their depth 2018 Steve Marschner 25

Oblique projection View direction no longer coincides with projection plane normal (one more parameter) objects at different distances still same size objects are shifted in the image depending on their depth 2018 Steve Marschner 25

Oblique projection View direction no longer coincides with projection plane normal (one more parameter) objects at different distances still same size objects are shifted in the image depending on their depth 2018 Steve Marschner 25

Oblique projection View direction no longer coincides with projection plane normal (one more parameter) objects at different distances still same size objects are shifted in the image depending on their depth 2018 Steve Marschner 25

Oblique parallel views View rectangle is the same ray origins identical to orthographic view direction d differs from w Generating rays for (u, v) in [l, r] [b, t] ray.origin = e + u u + v v ray.direction = d w e v d u 2018 Steve Marschner 26

Off-axis parallel [Carlbom & Paciorek 78] axonometric: projection plane perpendicular to projection direction but not parallel to coordinate planes oblique: projection plane parallel to a coordinate plane but not perpendicular to projection direction. 2018 Steve Marschner 27

Shifted perspective projection Perspective but with projection plane not perpendicular to view direction additional parameter: projection plane normal exactly equivalent to cropping out an off-center rectangle from a larger normal perspective corresponds to view camera in photography 2018 Steve Marschner 28

Shifted perspective projection Perspective but with projection plane not perpendicular to view direction additional parameter: projection plane normal exactly equivalent to cropping out an off-center rectangle from a larger normal perspective corresponds to view camera in photography 2018 Steve Marschner 28

Shifted perspective projection Perspective but with projection plane not perpendicular to view direction additional parameter: projection plane normal exactly equivalent to cropping out an off-center rectangle from a larger normal perspective corresponds to view camera in photography 2018 Steve Marschner 28

Shifted perspective projection Perspective but with projection plane not perpendicular to view direction additional parameter: projection plane normal exactly equivalent to cropping out an off-center rectangle from a larger normal perspective corresponds to view camera in photography 2018 Steve Marschner 28

Oblique perspective views Positioning the view rectangle establish three vectors to be camera basis: u, v, w view rectangle is the same, but shifted so that the center is in the direction d from e Generating rays for (u, v) in [l, r] [b, t] ray.origin = e ray.direction = d d + u u + v v w v e u d d 2018 Steve Marschner 29

Why shifted perspective? Control convergence of parallel lines Standard example: architecture buildings are taller than you, so you look up top of building is farther away, so it looks smaller Solution: make projection plane parallel to facade top of building is the same distance from the projection plane Same perspective effects can be achieved using postprocessing (though not the focus effects) choice of which rays vs. arrangement of rays in image 2018 Steve Marschner 30

[Philip Greenspun] camera tilted up: converging vertical lines 2018 Steve Marschner 31

[Philip Greenspun] lens shifted up: parallel vertical lines 2018 Steve Marschner 32