Graphics Reference
In-Depth Information
the view vector. We can compute the adjusted up vector:
V
u
=
V
v
×
V
w
.
With normalization, we define
EC orthonormal basis.
The
camera space, or camera coor-
dinate, orthonormal basis and
the EC orthonormal basis are
used interchangeably.
⎧
⎨
V
w
=(
x
w
,
y
w
,
z
w
)
,
V
u
=(
EC orthonormal basis:
x
u
,
y
u
,
z
u
)
,
(14.3)
⎩
V
v
=(
x
v
,
y
v
,
z
v
)
.
These three unit vectors are perpendicular to each other, and the directions of
these three vectors agree with the axes of the right-handed coordinate system.
For example, if we consider
V
w
to be in the
x
-direction, then
V
u
is in the
y
-axis
direction, and
V
v
is in the
z
-axis direction.
y
View
Vector
(
V
v
)
(
V
u
)
(-
V
w
)
z
x
Eye
Position (p
e
)
14.5.2
Eye Coordinate (EC) Space
The
eye coordinate
(EC) space is defined with reference to the EC orthonormal
basis. As illustrated in Figure 14.17, the EC is a right-handed coordinate system
such that
Figure 14.17.
The eye
coordinate space
.
•
Origin.
The eye position
p
e
is the origin.
•
Axes directions.
The view vector
V
v
points in the
negative z
-direction, the
adjusted up vector
V
u
is in the
y
-direction, and the
V
w
vector points in the
x
-direction.
In the EC space with the eye located at the origin looking toward the negative
z
-axis, the
z
-components tell us the distance to the eye:
•
Visible volume.
If the near and far planes are
n
and
f
units from the cam-
era, then the near plane is located at
z
=
−
n
, and the far plane at
z
=
−
f
.
We know that only objects with
z
-component within the range
−
f
≤
object
.
z
≤−
n
are inside the visible volume. All other objects are outside of the visible
volume and cannot participate in the rendering process.
•
Object depth ordering.
Objects' relative ordering from the camera can be
easily determined from their
z
-component: the larger the value, the closer
the object is to the camera. The Z-buffer algorithm takes advantage of this
characteristic to resolve object occlusion when projecting 3D objects to the
2D image plane.
Search WWH ::
Custom Search