The Camera - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

The Camera

Description:

Chapter 14: The Camera This Chapter: we will learn about Requirements of a Computer Graphics Camera Visible Volumes Perspective vs Orthorgraphics Coordinate Systems ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 31
Provided by: deptsWash8
Category:
Tags: camera | space | vector

less

Transcript and Presenter's Notes

Title: The Camera


1
  • Chapter 14
  • The Camera

2
This Chapter we will learn about
  • Requirements of a Computer Graphics Camera
  • Visible Volumes
  • Perspective vs Orthorgraphics
  • Coordinate Systems
  • Eye (Camera) Coordinate System
  • 3D Normalized Device Coordinate System
  • 3D to 2D Perspective Projection

3
A Computer Graphics Camera
  • Camera position
  • Look at position
  • Up direction
  • Related terms
  • Image Plane
  • Viewing Direction
  • View Vector

4
The Up Direction (Up Vector)
  • Also referred to as Twist Angle
  • Cannot be parallel to viewing direction
  • Does not need to be normalized
  • Does not need to be perpendicular toviewing
    direction

5
Tut 14.1 Viewing Parameters
  • All viewing parameterscontrolled by slider bars

6
Tut 14.1 Controlling the Up Vector
  • zslider
  • Twist angle
  • not perpendicularto View Vector!

7
The Visible Volume
  • Only geometries (primitives) inside the volume
    are visible
  • All geometries (primitives) outside are ignored
  • Primitives straddle the volume are Clipped!

8
The Rectangular Visible Volume
  • Volume defined by
  • Near Plane (n)
  • Far Plane (f)
  • Width (W)
  • Height (H)
  • For Orthographic Projection

9
Tut 14.2 Rectangular Visible Volume
  • Experiment withRectangularVisibleVolume

10
Tut 14.2 Orthographic Projection
11
The Viewing Frustum Volume
  • Volume defined by
  • Near Plane (n)
  • Far Plane (f)
  • Fields of view (fov)
  • For Orthographic Projection

12
Near Plane and Aspect Ratio
  • Aspect Ratio
  • Near Plane
  • Height (nh)
  • Width (nw)

13
Tut 14.3 Viewing Frustum
  • Experiment withViewing Frustum

14
Tut 14.3 Perspective Projection
15
Orthographic vs Perspective Projection
  • Orthographic Projection
  • Parallel projection
  • Preserve size
  • Good for determining relative size
  • Perspective Projection
  • Projection along rays
  • Closer objects appears larger
  • Human vision!
  • Only work with Perspective Projection

16
Near-to-Far Plane distance
  • Fixed number of bits to resolve distance
  • E.g. 16-bits Unique positions
  • If (f-n)18
  • resolve distances larger than
  • If (f-n) 106
  • resolve distance larger than
  • Rule of Thumb
  • Minimize f and maximize n
  • f-n As tight as possible

17
Tut 14.4 Near/Far Distance
  • Two squares very closeto each other
  • Set n/f values to see errors!!

18
Coordinate Transformation Pipeline
  • Recall
  • Transforms
  • World Transform (MW)
  • Object Space (OC) To World Space (WC)
  • View Transform (MV)
  • WC to Eye (Camera) Space (EC)
  • Projection Transform (MP)
  • EC To NDC (Normalize Device)

19
The MW World Transform
  • Transformation
  • From Object Space to World Space
  • Identical to 2D!
  • Refer to discussions
  • In Chapter 11 World Coordinate System
  • Library Implementation
  • SceneNodes Transform operator!
  • DrawHelper Matrix Stack Manipulations!

20
The MV View Transform
  • Transformation
  • From World to Eye Space
  • Referred to as
  • Eye, or View, or Camera Transform
  • Topics
  • Eye Coordinate Orthonormal Basis
  • The Eye Coordinate (EC) Space
  • Aligning EC and WC Orthonormal Basis
  • The WC to EC Transform

21
The EC Orthonormal Basis
  • Viewing Parameters Eye Position At
    Position Up Vector
  • View Vector
  • Side Vector
  • Adjusted Up Vector

22
Example
23
The Eye Coordinate Space
  • Origin eye position
  • Axes Directions
  • View -z
  • Up y
  • Side x
  • Visible Volume
  • Near z-n
  • Far z-f

24
Align EC and WC Orthonormal Basis
25
MV Mw2e WC To EC Transform
26
Inverse Transform Me2w
  • Row-4 is The Eye Position!!

27
The MP Projection Transform
  • Transform from EC to NDC
  • Recall NDC Range
  • Transform
  • Squeeze the View Frustum into NDC Cube

28
View Frustum to NDC Cube
29
3D NDC to 2D Image (Near) Plane
30
Re-Examine Tutorial 13.1
  • GrfxWindowOnPaint()
Write a Comment
User Comments (0)
About PowerShow.com