Graphics Reference
In-Depth Information
the kind we used in animating the clock in Chapter 2) can be applied to a
subcomponent to simulate a motion such as the bending of a knee.
Pick correlation (the identification of which part of the model is the target
of a user's click/tap action) is more valuable if your model is modularized
well. If the user clicks on a single-mesh camel, the result of correlation is
simply the identity of the camel as a whole. But if the camel is modularized,
the result includes more detail; for example, “the shin of the front-left leg.”
• Editing a single-mesh model is difficult due to interdependencies among
the various parts—for example, extending the height of the camel's legs
would, as a side effect, require revising all the vertices in the camel's head
and torso. But when a model is defined using a hierarchy of subparts, the
geometry of a subcomponent can be edited in isolation in its own coordi-
nate system, and the assembly process can use transformations to integrate
the parts into a unified whole.
These reasons are so compelling that we abstract them into a principle:
T HE HIERARCHICAL MODELING PRINCIPLE : Whenever possible, construct
models hierarchically. Try to make the modeling hierarchy correspond to a func-
tional hierarchy for ease of animation.
Leg
Thigh
Lower leg
6.6.2 Top-Down Design of Component Hierarchy
One strategy for designing a complex model for animation is to analyze the target
object to determine the locations of joints at which movement might be desired.
For example, as depicted in Figure 6.40, we might want our camel to have knee
and hip joints for leg movements, and a neck joint for head movement. 5 The joint
locations, along with other requirements such as variations in materials, are then
used to determine the necessary component breakdown. Let's focus first on just
the camel's leg: We need to implement hip and knee joints, and we'd like the
option of a distinct material for the foot.
Foot
Shin
Key
Instance transform
Joint transform
Grouping component
Primitive component
Figure 6.41: Scene graph of
the camel-leg model. Here, and
below, we use a beige back-
ground to highlight a portion of
the graph that is being used as a
component or submodel.
The hierarchy shown in Figure 6.41 fits our needs. In the figure, we distin-
guish between primitive nodes (meshes with associated materials) and higher-
level grouping nodes that combine subordinate grouping nodes and/or primitive
nodes. Also, on the lines connecting components, we distinguish between two
different types of modeling transformations. As you may recall from Chapter 2,
we identify two slightly different uses of modeling transformations.
•An instance transform is used to position, resize, and orient a subcom-
ponent in order to position it properly into a scene or into a higher-level
composite object. In our clock application in Chapter 2, we used instance
transforms to position the clock hands relative to the clock face, and to
reshape a stencil clock hand to form the distinctive shapes of the hour
5. Here, our use of the term “joint” is informal and simply identifies locations at which we
might want to implement an axis of rotation on a subcomponent to simulate a biological
joint or a construction hinge. In sophisticated animation technologies, a joint is far
more complex, may support more than one axis, and is often an actual object (distinct
from the model's subcomponents) with structure, appearance, and behaviors derived
from principles of physics and biomechanics.
 
 
 
Search WWH ::




Custom Search