Graphics Reference
In-Depth Information
.WPF
and many popular fixed-function pipelines actually use a very similar, but com-
putationally more efficient, variant known as the Blinn-Phong model, which
uses a different approach for measuring
In this chapter, we describe the classic Phong definition of the angle
δ
δ
, described in Section 14.9.3.
6.5.3.4 Emissive Lighting
Many rendering systems additionally offer the artificial notion of self-luminous
emissive lighting that allows a surface to “reflect” light that is not actually present
externally. Emission is independent of geometry and is not subject to any attenua-
tion. The specification is simply a single color (solid or textured), which is added
to the other three components to yield the final intensity value. Note that emis-
sion is most useful when emitting a texture—for example, to emulate a nighttime
cityscape background or a star-filled sky—but it can also be used to model neon
lights that have the particular “look” of a neon tube, although they do not illumi-
nate anything else in the scene. We encourage you to perform the emissive-lighting
exercises provided in the online material.
6.6 Hierarchical Modeling Using a Scene Graph
What's a desert without camels? In this section, we will design a simple articulated
robotic camel with some pin joints (highlighted in Figure 6.40) supporting rigid-
body rotations on a single axis. This section builds on the modeling and animation
techniques you first encountered with the clock example in Chapter 2. While the
XAML code examples below are particular to WPF, these techniques for compos-
ing and animating complex models are common to all scene-graph platforms.
Figure 6.40: WPF's rendering of
the camel constructed via hierar-
chical modeling, with joints for
legs and neck animation.
Throughout this section we will refer you to activities in the “Hierarchical
Modeling” module of this chapter's laboratory. We strongly recommended that
you perform the lab activities while reading this section.
6.6.1 Motivation for Modular Modeling
When designing any complex model, a developer should modularize the specifica-
tion of the geometry by dividing the model into parts that we call subcomponents.
There are many reasons for avoiding a monolithic (single-mesh) model.
• Materials are typically specified at the level of the mesh (e.g., the
GeometryModel3D element in WPF). Thus, if you want the materials to
vary (e.g., to render the camel's foot using a different material from its
shin), you must use subcomponents.
• When a component appears at multiple places in the model (e.g., the
camel's four legs), it is convenient to define it once and then instantiate
it as needed. Reusability of components is as fundamental to 3D modeling
as it is to software construction, and is a key optimization technique for
complex scenes.
• The use of subcomponents facilitates the animation/motion of subparts. If a
complex object is defined via a single mesh, movement of subparts requires
editing the mesh. But if the design is modular, a simple transformation (of
 
 
 
 
Search WWH ::




Custom Search