1 / 33

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?.. “ -Anonymous. BOIDS

bwillhite
Download Presentation

BOIDS by Craig Reynolds

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BOIDS by Craig Reynolds Cs 527 Computer Animation. Dr. Robert Kenyon. Vaidyasubramanian Chandrasekhar

  2. “… 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 - explores an approach based on simulation as an alternative to scripting the paths of each bird individually Introduction

  3. Flocks • 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

  4. 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.

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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

  12. Banking

  13. 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 Banking

  14. 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

  15. 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

  16. 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

  17. 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.

  18. Collision Avoidance Velocity matching: steer towards the average velocity of local flock mates Flock centering: Attempt to stay close to nearby flock mates.

  19. 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

  20. 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

  21. 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

  22. 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

  23. 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

  24. 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

  25. 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

  26. Pigeons in Park

  27. 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

  28. Based on speed of predator speed varies • Pigeons try to move away from the car. Dynamic Neighborhood

  29. Locality Queries • Spatial binning Spatial Data Structure

  30. Study schools , herds • Traffic patterns • Simulate mass behavior • Mixing and matching • A traffic jam of spaceships • Low cost duplication in movies. Applications

  31. 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

  32. 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. Conclusions

  33. Questions?

More Related