204 3D Animation for the Raw Beginner Using Maya
Specically, there is usually a “solver” that takes the current properties of the particles and
of the scene as a whole, and then computes—for every frame—the positioning and appear-
ance of every particle.
In modern particle dynamics systems, such as nDynamics in Maya, there are a vari-
ety of settings that control the behavior of the solver by specifying the way particles
interact with geometric objects in the scene. We can control the properties of natural
forces in the scene, such as gravity and wind, and how they aect the particles. We can
also adjust the speed of particles, the rate at which they are emitted, the direction in
which they move, how far they move, and how long they exist in the scene aer they
are emitted.
We start to see why dynamics eects can require so much rendering time.
Emitting Trix into the Glass Bowl
In Figure6.8, we see the glass bowl that we created earlier. Our goal is to pour Trix out
of a box and into the bowl. In Figure6.9, nDynamics is being selected on the Main Menu
selector. Figure6.10 shows an nParticles emitter being created; you can set the particle type
being created, and we have chosen Balls. e emitter is set to Directional for the Emitter
Type, so that the balls of cereal will tumble in an orderly way out of the box.
Colliders
It is common for a scene to have both standard geometric models and dynamics eects in
it. ese two parallel worlds typically come into contact with each other. is means we are
going to have to have our particles interact with the glass bowl.
FIGURE 6.8 Glass dish.
Particle Dynamics 205
In Figure6.11, we are turning the glass
bowl, which is selected in the Main Window,
into a “passive collider” by selecting:
nDynamics Main Menu → nMesh →
Create Passive Collider
e various passive collider attributes of
the dish are visible in Figure6.8. As a pas-
sive collider, the glass bowl will sit still, and
our Trix will pour into it, then bounce, and
then stay inside the connes of the bowl. If
an object like the glass bowl is not turned
into a collider, the cereal would pass right
through it.
Scaling the Trix
First, though, we need to rescale the
Trix. We do this by running the ani-
mation using the Playback controls on
the bottom right of the Main Window.
en we select some of the particles.
We go to the attributes of the particles
(see Figure6.12) and set the x, y, and z
scaling factors to two.
Ramp Textures
We are going to create a ramp texture
for our cereal and do so in an unusual
way. But rst we take a look at the process
of creating a ramp texture and adjusting its
attributes. Ramp textures (and materials)
allow us to create multicolored surfaces that
can be used in a wide variety of ways, and so
they are heavily employed.
Figure6.13 shows a ramp texture that has
just been made by selecting Ramp under 2D
Textures in the Hypershade. In Figure6.14,
its colors are being adjusted. e default
colors are blue, green, and red, with the col-
ors gently blended between them.
To remove an existing color, we select a
box with an x in it to the right of the color.
FIGURE 6.9 e nDynamics menu.
FIGURE 6.10 Emitter menu.
FIGURE 6.11 Passive collider.
206 3D Animation for the Raw Beginner Using Maya
FIGURE 6.12 Scale particles.
FIGURE 6.13 e default ramp colors. FIGURE 6.14 Adjusting a ramp’s colors.
Particle Dynamics 207
To change an existing color, we click on one of the circles to the le of the original color.
To create a new color, we click on the inside of the ramp texture (the rainbow itself); a new
circle and a new x box will appear. e colors that we will use in our ramp texture are
shown in Figure6.15.
The Trix’s Ramp
For the Trix example, we need to create a ramp that contains the colors that we nd in Trix.
We will use the original three Trix colors from 1955 (according to Wikipedia): orangey
orange, lemony yellow, and raspberry red.
But in order to make each piece of Trix, which is an independent sphere, have its own
separate color instead of each having all three colors of the ramp, we have to create the
ramp texture in a special way. We cannot simply swipe some Trix objects and assign
the ramp to them, like we did when we assigned a black Blinn to the particles of rocket
exhaust. In Figure6.16, we have gone to the attribute tab for the shape of the particles.
ere is a set of attributes under Per Particle (Array) Attributes. We go to RGB PP (mean-
ing color channels per particle) and right click. We choose Create Ramp. en Maya
FIGURE 6.15 Aer adjusting the colors of a
ramp.
FIGURE 6.16 Creating a per particle attribute.
208 3D Animation for the Raw Beginner Using Maya
makes a new ramp for us, and we nd it
in the Hypershade. It has already been
attached to the balls of cereal.
We adjust the colors as seen in Figure6.17.
Note that we adjust the Interpolation attri-
bute to None, so that the colors of the rain-
bow dont blend together.
Gravity
ere are some useful settings that you
will nd on the nucleus1 tab that can be
seen in Figure6.12. In particular, we can
program the way the emitted particles will
interact with natural forces, like gravity
and wind. In this case, we select the par-
ticles and choose:
nDynamics Main Menu → Fields →
Gravity
is will pull the cereal downward toward
the bowl. is gravity eld will not aect
any other objects or particle emitters we
place in the scene.
Action!
en we go back to frame 1 and play the
scene. Fiy frames were used in this exam-
ple. e emitter, which has been placed at
the opening of the tilting Trix box, begins
to create particles. ey fall and collect in
the bowl, as can be seen in the rendering
of Figure6.18.
A le texture consisting of a photograph
of a Trix box was used as a projection tex-
ture on the cereal box.
An Aside
Another interesting use for particles is to
model the stars in the sky. We simply gen-
erate as many stars as we want, using the
settings of the emitter to space them out as
they are emitted.
FIGURE 6.17 (See p. CI-8 of Color Insert) e
ramp texture for the per particle attribute.
FIGURE 6.18 (See p. CI-8 of Color Insert)
Classic Trix rendered.
..................Content has been hidden....................

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