Overview
To understanding the rendering process, you must master the procedure that specifies a camera and then constructs a transformation that projects a three-dimensional scene onto a two-dimensional screen. This procedure has two several components: First, the specification of a camera model; second, the conversion of the scene's coordinates from Cartesian space to the space of the camera; and finally the specification of a viewing transformation that projects that scene into image space
For a pdf version of these notes look
here.
The Camera Model
We specify our initial camera model by identifying the following parameters.
The specification of
,
and
forms a viewing volume
in the shape of a pyramid with the camera position
at the apex
of the pyramid and the vector
forming the axis of the
pyramid. This pyramid is commonly referred to as the viewing
pyramid. The specification of the near and far planes forms a
truncated viewing pyramid which gives the region of space which
contains the primary portion of the scene to be
viewed (We note that objects may extend outside the trunchated
pyramid. In many situations polygons will lie between the near plane
and the camera, or, in distance, beyond the far plane.).
The
viewing transform,
transforms this truncated pyramid onto the image space volume
.
The Camera Transform
Given the definition of a camera
,
the camera transformation is a combination of a transform that
first converts the coordinates of the Cartesian frame to the local
coordinates of the camera's frame,
and second, applies the viewing transform.
These two transformations are
usually multiplied together to form a single
matrix that
is applied to all points of the scene.
Defining a Frame at the Camera Position
The main idea here is to define a frame
at the camera position. Given such a frame
,
we generate a transformation
that converts the Cartesian Frame coordinates to the
camera's frame.
To define a frame at the camera position is easy - and there are actually an number of ways of doing this. One of the vectors is obvious - that is, we want
In order to define the other vectors that make up the frame, we must
make an assumption. We assume that
the vertical direction of the camera must be in the plane defined by
and the vector
. This frequently happens when you are
taking a picture, if you think about it - and it actually fairly easy
to arrange. See the following figure for an illustration of this
process. In the figure, the dotted line is the direction of view, and
should be placed on the negative
axis by the transformation.
To define
and
we utilize the following steps
We note that this works well, except when you wish to have the camera
look in the direction
or
. In these cases, either
or
and
, and we cannot
calculate a frame in this manner. However, we can utilize another
vector as the ``up direction'' to utilize with
to obtain
.
Calculating the Matrix
To calculate the actual matrix that implements the transformation, we
can write each of the vectors
,
and
as a linear combination of
,
, and
(Since the vectors defining
are linearly
independent).
In addition, we can write the vector
as a linear
combination of
,
and
. Thus we can calculate the
values
, where
, |
||
, and |
||
![]() |
, |
|
, and |
|
![]() |
, |
|
, and |
|
![]() |
, |
|
, and |
|
![]() |
The matrix that convets the coordinates of objects in
the frame
into coordinates for the frame
is given by
We note, that by our construction, the frame
is an
orthonormal frame (all vectors are unit vectors and are mutually
perpendicular) and in this case the equations above simplify
tremendously.
In particular, all the denominators
, and we can simplify the numerators utilizing the identities
Overview
The camera transform is a Cartesian-frame-to-frame transform. This is combined with the viewing transform to give a transformation that converts a scene into image space.
Return to
the Graphics Notes Home Page
Return
to the Geometric Modeling Notes Home Page
Return
to the UC Davis Visualization and Graphics Group Home Page
This document maintained by Ken Joy
All contents copyright (c) 1996, 1997, 1998,
1999
Computer Science Department
University of California, Davis
All rights reserved.