Intro to Camera Models Photography: scene (captures processing - - PDF document

intro to camera models
SMART_READER_LITE
LIVE PREVIEW

Intro to Camera Models Photography: scene (captures processing - - PDF document

Computer Graphics as Virtual Photography real camera photo Photographic Intro to Camera Models Photography: scene (captures processing print light) processing camera Computer 3D tone synthetic model Graphics: models image


slide-1
SLIDE 1

1

Intro to Camera Models

Computer Graphics as Virtual Photography

camera (captures light) synthetic image camera model (focuses simulated lighting)

processing

photo processing tone reproduction real scene 3D models Photography: Computer Graphics: Photographic print

3d viewing as a Kodak moment

 3D viewing is much like photography

 Set up a scene  Grab a camera  Take a snapshot

 Final print is a 2D representation  Of the 3D scene  Taken from a given perspective

Projection

 The role of cameras can be described as

projecting a 3D scene onto a 2D plane

Graphics Pipeline

3D Object Coordinates 3D World Coordinates 3D Eye Coordinates 3D Eye Coordinates 2D Eye Coordinates 2D Screen Coordinates Object Transformation Viewing Transformation 3D Clipping Projection Window to Viewport Mapping

Projection

 Projection terminology

 Center of projection

 During the projection, points in the scene will

converge to a given point.

 This point is the center of projection

 Projection plane

 2D plane upon which the 3D scene is getting

projected

slide-2
SLIDE 2

2

Projection

 Projection types

 Parallel Projection

 Sometimes called Orthographic Projection  Objects of equal size appear the same size

after projected, regardless of the distance they are from the viewing plane.

 The Center of Projection is at infinity

Projection

 Parallel Projection

View plane Object in 3D scene Center of projection at infinity

Projection

 Projection types

 Perspective Projection

 Sometimes called Frustrum Projection  Objects closer to the view plane will appear

larger when projected than objects of the same size that are farther from the view point.

 The Center of Projection is at camera location

(eyepoint)

 This is the projection used by “real” cameras

Projection

 Perspective Projection

Projection

 Perspective  Parallel

Cameras in Computer Graphics

 Just like in photography,

 Your camera will define what part of the scene

you can see.

 Based on:

 Projection type used by camera  Location of camera  Direction of camera  Orientation of camera  “Range” of your camera

 All of the above will define a view volume

 All objects in the view volume are seen by the camera

slide-3
SLIDE 3

3

View Volumes Camera Coordinates

 Camera Orientation

 The camera has it’s own 3D coordinate

system based on it’s orientation

 u,v,n  u corresponds to x (as seen by the camera)  v corresponds to y (as seen by the camera)  n corresponds to z (as seen by the camera)  Negative n is into the scene

Graphics Pipeline

3D Object Coordinates 3D World Coordinates 3D Eye Coordinates 3D Eye Coordinates 2D Eye Coordinates 2D Screen Coordinates Object Transformation Viewing Transformation 3D Clipping Projection Window to Viewport Mapping

Camera coordinates

 Defining camera orientation

 Provide the camera location (eyepoint)  Indicate what direction the camera is looking

(lookat)

 Give the “up” direction of the camera  Then

 n = eyepoint – lookat  u = up x n  v = n x u

 Note: right handed coordinate system

View Volumes

 Also needed to define the view volumes

 Location of the near and far clipping planes  This will give you the “range” of the

camera

View Volumes

 Let’s see all this in action!

 (SIGGRAPH projection tutorial)

slide-4
SLIDE 4

4

Camera Coordinates

 View coordinate system may not coincide

with world coordinate system.

 Must transform point in world (x,y,z) to a

point in coordinate system of view (u,v,n)

  • =
  • 1

1 z y x M n v u

Camera Coordinates

 (ux,uy,uz) are coordinates of unit u vector w.r.t. world space

 Similar for v, n,

 (eye) is the origin of view space w.r.t world space

 If ups are aligned, simply

use negative eye location values in the fourth column

            = 1

z y x z y x z y x

n n n v v v u u u M

  • eye• u
  • eye• v
  • eye• n

Projection

 Now that you’re in u,v,n space, you still need

to perform the perspective projection.

Graphics Pipeline

3D Object Coordinates 3D World Coordinates 3D Eye Coordinates 3D Eye Coordinates 2D Eye Coordinates 2D Screen Coordinates Object Transformation Viewing Transformation 3D Clipping Projection Window to Viewport Mapping

Projection

d p p d p

n u u

+ =

  • d

p p d p

n v v

+ =

  • 1

+ =

  • d

p p p

n u u

1 + =

  • d

p p p

n v v

Projection

 Recall homogeneous coordinates

 (X,Y,Z,W) where x = X/W, y = Y/W, z =

Z/W

W p d p p p

u n u u

= + =

  • 1

W p d p p p

v n v v

= + =

  • 1

1 + = d p W

n

slide-5
SLIDE 5

5

Projection

 In Matrix form:

  • =
  • =
  • 1

1 1 1 1 1 1 n v u P n v u d W P P P

n v u

Projection

 Combine with your coordinate system

transform

  • =
  • 1

z y x n v u

p p p PM w P P P

Camera Coordinates

 The whole image generation process is

nothing more than a series of concatenated transformations

 Note that explicit projection is

unnecessary in ray tracing as it is done as part of the ray tracing process.

Homogeneous Matrices

{ {

world camera to world 44 43 42 41 34 33 32 31 24 23 22 21 14 13 12 11 projection 44 43 42 41 34 33 32 31 24 23 22 21 14 13 12 11 plane view

1

  • =
  • w

w w v v v

z y x m m m m m m m m m m m m m m m m p p p p p p p p p p p p p p p p w z y x 4 4 4 4 3 4 4 4 4 2 1 4 4 4 4 3 4 4 4 4 2 1

Graphics Pipeline

3D Object Coordinates 3D World Coordinates 3D Eye Coordinates 3D Eye Coordinates 2D Eye Coordinates 2D Screen Coordinates Object Transformation Viewing Transformation 3D Clipping Projection Window to Viewport Mapping

Projection

 And this is how it’s done in computer

graphics

 Use homogeneous coordinates to

include perspective transformation in matrix transform chain.

 So how does all this relate to real

cameras...

slide-6
SLIDE 6

6

The Pinhole Camera

 CG uses the pinhole camera model

The Pinhole Camera

 However

 Real cameras have real openings

(apertures) -- depth of field

 Shutter speed is not instantaneous --

motion blur

 Projection is not necessarily perfectly

perspective – lens warping

Depth of field Motion blur Realistic Lens models

16mm fisheye 200mm telephoto 50mm double-Gauss 35mm wide-angle

Realistic Camera Models

 We will talk more about more

accurately modeling “real” cameras later in the quarter.

 Questions?

slide-7
SLIDE 7

7

Questions?