i
i
i
i
i
i
i
i
Chapter 1
Introduction
Real-time rendering is concerned with making images rapidly on the com-
puter. It is the most highly interactive area of computer graphics. An
image appears on the screen, the viewer acts or reacts, and this feedback
affects what is generated next. This cycle of reaction and rendering hap-
pens at a rapid enough rate that the viewer does not see individual images,
but rather becomes immersed in a dynamic process.
The rate at which images are displayed is measured in frames per sec-
ond (fps) or Hertz (Hz). At one frame per second, there is little sense of
interactivity; the user is painfully aware of the arrival of each new image.
At around 6 fps, a sense of interactivity starts to grow. An application
displaying at 15 fps is certainly real-time; the user focuses on action and
reaction. There is a useful limit, however. From about 72 fps and up,
differences in the display rate are effectively undetectable.
Watching images flicker by at 60 fps might be acceptable, but an even
higher rate is important for minimizing response time. As little as 15 mil-
liseconds of temporal delay can slow and interfere with interaction [1329].
There is more to real-time rendering than interactivity. If speed was the
only criterion, any application that rapidly responded to user commands
and drew anything on the screen would qualify. Rendering in real-time
normally means three-dimensional rendering.
Interactivity and some sense of connection to three-dimensional space
are sufficient conditions for real-time rendering, but a third element has
become a part of its definition: graphics acceleration hardware. While
hardware dedicated to three-dimensional graphics has been available on
professional workstations for many years, it is only relatively recently that
the use of such accelerators at the consumer level has become possible.
Many consider the introduction of the 3Dfx Voodoo 1 in 1996 the real
beginning of this era [297]. With the recent rapid advances in this market,
add-on three-dimensional graphics accelerators are as standard for home
computers as a pair of speakers. While it is not absolutely required for real-
1
i
i
i
i
i
i
i
i
2 1. Introduction
Figure 1.1. A wonderful image from the Toy Shop demo [1246, 1247, 1249], generated at
interactive rates. (Image courtesy of Natalya Tatarchuk, ATI Research, Inc.)
time rendering, graphics accelerator hardware has become a requirement
for most real-time applications. An excellent example of the results of
real-time rendering made possible by hardware acceleration is shown in
Figure 1.1.
In the past few years advances in graphics hardware have fueled an
explosion of research in the field of interactive computer graphics. We will
focus on providing methods to increase speed and improve image quality,
while also describing the features and limitations of acceleration algorithms
and graphics APIs. We will not be able to cover every topic in depth, so our
goal is to introduce concepts and terminology, give a sense of how and when
various methods can be applied, and provide pointers to the best places to
go for more in-depth information. We hope our attempts to provide you
with tools for understanding this field prove to be worth the time and effort
you spend with our book.
1.1 Contents Overview
What follows is a brief overview of the chapters ahead.
i
i
i
i
i
i
i
i
1.1. Contents Overview 3
Chapter 2, The Graphics Rendering Pipeline. This chapter deals with the
heart of real-time rendering, the mechanism that takes a scene description
and converts it into something we can see.
Chapter 3, The Graphics Processing Unit. The modern GPU implements
the stages of the rendering pipeline using a combination of fixed-function
and programmable units.
Chapter 4, Transforms. Transforms are the basic tools for manipulating
the position, orientation, size, and shape of objects and the location and
view of the camera.
Chapter 5, Visual Appearance. This chapter begins discussion of the defi-
nition of materials and lights and their use in achieving a realistic surface
appearance. Also covered are other appearance-related topics, such as pro-
viding higher image quality through antialiasing and gamma correction.
Chapter 6, Texturing. One of the most powerful tools for real-time ren-
dering is the ability to rapidly access and display data such as images on
surfaces. This chapter discusses the mechanics of this technique, called
texturing, and presents a wide variety of methods for applying it.
Chapter 7, Advanced Shading. This chapter discusses the theory and prac-
tice of correctly representing materials and the use of point light sources.
Chapter 8, Area and Environmental Lighting. More elaborate light sources
and algorithms are explored in this chapter.
Chapter 9, Global Illumination. Shadow, reflection, and refraction algo-
rithms are discussed, as well as such topics as radiosity, ray tracing, pre-
computed lighting, and ambient occlusion.
Chapter 10, Image-Based Effects. Polygons are not always the fastest or
most realistic way to describe objects or phenomena such as lens flares or
fire. In this chapter, alternate representations based on using images are
discussed. Post-processing effects such as high-dynamic range rendering,
motion blur, and depth of field are also covered.
Chapter 11, Non-Photorealistic Rendering. Attempting to make a scene
look realistic is only one way of rendering it. This chapter discusses other
styles, such as cartoon shading.
Chapter 12, Polygonal Techniques. Geometric data comes from a wide
range of sources, and sometimes requires modification in order to be ren-
dered rapidly and well. This chapter discusses polygonal data and ways to
clean it up and simplify it. Also included are more compact representations,
such as triangle strips, fans, and meshes.
i
i
i
i
i
i
i
i
4 1. Introduction
Chapter 13, Curves and Curved Surfaces. Hardware ultimately deals in
points, lines, and polygons for rendering geometry. More complex surfaces
offer advantages such as being able to trade off between quality and render-
ing speed, more compact representation, and smooth surface generation.
Chapter 14, Acceleration Algorithms. After you make it go, make it go
fast. Various forms of culling and level of detail rendering are covered here.
Chapter 15, Pipeline Optimization. Once an application is running and
uses efficient algorithms, it can be made even faster using various optimiza-
tion techniques. This chapter is primarily about finding the bottleneck and
deciding what to do about it. Multiprocessing is also discussed.
Chapter 16, Intersection Test Methods. Intersection testing is important
for rendering, user interaction, and collision detection. In-depth coverage is
provided here for a wide range of the most efficient algorithms for common
geometric intersection tests.
Chapter 17, Collision Detection. Finding out whether two objects touch
each other is a key element of many real-time applications. This chapter
presents some efficient algorithms in this evolving field.
Chapter 18, Graphics Hardware. While GPU accelerated algorithms have
been discussed in the previous chapters, this chapter focuses on components
such as color depth, frame buffers, and basic architecture types. Case
studies of a few representative graphics accelerators are provided.
Chapter 19, The Future. Take a guess (we do).
We have included appendices on linear algebra and trigonometry.
1.2 Notation and Definitions
First, we shall explain the mathematical notation used in this book. For a
more thorough explanation of many of the terms used in this section, see
Appendix A.
1.2.1 Mathematical Notation
Table 1.1 summarizes most of the mathematical notation we will use. Some
of the concepts will be described at some length here.
The angles and the scalars are taken from R, i.e., they are real num-
bers. Vectors and points are denoted by bold lowercase letters, and the
i
i
i
i
i
i
i
i
1.2. Notation and Definitions 5
Type Notation Examples
angle lowercase Greek α
i
242
scalar lowercase italic a, b, t, u
k
,v,w
ij
vector or point lowercase bold a,u, v
s
h(ρ), h
z
matrix capital bold T(t), X, R
x
(ρ)
plane π: a vector and π : n · x + d =0,
ascalar π
1
: n
1
· x + d
1
=0
triangle 3points v
0
v
1
v
2
, cba
line segment two points uv, a
i
b
j
geometric entity capital italic A
OBB
,T,B
AABB
Table 1.1. Summary of the notation used in this book.
components are accessed as
v =
v
x
v
y
v
z
,
that is, in column vector format, which is now commonly used in the com-
puter graphics world. At some places in the text we use (v
x
,v
y
,v
z
)in-
stead of the formally more correct (v
x
v
y
v
z
)
T
, since the former is easier
to read.
In homogeneous coordinates (see Section A.4), a coordinate is repre-
sented by v =(v
x
v
y
v
z
v
w
)
T
, where a vector is v =(v
x
v
y
v
z
0)
T
and a point is v =(v
x
v
y
v
z
1)
T
. Sometimes we use only three-element
vectors and points, but we try to avoid any ambiguity as to which type
is being used. For matrix manipulations, it is extremely advantageous to
have the same notation for vectors as for points (see Chapter 4 on trans-
forms and Section A.4 on homogeneous notation). In some algorithms, it
will be convenient to use numeric indices instead of x, y,andz, for example
v =(v
0
v
1
v
2
)
T
. All of these rules for vectors and points also hold for
two-element vectors; in that case, we simply skip the last component of a
three-element vector.
The matrix deserves a bit more explanation. The common sizes that
will be used are 2 × 2, 3 × 3, and 4 × 4. We will review the manner of
accessing a 3 × 3matrixM, and it is simple to extend this process to the
other sizes. The (scalar) elements of M are denoted m
ij
,0 (i, j) 2,
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset