notes and images from:
We have looked at animating a bunch of particles through physically-based modelling and we have looked at animating realistic individual living humans and other creatures like Dinosaurs.
But what if you want to have a bunch of living creatures moving around and exhibiting realistic group behaviour - e.g. fish schooling or birds flocking or mammels herding. In this case we have a bunch of creatures (particles) whose movements are affected by behaviour as well as physics.
Craig Reynolds' Boids
(1987) Flocks, Herds, and Schools: A Distributed Behavioral Model, in
Computer Graphics, 21(4) (SIGGRAPH '87 Conference Proceedings) pages
paper is available at
Generic flocking creatures called boids
Each creature is a particle
Distributed behaviour model - each bird performs its own movement
Movement is controlled by simple physics and 3 steering behaviours based on information perceived about the limited neighbourhood around the boid.
First the simple physics- geometric flight
each boid has its own local coordinate system
Boids move along their local positive Z axis. Pitching and yawing realign the global orientation of the local Z axis.
Momentum is concerved - viscous speed damping to give a maximum speed, a specified maximum acceleration.
Gravity only used for banking- not very realistic for birds flying a lot
Banking (rolling) - keeps local Y axis aligned with the local XY component of the total acceleration acting on the boid. In straight and level flight gravity is down so banking component keeps the bird level. When turning the acceleration down swings outward so the boid rolls to keep the axis aligned.
Same basis as turle graphics in logo
So now that we have one boid moving, how does it relate to its friends ...
desire to stay close to the flock
desire to avoid collisions with other members of the flock
no apparent natural bound on size of flocks so amount of processing needed by each flock member does not depend on size of the flock
3 Steering behaviours
in order of most important to least important
take a weighted
do we mean by
'nearby flockmates' - trying to simulate perception - boid sees is
nearby flockmates much better than those far away, sees more ahead than
How do we find who is nearby?
exhaustive search is order N^2
partition the flock spatially into bins and then search just the local
bin or bins.
Where are they going?
global position in 3-space or a global direction - can be moved around
What if something gets in the way?
boids tend to reach a steady state
objects in the way make the movements much more interesting
in general the flock doesn't rush up to a wall and then hover - the individuals anticipate and avoid
steer-to-avoid - simulated vision - only looks directly ahead - if there is an obstacle then find the closest edge and steer towards one body-length outside of that edge
may move -
they may be benign or predators
Here is a nice java applet
and then there are Swarms
flocks of boids except swarms do not try and align
a rather famous
example from the Lion King:
at http://www.vee-media.com as
in Scientific Visualization