9

716 Chapter 8: Modifiers
face sub-selection, then the ID is only applied
to selected faces; otherwise, it is applied to the
entire object. The ID number refers to one of the
materials in a multi/sub-object material.
MaterialByElement Modifier
Modify panel > Make a selection. > Modifier List >
Object-Space Modifiers > MaterialByElement
Mak e a selection. > Modi fiers menu > Surface > Material
By Element
The MaterialByElement modifier lets you apply
different material IDs to objects containing
multiple elements, at random or according to a
formula. When animated, this effect is useful for
such applications as an office building at night
with window illumination turning on and off at
random.
Various materials randomly applied to the leaves of the plant
Procedure
Example: To assign colors randomly in a group of
spheres:
1.
Create six spheres.
Tip: One method is to add a sphere (page
1–174) primitive, then use
Shi f t +Move (page
1–439) with the Copy option, and enter 5 in the
Number Of Copies field.
2. C ombine the spheres into a single editable
mesh objec t.
Right-click a selected sphere and from the
Transform (lower-right) quadrant of the quad
menu, choose Convert To: > Convert to
Editable Mesh. Then click Modify panel > Edit
Geometry rollout > Attach List. In the Attach
List dialog, click All, and then Attach.
3. Create a multi/sub-object material (page
2–1594) with six materials, and specify a
different color for each material. Assign the
material to the object with multiple spheres.
Becausesphereprimitivesareassignedmaterial
ID 2 by default, al l the spheres now have t he
color assigned to material number 2 in the
multi/sub-object material.
4. Assign the MaterialByElement modifier to the
object.
5. From the Parameters rollout, turn on Random
Distr ibution.
BecausethedefaultIDCountsettingis2,some
of the spheres are assigned sub-material #1, and
the rest are assigned #2.
6. Use the spinner to increase the ID Count setting
to 3. Also change the Uniqueness group > S eed
value.
Now t he first three materials are assigned to the
spheres at random, although with some Seed
settings, you may see only two different colors.
7. Keep increasing the ID Count setting until
you see a l l six colors in the multi/sub-object
mate rial. As the assignments are r andom, it
may take awhile.