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

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

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

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

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

Three-Dimensional Viewing Hearn & Baker Chapter 7

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

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE328 Fundamentals of Computer Graphics

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

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

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

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

Lecture 4. Viewing, Projection and Viewport Transformations

Computer Graphics 7: Viewing in 3-D

COMP30019 Graphics and Interaction Perspective Geometry

Viewing with Computers (OpenGL)

CS 4204 Computer Graphics

INTRODUCTION TO COMPUTER GRAPHICS. cs123. It looks like a matrix Sort of. Viewing III. Projection in Practice 1 / 52

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

Overview. By end of the week:

Models and The Viewing Pipeline. Jian Huang CS456

Game Architecture. 2/19/16: Rasterization

Chapter 5. Projections and Rendering

Reading on the Accumulation Buffer: Motion Blur, Anti-Aliasing, and Depth of Field

1 OpenGL - column vectors (column-major ordering)

Shadows in the graphics pipeline

COSC579: Scene Geometry. Jeremy Bolton, PhD Assistant Teaching Professor

Chapter 8 Three-Dimensional Viewing Operations

Raycasting. Chapter Raycasting foundations. When you look at an object, like the ball in the picture to the left, what do

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

(Refer Slide Time: 00:01:26)

Computer Graphics. Ch 6. 3D Viewing

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

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

Viewing. Reading: Angel Ch.5

Chapter 12 Notes: Optics

lecture 10 - depth from blur, binocular stereo

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

COMP3421. Introduction to 3D Graphics

Perspective matrix, OpenGL style

Tutorial 4: Texture Mapping Techniques

Geometry: Outline. Projections. Orthographic Perspective

Introduction to 3D Concepts

CS4670: Computer Vision

Projection Matrix Tricks. Eric Lengyel

COMP3421. Introduction to 3D Graphics

COMP30019 Graphics and Interaction Perspective & Polygonal Geometry

Prof. Feng Liu. Fall /19/2016

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

Camera Calibration for Video See-Through Head-Mounted Display. Abstract. 1.0 Introduction. Mike Bajura July 7, 1993

COMP 175 COMPUTER GRAPHICS. Ray Casting. COMP 175: Computer Graphics April 26, Erik Anderson 09 Ray Casting

Chapter 12-Close-Up and Macro Photography

CS6670: Computer Vision

Computer Graphics. Chapter 1 (Related to Introduction to Computer Graphics Using Java 2D and 3D)

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

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

CSE452 Computer Graphics

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

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

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

The mathematics behind projections

Computer Graphics. Chapter 10 Three-Dimensional Viewing

Figure 1. Lecture 1: Three Dimensional graphics: Projections and Transformations

COMPUTER AIDED ARCHITECTURAL GRAPHICS FFD 201/Fall 2013 HAND OUT 1 : INTRODUCTION TO 3D

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

Scene Modeling for a Single View

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

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

Computer Science 474 Spring 2010 Viewing Transformation

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

ECE-161C Cameras. Nuno Vasconcelos ECE Department, UCSD

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

Camera Actions. Shots, Angles & Movements

Scene Modeling for a Single View

AP Physics: Curved Mirrors and Lenses

OpenGL Transformations

Chap 7, 2008 Spring Yeong Gil Shin

Rendering If we have a precise computer representation of the 3D world, how realistic are the 2D images we can generate? What are the best way to mode

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

5.8.3 Oblique Projections

Perspective projection. A. Mantegna, Martyrdom of St. Christopher, c. 1450

CS201 Computer Vision Lect 4 - Image Formation

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

Working with the BCC Z Space II Filter

3D Rendering and Ray Casting

CMPSCI 670: Computer Vision! Image formation. University of Massachusetts, Amherst September 8, 2014 Instructor: Subhransu Maji

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

Scene Modeling for a Single View

two using your LensbAby

Scanline Rendering 1 1/42

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

2D Transforms. Lecture 4 CISC440/640 Spring Department of Computer and Information Science

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

Module 4A: Creating the 3D Model of Right and Oblique Pyramids

How to print a Hypercube

Chapter 32 Light: Reflection and Refraction. Copyright 2009 Pearson Education, Inc.

Viewing COMPSCI 464. Image Credits: Encarta and

Digital Imaging Study Questions Chapter 8 /100 Total Points Homework Grade

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

Understanding Variability

Transcription:

3D Viewing: the Synthetic Camera Programmer s reference model for specifying 3D view projection parameters to the computer General synthetic camera (e.g., PHIGS Camera, Computer Graphics: Principles and Practice, ch. 6 and 7) position of camera orientation field of view (wide angle, normal ) depth of field (near distance, far distance) focal distance tilt of view/film plane (if not normal to view direction, produces oblique projections) perspective or parallel projection? (camera near objects or an infinite distance away) We use a simpler, slightly less powerful model omit tilt of view/film plane, focal distance (blurring) Programmer s Hierarchical Interactive Graphics System, an ANSI/ISO standard library/api; see also PHIGS+, GKS (2D) Andries van Dam September 18, 2001 3D Viewing II 1/20

View Volumes A view volume contains everything visible from the point of view or direction: what does the camera see? Conical view volumes: approximates what eye sees expensive math (simultaneous quadratics) when clipping objects against cone s surface Can approximate with rectangular cone instead (called a frustum) works well with a rectangular viewing window simultaneous linear equations for easy clipping conical perspective view volume frustum approximation Andries van Dam September 18, 2001 3D Viewing II 2/20

Conceptual Model of 3D Viewing Process (for wireframe) Viewport is rectangular area of the screen where a scene is rendered this may or may not fill Window Manager s window note: window in computer graphics often means a 2D clip rectangle on a 2D world coordinate drawing, and viewport is the 2D integer coordinate region of screen space to which the clipped window contents are mapped. Window/viewport terminology considerably predates Window Manager terminology Viewport and film plane may have different aspect ratios viewport mapping specifies what to do if aspect ratios differ Andries van Dam September 18, 2001 3D Viewing II 3/20

View Volume (1/2) We need to know six things about our synthetic camera model in order to take a picture Up vector Width angle Look vector Height angle Position Front clipping plane Back clipping plane Position of the camera (from where it s looking) The Look vector specifies in what direction the camera is pointing The camera s Orientation is determined by the Look vector and the angle through which the camera is rotated about that vector, i.e., the direction of the Up vector Andries van Dam September 18, 2001 3D Viewing II 4/20

View Volume (2/2) Aspect ratio of the electronic film: ratio of width to height Height angle: determines how much of the scene we will fit into our view volume; larger height angles fit more of the scene into the view volume the greater the angle, the greater the amount of perspective distortion Front and back clipping planes: limit extent of camera s view by rendering (parts of) objects lying between them and throwing away everything outside of them Optional parameter Focal length: often used for photorealistic rendering; objects at distance Focal length from camera rendered in sharp detail, objects closer or farther away get blurred; reduction in visibility is continuous your camera won t be implementing focal length blurring Andries van Dam September 18, 2001 3D Viewing II 5/20

Position Determining the Position is analogous to a photographer deciding the vantage point from which to shoot a photo Three degrees of freedom: x, y, and z coordinates in 3-space This x, y, z coordinate system is right-handed: if you open your right hand, align your fingers with the +x axis, and curl them towards the +y axis, your thumb will point along the +z axis Andries van Dam September 18, 2001 3D Viewing II 6/20

Orientation Orientation is specified by a point in 3D space to look at (or a direction to look in) and an angle of rotation about this direction Default orientation is looking down the negative z- axis and up direction pointing straight up the y-axis y x -z Up vector camera Position Look vector point to look at (x, y, z ) the camera shown above is located at the origin and is looking at an arbitrary point with an arbitrary up direction z This is a little abstract easier formulation? Andries van Dam September 18, 2001 3D Viewing II 7/20

More concrete way to say the same thing as orientation soon you ll learn how to express orientation in terms of Look and Up vectors Look Vector the direction the camera is pointing three degrees of freedom; can be any vector in 3-space Up Vector Look and Up Vectors determines how the camera is rotated around the Look vector for example, whether you re holding the camera horizontally or vertically (or in between) projection of Up vector must be in the plane perpendicular to the look vector (this allows Up vector to be specified at an arbitrary angle to its Look vector) projection of Up vector Up vector Look vector Position Andries van Dam September 18, 2001 3D Viewing II 8/20

Aspect Ratio Analogous to the size of film used in a camera Determines proportion of width to height of image displayed on screen Square viewing window has aspect ratio of 1:1 Movie theater letterbox format has aspect ratio of 2:1 NTSC television has an aspect ratio of 4:3, and HDTV is 16:9 Kodak HDTV 16:9 NTSC 4:3 Andries van Dam September 18, 2001 3D Viewing II 9/20

View Angle (1/2) Determines amount of perspective distortion in picture, from none (parallel projection) to a lot (wideangle lens) In a frustum, two viewing angles: width and height angles. We specify Height angle, and get the Width angle from (Aspect ratio * Height angle) Choosing View angle analogous to photographer choosing a specific type of lens (e.g., a wide-angle or telephoto lens) Andries van Dam September 18, 2001 3D Viewing II 10/20

View Angle (2/2) Lenses made for distance shots often have a nearly parallel viewing angle and cause little perspective distortion, though they foreshorten depth Wide-angle lenses cause a lot of perspective distortion Resulting pictures Andries van Dam September 18, 2001 3D Viewing II 11/20

Front and Back Clipping Planes (1/2) Volume of space between Front and Back clipping planes defines what camera can see Position of planes defined by distance along Look vector Objects appearing outside of view volume don t get drawn Objects intersecting view volume get clipped Front clipping plane Back clipping plane Andries van Dam September 18, 2001 3D Viewing II 12/20

Front and Back Clipping Planes (2/2) Reasons for Front (near) clipping plane: Don t want to draw things too close to the camera would block view of rest of scene objects would be prone to distortion Don t want to draw things behind camera wouldn t expect to see things behind the camera in the case of the perspective camera, if we decided to draw things behind the camera, they would appear upside-down and inside-out because of perspective transformation Reasons for Back (far) clipping plane: Don t want to draw objects too far away from camera distant objects may appear too small to be visually significant, but still take long time to render by discarding them we lose a small amount of detail but reclaim a lot of rendering time alternately, the scene may be filled with many significant objects; for visual clarity, we may wish to declutter the scene by rendering those nearest the camera and discarding the rest Andries van Dam September 18, 2001 3D Viewing II 13/20

Focal Length Some camera models take a Focal length Focal Length is a measure of ideal focusing range; approximates behavior of real camera lens Objects at distance of Focal length from camera are rendered in focus; objects closer or farther away than Focal length get blurred Focal length used in conjunction with clipping planes Only objects within view volume are rendered, whether blurred or not. Objects outside of view volume still get discarded Andries van Dam September 18, 2001 3D Viewing II 14/20

What This Camera Model Can And Cannot Do It can create the following view volumes: perspective: positive view angle parallel: zero view angle Model cannot create oblique view volume Non-oblique vs. oblique view volumes: Look vector is perpendicular to film plane Non-oblique view volume: Look vector is at an angle to the film plane Oblique view volume: For example, view cameras with bellows are used to take pictures of (tall) buildings. The film plane is parallel to the façade, while the camera points up. This is an oblique view volume, with the façade undistorted Andries van Dam September 18, 2001 3D Viewing II 15/20

View Volume Specification From Position, Look vector, Up vector, Aspect ratio, Height angle, Clipping planes, and (optionally) Focal length together specify a truncated view volume Truncated view volume is a specification of bounded space that camera can see 2D view of 3D scene can be computed from truncated view volume and projected onto film plane Truncated view volumes come in two flavors: parallel and perspective Andries van Dam September 18, 2001 3D Viewing II 16/20

Truncated View Volume for Orthographic Parallel Projection Limiting view volume useful for eliminating extraneous objects Orthographic parallel projection has width and height view angles of zero Far distance Width Near distance Look vector Height Up vector Position Andries van Dam September 18, 2001 3D Viewing II 17/20

Truncated View Volume (Frustum) for Perspective Projection Removes objects too far from Position, which otherwise would merge into blobs Removes objects too close to Position (would be excessively distorted) Up vector Look vector Width angle = Height angle Aspect ratio Position Near distance Height angle Far distance Andries van Dam September 18, 2001 3D Viewing II 18/20

Where s My Film? Real cameras have a roll of film that captures pictures Synthetic camera film is a rectangle on an infinite film plane that contains image of scene Why haven t we talked about the film in our synthetic camera, other than mentioning its aspect ratio? How is the film plane positioned relative to the other parts of the camera? Does it lie between the near and far clipping planes? Behind them? Turns out that fine positioning of Film plane doesn t matter. Here s why: for a parallel view volume, as long as the film plane lies in front of the scene, parallel projection onto film plane will look the same no matter how far away film plane is from scene same is true for perspective view volumes, because the last step of computing the perspective projection is a transformation that stretches the perspective volume into a parallel volume To be explained in detail in the next lecture In general, it is convenient to think of the film plane as lying at the eye point (Position) Andries van Dam September 18, 2001 3D Viewing II 19/20

Sources Carlbom, Ingrid and Paciorek, Joseph, Planar Geometric Projections and Viewing Transformations, Computing Surveys, Vol. 10, No. 4 December 1978 Kemp, Martin, The Science of Art, Yale University Press, 1992 Mitchell, William J., The Reconfigured Eye, MIT Press, 1992 Foley, van Dam, et. al., Computer Graphics: Principles and Practice, Addison-Wesley, 1995 Wernecke, Josie, The Inventor Mentor, Addison- Wesley, 1994 Andries van Dam September 18, 2001 3D Viewing II 20/20