boids by craig reynolds l.
Skip this Video
Loading SlideShow in 5 Seconds..
BOIDS by Craig Reynolds PowerPoint Presentation
Download Presentation
BOIDS by Craig Reynolds

Loading in 2 Seconds...

play fullscreen
1 / 33

BOIDS by Craig Reynolds - PowerPoint PPT Presentation

  • Uploaded on

BOIDS by Craig Reynolds. Cs 527 Computer Animation. Dr. Robert Kenyon. Vaidyasubramanian Chandrasekhar. “… and the thousands off fishes moved as a huge beast , piercing the water. They appeared united, inexorably bound to a common fate. How comes this unity?.. “ -Anonymous. BOIDS

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'BOIDS by Craig Reynolds' - koren

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
boids by craig reynolds

BOIDS by Craig Reynolds

Cs 527 Computer Animation.

Dr. Robert Kenyon.

Vaidyasubramanian Chandrasekhar


“… and the thousands off fishes moved as a huge beast , piercing the water. They appeared united, inexorably bound to a common fate. How comes this unity?.. “



- explores an approach based on simulation as an alternative to scripting the paths of each bird individually




  • Exhibits many contrasts
  • Made of discrete birds yet overall motion seems fluid
  • Randomly arrayed , yet magnificently synchronized
  • Intentional centralized control
  • Local perception of the world
  • Basic Features
  • Flocking
  • Avoid Obstacles
  • React to predators
need for boids

Scripting of the path of various objects using traditional computer animation techniques is tedious.

  • The editing of the model for small changes is hard
  • The maintenance of the model is also tough

Need for Boids

  • Earlier models birds trace along “phase portrait”
  • Force Fields
  • Rejection Forces
  • Object interaction, by bounding box tests.
  • Animator sets initial conditions, orientation and velocities.
particle systems

Collection of large number of individual particles each having own behavior. - "sub object system,"

The boids model similar to particle systems.

Particle systems

Partical system -1

Partical system -2

particle systems6

Used to describe a method used to create a sequence of images for the movie Star Trek II: The Wrath of Khan.

  • The effect was that of a bomb exploding on the surface of a planet and fire spreading out from the point of impact to eventually engulf the planet.
  • Each Particle has the following
  • 1. Position 5. Velocity (speed and direction) 2. Color 6. Lifetime 3. Age 7. Shape 4. Size 8. Transparency

Particle systems

particle systems7

Major differences

    • Each boid is an entire polygonal object rather than a graphical primitive
    • Each boid has a local coordinate system.
    • There are a fixed number of boids - they are not created or destroyed.
    • Traditional rendering methods can be used because there are a small number of boids.
    • Boids behavior is dependent on external as well as internal state. In other words, a boid reacts to what other boids are doing around it.

Particle systems

boids approach


    • Behavior depicted as rules in the program
    • All models are actors, that communicate with peers by passing messages.
    • Internal state of each boid must be held in some sort of data structure
    • Robust self- organizing distributed systems.

Boids Approach

behavioral animation

Behavioral Animation

  • Traditional Cel Animation vs. Computer Animation
  • Story told by motion of characters
  • Interpolate between specified key frames
  • Cannot tell ‘act happy’- has to be done in expressions
  • The Charming aspect is that one cannot know how the simulation is going to proceed from the initial conditions
geometry in flight

Each boid has its own local coordinate system

  • X axis is left/right
  • Y axis is up/down
  • Z axis is ahead/back
  • rotation about X is pitch
  • rotation about Y is yaw
  • rotation about Z is roll
  • Boids move along their local positive Z axis. Pitching and yawing realign the global orientation of the local Z axis.

Geometry in Flight

geometry in flight11

Geometry in Flight

  • Momentum is conserved
  • 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
  • Buoyancy is aligned against gravity, but aerodynamic lift is aligned with the boid's local "up" direction and related to velocity
  • Steering-> directing thrust in appropriate direction

Limiting case – Y points at center of curvature

  • Banking behavior in the absence of gravity.
  • Banking Uses.
  • Keeps lift from the airfoil of the wings pointed in the most efficient direction.
  • Simply reversing the angle bank we obtain a cartoon motion – like objects flung outward


natural flocks

1. Natures 2 opposing Forces

  • a. Stay closer to flock
        • Protection from predators
        • Easy availability and detection of food
  • b. Avoid collisions with peers.
  • 2. Flocks do not become Full or overloaded as new birds join in.
  • 3. Individual bird has localized and filtered perception of the rest of the flock.

Natural Flocks

behavioral models

Objects can be

      • Static
      • Periodic (Flame flickering)
      • User controlled- have some degree of autonomy
      • Maps character environment to character actions.
        • - If Fuel Low  different behavior.

Behavioral Models

simulated flocks

1. Start with a boid model supporting geometric flight.

2. Add behaviors that correspond to the opposing forces of collision avoidance and urge to join the block.

The Rules are stated as

a. Collision avoidance

b. Velocity Matching

c. Flock Centering

Simulated Flocks

collision avoidance

Collision Avoidance

  • The Neighborhood is usually around 3-4 birds.
  • The metrics are
  • Distance between birds
  • Offset Vector.
  • Collision Avoidance
  • Avoid collisions with nearby flock mates.
collision avoidance18

Collision Avoidance

Velocity matching: steer towards the average velocity of local flock mates

Flock centering: Attempt to stay close to nearby flock mates.

collision avoidance vs velocity matching

Collision avoidance based on the Position and ignores the velocity.

  • Velocity matching based on speed and ignores the position.
  • Center of flock means center of the nearby flock mates.
  • If deep inside a flock, flock centering urge is small

Collision Avoidance vs. Velocity Matching

avoiding obstacles

Increases complexity

    • Force Field Model.
      • Easy to model
      • Exactly opposite- No turning away.
      • Too weak far away. (long term planning required).
    • Steer – to –Avoid
      • Only obstacles directly in front of it.
      • Calculates for one body length beyond the silhouette edge.

Avoiding Obstacles

splitting and rejoining

Boids split to go around the obstacles.

  • Central Force Model.
  • Follow designated leader model
  • If individual boid stays close to neighbors it doesn’t care if other boids stay or fly away. ( this helps in splitting)
  • Flock centering urge not localized Long Range vision  to get back after splits.

Splitting and Rejoining

No splits allowed

arbitrating decisions

Combine, prioritize and arbitrate between potentially conflicting urges.

  • Taking weighted average - easiest way
      • Easy implementation.
      • Fails in crucial situations
  • In critical situation conflicts must be resolved in a timely manner.
  • Prioritized acceleration is based on strict ordering of all component behaviors.
  • Acceleration accumulated till it exceeds the max value.

Arbitrating Decisions

simulated perception

Boids model does not directly simulate the senses used by real animals during flocking.

    • Simulated boids have access to all other boid’s data unlike real flocks. Even lesser in herds as 2-D
    • Fish schools visual perception limited by scattering and absorption of light by the murky water.
  • Wrong to give all details – even dangerous.
  • Aggregate behavior like flocking depends only on localized view.
  • Neighborhood is a spherical zone of sensitivity centered at a boid’s local origin.

Simulated Perception

simulated perception24

Forward weighted sensitivity zone – to avoid accidents at high speed.

  • Attraction, Repulsion by distance Spring like action ,more suited for cartoons.
  • A boid is more influenced by the close neighbors than by the distant ones.
  • Boid with vision- Far better. E.g.: in cases like with mazes

Simulated Perception

impromptu flocking

The initial position, heading, velocity, and various other parameters of the boid model are initialized to values randomized within specified distributions

  • First action is a reaction to the initial conditions
  • Scripting done to have more control rather than aimless wandering.
  • Script to set up and animate backgrounds, lighting, camera and other visible objects.
  • Urge - Some global target. – sets global position, direction vector.

Impromptu flocking

pigeons in park27

Moving car worries birds  panic and Fly

  • Annoyance value.
  • Panic is contagious
  • Objects
        • Pigeons
        • Car
        • Spherical Object
        • Terrain
  • Initially Small distance moved, next annoyance . More motion

Pigeons in Park


Study schools , herds

  • Traffic patterns
  • Simulate mass behavior
  • Mixing and matching
    • A traffic jam of spaceships
  • Low cost duplication in movies.


algorithmic consideration

O(n^2). Since decision has to be made for all boids.

  • But , based on neighborhood – O(k.n) or O(n).
    • Space partitioning into bins based on position
    • Incremental collision detection.
  • Performance
  • A flock of 80 boids, O(N2) algorithm , on a single Lisp Machine without any special hardware accelerators, the simulation ran for about 95 seconds per frame.

Algorithmic consideration


A Model of polarized, non-colliding aggregate motion

  • Difficult to objectively measure and rate the simulation
  • Current development.
    • Internal animation, sync.
    • Interaction between simulation and script based flocks
  • More interesting will be taking into account – hunger, predators, need to sleep and so on.