1 General Camera ©Anthony Steed 2001-2003. 2 Overview n Simple camera is limiting and it is necessary to model a camera that can be moved n We will define.

Slides:



Advertisements
Similar presentations
Points, Vectors, Lines, Spheres and Matrices
Advertisements

CGPage: 1 We can define a window as a rectangular region of the world coordinate space, and the viewport as a rectangular region of the device coordinate.
Objectives Define Clipping Various clipping methods. Line clipping methods.
3D Graphics Rendering and Terrain Modeling
CLASS 6 PERSPECTIVE CS770/870. Orthographic projections Isometric ObliqueIn isometric all distances along the major axes are the same.
Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0.
CS 325 Introduction to Computer Graphics 02 / 24 / 2010 Instructor: Michael Eckmann.
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
CS485/685 Computer Vision Prof. George Bebis
3-D Geometry.
CS 376 Introduction to Computer Graphics 02 / 26 / 2007 Instructor: Michael Eckmann.
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
7-2 Similarity and transformations
CHAPTER 7 Viewing and Transformations © 2008 Cengage Learning EMEA.
Projection Projection - the transformation of points from a coordinate system in n dimensions to a coordinate system in m dimensions where m
Introduction to 3D Graphics Lecture 3: General Camera Model Anthony Steed University College London.
Introduction to 3D viewing 3D is just like taking a photograph!
CSE 681 Ray Tracing Geometry. The Camera Model Based on a simpile pin-hole camera model –Simplest lens model –Pure geometric optics – based on similar.
Introduction to 3D Graphics Lecture 4: Scenes and Scene Graphs Anthony Steed University College London.
COMP 175: Computer Graphics March 24, 2015
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
3D Viewing Perspective Projections Single Point Perspective COP on X-axis COP (-1/p 0 0 1) VP x (1/p 0 0 1)
UBI 516 Advanced Computer Graphics Three Dimensional Viewing
1 Ray Tracing Polyhedra ©Anthony Steed
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Camera. Content Coordinate systems and transformations Viewing coordinates Coordinate transformation matrix Projections Window and viewport Acknowledgments:
Computer Graphics Bing-Yu Chen National Taiwan University.
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 5.
1 Scene Graphs ©Anthony Steed Scene Graph Overview n Building Scene Structures n Traversal n Examples n Instancing and Re-Use n More Transformations.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
1 Scene Graphs Week 4.2 ©Anthony Steed
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Transformational Geometry CS418 Computer Graphics John C. Hart.
CS 376 Introduction to Computer Graphics 02 / 23 / 2007 Instructor: Michael Eckmann.
Introduction to 3D Graphics Lecture 2: Mathematics of the Simple Camera Anthony Steed University College London.
CS 325 Introduction to Computer Graphics 02 / 26 / 2010 Instructor: Michael Eckmann.
Graphics Graphics Korea University kucg.korea.ac.kr Viewing 고려대학교 컴퓨터 그래픽스 연구실.
Basic Perspective Projection Watt Section 5.2, some typos Define a focal distance, d, and shift the origin to be at that distance (note d is negative)
Geometric Transformations
Three-Dimensional Viewing
1 Mathematics of the Simple Camera. 2 Overview n Simple Camera –Scenes with spheres –COP on +z COP = Centre Of Projection.
Graphics CSCI 343, Fall 2015 Lecture 16 Viewing I
1 Projection: Completing the Camera Model ©Yiorgos Chrysanthou 2001, Anthony Steed
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Cornell CS465 Fall 2004 Lecture 9© 2004 Steve Marschner 1 3D Transformations CS 465 Lecture 9.
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Orthonormal Basis Cartesian Coordinate System – Unit vectors: i, j, k – Normalized to each other – Unique representation for each position!! – Convenient!
Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Computer Graphic 2 D Viewing.
Rendering Pipeline Fall, 2015.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016
Courtesy of Drs. Carol O’Sullivan / Yann Morvan Trinity College Dublin
Mathematics of the Simple Camera
CSCE 441 Computer Graphics 3-D Viewing
Review: Transformations
Points, Vectors, Lines, Spheres and Matrices
3D Transformation Pipeline
WINDOWING AND CLIPPING
WINDOWING AND CLIPPING
Chapter V Vertex Processing
Last Time Canonical view pipeline Projection Local Coordinate Space
Ray Tracing Polyhedra ©Anthony Steed
CSCE441: Computer Graphics Coordinate & Composite Transformations
CSCE441: Computer Graphics 2D/3D Transformations
Window to Viewport Transformations
Viewing Transformations II
CS 352: Computer Graphics Chapter 5: Viewing.
Presentation transcript:

1 General Camera ©Anthony Steed

2 Overview n Simple camera is limiting and it is necessary to model a camera that can be moved n We will define parameters for a camera in terms of where it “is”, the direction it points and the direction it considers to be “up” on the image

3 Simple Camera (Cross Section) Z-Z Y d COP y max y min

4 General Camera n View Reference Point (VRP) where the camera is n View Plane Normal (VPN) where the camera points n View Up Vector (VUV) which way is up to the camera n X (or U-axis) forms LH system

5 UVN Coordinates n View Reference Point (VRP) origin of VC system (VC=View Coordinates) n View Plane Normal (VPN) Z (or N-axis) of VC system n View Up Vector (VUV) determines Y (or V-axis) of VCS n X (or U-axis) forms Left Hand system

6 World Coords and Viewing Coords Y X Z V U N VUV VRP We want to find a general transform (EQ1) of the above form that will map WC to VC

7 View from the Camera VUV N and VPN into the page U V XY Z xmin, ymin xmax, ymax

8 Finding the basis vectors n Step 1 - find n n Step 2 - find u n Step 3 - find v

9 Finding the Mapping (1) n u,v,n must rotate under R to i,j,k of viewing space n Both basis are normalised so this is a pure rotation matrix recall in this case R T = R -1

10 Finding the Mapping (2) n In uvn system VRP (q) is ( ) n And we know from EQ1 so

11 Complete Mapping n Complete matrix

12 For you to check n If n Then

13 Using this for Ray-Casting n Use a similar camera configuration (COP is usually, but not always on -n) n To trace object must either transform spheres into VC transform rays into WC

14 Ray-casting n Transforming rays into WC Transform end-point once Find direction vectors through COP as before Transform vector by Intersect spheres in WC

15 Ray-casting n Transforming spheres into VC Centre of sphere is a point so can be transformed as usual (WC to VC) Radius of sphere is unchanged by rotation and translation (and spheres are spheroids if there is a non-symmetric scale)

16 Tradeoff n If more rays than spheres do the former transform spheres into VC n For more complex scenes e.g. with polygons transform rays into WC

17 Alternative Forms of the Camera n Simple “Look At” Give a VRP and a target (TP) VPN = TP-VRP VUV = (0 1 0) (i.e. “up” in WC) n Field of View Give horizontal and vertical FOV or one or the other and an aspect ratio Calculate viewport and proceed as before

18 Animated Cameras n Animate VRP (observer-cam) n Animate VPN (look around) n Animate TP (track-cam) n Animate COP along VPN - zoom orthogonal to VPN - distort

19 Recap n We created a more general camera which we can use to create views of our scenes from arbitrary positions n Formulation of mapping from WC to VC (and back)