- Forward


Viewing for 3D Graphics
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

Introduction
Back SMYC Forward
  • An Important Issue:
    • Determining what part of a scene is visible
  • Gainining Some Intuition:
    • A camera only takes a picture of part of the scene
  • A Common Approach:
    • Use the concept of a pinhole camera (rather than, say, a single lens reflex camera) but put the "film" (called the view plane or screen) in front of the pinhole
The Axis-Aligned Case
Back SMYC Forward
  • Visualization:
    • view_axis-aligned
  • Notation:
    • \(\bs{u}\), \(\bs{v}\), and \(\bs{w}\) denote the coordinate axes (i.e., the basis) for the view
    • \(\bs{e}\) denotes the eye/pinhole position (in scene/world coordinates) which is the origin in view coordinates
    • \(\bs{c}\) denotes the lower-left corner of the view plane
  • Notes:
    • Nothing between the eye and the view plane is visible
    • The "chopped pyramid" shape that contains everything that can be seen is a frustum (the walls of which are the clipping planes)
The General Case
Back SMYC Forward
  • Desirable Functionality:
    • The ability to position the eye/camera anywhere and have it point in any direction
  • Visualization (when Centered):
    • view_general-centered
  • Notation:
    • \(\bs{g}\) denotes the gaze direction (which is normal to the view plane)
    • \(\bs{h}\) denotes the head-up direction
The General Case (cont.)
Back SMYC Forward
  • What's Needed:
    • A basis for the view plane (with \(\bs{e}\) at the origin)
  • Determining \(\bs{w}\):
    • The opposite direction of \(\bs{g}\), and with unit length. So, \(\bs{w} = -\frac{\bs{g}}{||\bs{g}||}\).
  • Determining \(\bs{u}\):
    • Orthogonal to both \(\bs{h}\) and \(\bs{w}\), and with unit length. So, \(\bs{u} = -\frac{\bs{h} \times \bs{w}} {||\bs{h} \times \bs{w}||}\).
  • Determining \(\bs{v}\):
    • Orthogonal to \(\bs{w}\) and \(\bs{u}\), and with unit length. So, \(\bs{v} = \bs{w} \times \bs{u}\) (which has unit length).
The General Case (cont.)
Back SMYC Forward
  • Another Consideration:
    • The shape of the pixels
  • For Square Pixels:
    • Must ensure that \(\frac{2u}{2v} = \frac{u}{v}\) equals the aspect ratio (i.e., the width divided by the height)
Specifying Parameters
Back SMYC Forward
  • An Observation:
    • There are many different ways to specify the parameters of this model
  • A Common Approach:
    • Use the focal length (i.e., the distance between the eye/camera and the view plane), the vertical field of view (which is an angular measure), and the aspect ratio
Specifying Parameters (cont.)
Back SMYC Forward
  • A Visualization:
    • view_field-of-view
  • Interpretation:
    • We are looking at the view plane "edge on" (so \(\bs{u}\) is pointing out of the illustration)
  • Notation:
    • \(\phi\) denotes the (vertical) field of view
    • \(s\) denotes the focal length
  • Use:
    • The "half height" can be calculated from \(\phi\) and \(s\)
    • The "half width" can be calculated from the "half height" and the aspect ratio
What's Missing?
Back SMYC Forward
  • Depth of Field:
    • Not all objects in the scene are in focus
  • Aperture:
    • The amount of light that enters the eye/camera
There's Always More to Learn
Back -