i
i
i
i
i
i
i
i
17.7. Groups of Objects 441
designated leader of the flock, or simply representing migratory urge of a flock
member.
Once all v
new
are determined, the final desired vector is negotiated based on
priorities among them. Collision avoidance and velocity matching typically have
higher priority. Instead of simple averaging of desired velocity vectors which can
lead to cancellation of urges and unnatural “moving nowhere” behavior, an ac-
celeration allocation strategy is used. Some fixed total amount of acceleration is
made available for a boid and fractions of it are being given to each urge in order
of priority. If the total available acceleration runs out, some lower priority urges
will have less effect on the motion or be completely ignored. The hope is that
once the currently most important task (collision avoidance in most situations) is
accomplished, other tasks can be taken care of in near future. It is also important
to respect some physical limitations of real objects, for example, clamping too
high accelerations or speeds to some realistic values. Depending on the internal
complexity of the flock member, the final stage of animation might be to turn the
negotiated velocity vector into a specific set of parameters (bird’s wing positions,
orientation of plane model in space, leg skeleton bone configuration) used to con-
trol a boid’s motion. A diagram of a system implementing flocking is shown on
Figure 17.28 (right).
A much simpler, but still very useful, version of group control is implemented
by particle systems (Reeves, 1983). The number of particles in a system is typi-
cally much larger than number of boids in a flock and can be in the tens or hun-
dreds of thousands, or even more. Moreover, the exact number of particles can
fluctuate during animation with new particles being born and some of the old
ones destroyed at each step. Particles are typically completely independent from
each other, ignoring one’s neighbors and interacting with the environment only
by experiencing external forces and collisions with objects, not through collision
avoidance as was the case for flocks. At each step during animation, the sys-
tem first creates new particles with some initial parameters, terminates old ones,
and then computes necessary forces and updates velocities and positions of the
remaining particles according to Newton’s law.
All parameters of a particle system (number of particles, particle life span,
initial velocity, and location of a particle, etc.) are usually under the direct control
of the animator. Prime applications of particle systems include modeling fire-
works, explosions, spraying liquids, smoke and fire, or other fuzzy objects and
phenomena with no sharp boundaries. To achieve a realistic appearance, it is im-
portant to introduce some randomness to all parameters, for example, having a
random number of particles born (and destroyed) at each step with their velocities
generated according to some distribution. In addition to setting appropriate initial