About Clusters and Weights
A cluster provides a means of controlling a set of points as a
group
. The points can be NURBS control vertices (CVs), polygon vertices, or lattice points. (For more information on these elements, see Chapter 4, "Selection Modes, Hiding, and Templating.")
Points that are
members
of a cluster have weight. As mentioned earlier, weight represents the amount of influence the cluster has over the points it contains. Weight is
generally
set between 0 and 1. A point with a weight of 0 will not move with the cluster. A point with a weight of 1 will move exactly as much as the cluster itself. Anything in between will make the point move a fraction of how much the cluster moves.
For example, suppose a CV in a cluster had a weight of 0.5. If the cluster was moved up two grid units in the
Y
direction, the CV would move only one unit (
Figure 11.7
). Simply multiply the weight by the distance the cluster moves, and you'll get the distance the point moves.
Clusters represent a
convenient
way of animating portions of a surface. For example, if you wanted to animate the movement of a character's fat belly, you could make a cluster out of the points that form his belly, add different weights to the points on his belly, and then animate that cluster (
Figure 11.8
).
Understanding clusters is also the key to understanding binding. What binding does, in the background, is create clusters of portions of your surface and then parent those clusters to the joints. Once the surface has been bound, you can adjust the weight of the points to get the surface to deform the way you
desire
. When you understand parenting, clusters, and weight, binding will no longer seem
mysterious
.
To create a cluster:
|
1.
|
From the Create menu, select NURBS Primitives > Plane.
|
|
2.
|
Select makeNurbPlane1 from the Inputs section of the Channel Box (
Figure 11.9
).
|
|
3.
|
Increase Patches U and Patches V to 30.
The plane becomes more dense (
Figure 11.10
).
|
|
4.
|
Press
to switch to component mode.
|
|
5.
|
Select some points in the center of the plane (
Figure 11.11
).
|
|
6.
|
From the Deform menu, select Create Cluster.
A
C
appears in the middle of the selected points.
|
|
7.
|
Press
to activate the Move tool and then click and drag to move the cluster.
The CVs move with it (
Figure 11.12
).
|
To weight the points of a cluster using the Component Editor:
|
1.
|
Using the cluster created in the previous task, "To create a cluster," select some of the CVs that are included in the cluster (
Figure 11.13
).
|
|
2.
|
From the Window menu, select General Editors > Component Editor.
The Component Editor dialog box appears.
|
|
3.
|
Select the Weighted Deformers Tab in the Component Editor (
Figure 11.14
).
|
|
4.
|
Click the top numeric field and drag down to highlight all of the weights.
|
|
5.
|
Type .
5
in the field, and press
.
All of the weights in that column become 0.5 (
Figure 11.15
).
or
Click and drag a range of CVs and use the slider at the bottom of the Component Editor to change the weights interactively.
|
About the Paint Attributes tool
Another way of adjusting the weights of a cluster is by using the Paint Attributes tool. Especially handy for working with dense surfaces, this tool includes several options for interactively changing the weight of points (
Figure 11.16
).
There are four settings for Paint Operations:
-
Replace
When Paint Operation is set to Replace, the current weight of the
painted
points will change to whatever number is set in the Value field.
-
Add
When Paint Operation is set to Add, the value will be added to the weight of the painted points. This is useful for incrementally increasing the weights of points.
-
Scale
When Paint Operation is set to Scale, the current weight of a point will be multiplied by the value when it is painted. If you have a value of 0.9, you can incrementally decrease the weight of a point.
-
Smooth
This averages the weights of the adjacent points to make the area smoother.
The Flood button can speed work considerably, because rather than have to paint on an effect, you can have the Paint Attributes tool's settings affect all of the points
simultaneously
by pressing Flood. This is useful when you're setting all points to the same weight or smoothing all points.
To edit cluster weights using the Paint Attributes tool:
|
1.
|
Create a cluster and move it up, as in the previous
tasks
.
|
|
2.
|
Select the surface.
|
|
3.
|
Right-click the surface, and select Paint > cluster > cluster1-weights from the Marketing menu (
Figure 11.17
).
This activates the Paint Attributes tool, which should provide
color
feedback in shaded mode. The area of the surface that includes CVs in the cluster turns white; the rest appears black.
|
|
4.
|
Hold down
and drag the mouse from right to left to shrink the brush
size
(
Figure 11.18
).
|
|
5.
|
Double-click the Paint Attributes tool in the toolbox.
The Tool Settings dialog box for the Paint Attributes tool appears.
|
|
6.
|
Change Value to
0.5
.
Paint Operation should already be set to Replace (
Figure 11.19
).
|
|
7.
|
Click and drag on the surface.
The painted portion moves down because the weight of the points has been changed to 0.5.
|
|
8.
|
Change Paint Operation to Smooth.
|
|
9.
|
Click Flood several times.
The lump becomes smooth (
Figure 11.20
).
|
|