Presentation is loading. Please wait.

Presentation is loading. Please wait.

Flocks, Herds, and Schools: A Distributed Behavioral Model By: Craig Reynolds Presented by: Stephanie Grosvenor.

Similar presentations


Presentation on theme: "Flocks, Herds, and Schools: A Distributed Behavioral Model By: Craig Reynolds Presented by: Stephanie Grosvenor."— Presentation transcript:

1 Flocks, Herds, and Schools: A Distributed Behavioral Model By: Craig Reynolds Presented by: Stephanie Grosvenor

2 Flocks and Boids Flock is a group of objects that exhibit the general class of polarized (aligned), non-colliding, aggregate motion Flock is a group of objects that exhibit the general class of polarized (aligned), non-colliding, aggregate motion To simulate flock, simulate the behavior of individual bird To simulate flock, simulate the behavior of individual bird –Perception –Flight dynamics Boid is a simulated bird-like object Boid is a simulated bird-like object

3 How do we simulate a flock in computer animation? –Scripting is bad –Particle system too simple –Make particle systems more complex Local perception Local perception Simulated physics Simulated physics Flocking behaviors Flocking behaviors –Result of dense interaction of relatively simple behaviors of individually simulated birds

4 Behavioral Animation Animator as a theatrical director Animator as a theatrical director Character's performance is the indirect result of the director's instructions to the actor. Character's performance is the indirect result of the director's instructions to the actor. Not know how a simulation is going to proceed from the specified behaviors and initial conditions - many unexpected, pleasant surprises. Not know how a simulation is going to proceed from the specified behaviors and initial conditions - many unexpected, pleasant surprises. Problem getting uncooperative flocks to move as intended ("these darn boids seem to have a mind of their own!"). Problem getting uncooperative flocks to move as intended ("these darn boids seem to have a mind of their own!").

5 Boids and Turtles Logo turtle Logo turtle –Movement forward, back, left, right 3D turtles and their paths are equivalent to boid objects and their flight paths 3D turtles and their paths are equivalent to boid objects and their flight paths Simple rules for complex behavior Simple rules for complex behavior

6 Geometric Flight Flight - Dynamic, incremental, rigid motion along a path Flight - Dynamic, incremental, rigid motion along a path Geometrical transformation of an object, moving along and tangent to a 3D curve Geometrical transformation of an object, moving along and tangent to a 3D curve Motion rigid - Underlying geometric model free to change shape within flying coordinate system Motion rigid - Underlying geometric model free to change shape within flying coordinate system

7 Geometric Flight Conservation of momentum Conservation of momentum Simple model of viscous speed damping – not exceed maximum speed Simple model of viscous speed damping – not exceed maximum speed Minimum speed can be specified Minimum speed can be specified Maximum acceleration used to provide smooth changes of speed and heading Maximum acceleration used to provide smooth changes of speed and heading

8 Geometric Flight Gravity modeled but only defines banking behavior Gravity modeled but only defines banking behavior Many physical forces not supported Many physical forces not supported

9 Banking Magnitude of turning acceleration directly varies with object’s velocity and with the curvature of its path Magnitude of turning acceleration directly varies with object’s velocity and with the curvature of its path Correct banking – object’s local space remains aligned with the perceptual or accelerational coordinate system Correct banking – object’s local space remains aligned with the perceptual or accelerational coordinate system Makes boid fit viewer’s expectation of how flying objects should move and orient themselves Makes boid fit viewer’s expectation of how flying objects should move and orient themselves

10 Natural Flocks, Herds, and Schools Bird in flock must have behavior that allows it to coordinate movement with flockmates Bird in flock must have behavior that allows it to coordinate movement with flockmates Two balanced, opposing behaviors Two balanced, opposing behaviors –Desire to stay close to flock –Desire to avoid collisions within flock Individuals don’t pay much attention to each and every bird in flock Individuals don’t pay much attention to each and every bird in flock –Bird’s perception of the rest of flock is localized and filtered Itself Itself Two or 3 nearest neighbors Two or 3 nearest neighbors Rest of flock Rest of flock

11 Simulated Flocks Collision Avoidance Collision Avoidance –Avoid collisions with nearby flockmates Velocity Matching Velocity Matching –Attempt to match velocity with nearby flockmates Flock Centering Flock Centering –Attempt to stay close to nearby flockmates

12 Collision Avoidance Urge to steer away from imminent impact Urge to steer away from imminent impact Static collision avoidance based on relative position of flockmates Static collision avoidance based on relative position of flockmates Ignores velocity Ignores velocity

13 Velocity Matching Looks only at velocity Looks only at velocity –Ignores position Predictive version of collision avoidance Predictive version of collision avoidance –If boid does a good job of matching velocity with neighbors – collision in near future unlikely Static collision avoidance and dynamic velocity matching are complementary Static collision avoidance and dynamic velocity matching are complementary Static collision avoidance serves to establish minimum required separation distance – velocity matching maintains it Static collision avoidance serves to establish minimum required separation distance – velocity matching maintains it

14 Flock Centering Boid localized perception of world center of flock actually means center of nearby flockmates Boid localized perception of world center of flock actually means center of nearby flockmates Causes boid to fly in a direction that moves it closer to centroid of nearby boids Causes boid to fly in a direction that moves it closer to centroid of nearby boids If a boid is close to the center of the flock this will have little effect (since the boid density will be uniform), but if it is on the edges then it will have a greater effect. If a boid is close to the center of the flock this will have little effect (since the boid density will be uniform), but if it is on the edges then it will have a greater effect. Correctly allows simulated flocks to split Correctly allows simulated flocks to split

15 Arbitrating Independent Behaviors three behavioral urges associated with flocking each expressed as acceleration requests three behavioral urges associated with flocking each expressed as acceleration requests Behavior has several parameters – including strength, further accentuate the acceleration request Behavior has several parameters – including strength, further accentuate the acceleration request Navigation module of boid brain to collect relevant acceleration requests and then determine single behaviorally desired acceleration Navigation module of boid brain to collect relevant acceleration requests and then determine single behaviorally desired acceleration Weighted average according to priority Weighted average according to priority Not good for collision with obstacles - Weighted average may cancel (opposite directions) Not good for collision with obstacles - Weighted average may cancel (opposite directions)

16 Arbitrating Independent Behaviors Acceleration requests considered in priority order and added to accumulator Acceleration requests considered in priority order and added to accumulator Magnitude added to another accumulator Magnitude added to another accumulator Continue until sum of accumulated magnitudes larger than maximum acceleration value Continue until sum of accumulated magnitudes larger than maximum acceleration value Emergency acceleration allocated to satisfy pressing needs first Emergency acceleration allocated to satisfy pressing needs first Example: Centering ignored in order to maneuver around obstacles Example: Centering ignored in order to maneuver around obstacles

17 Simulated Perception Perception model tries to model real bird Perception model tries to model real bird Filtering out surplus information that implements boid’s behavior Filtering out surplus information that implements boid’s behavior Real bird imperfect senses – nearby flockmates hide those farther away Real bird imperfect senses – nearby flockmates hide those farther away –Strongly localized information available Aggregate motion of flocking depends on limited localized view of world Aggregate motion of flocking depends on limited localized view of world

18 Each boid has direct access to the whole scene‘s geometric description, but flocking requires that it reacts only to flockmates within a certain small neighborhood around itself. The neighborhood is characterized by a distance (measured from the center of the boid) and an angle, measured from the boid's direction of flight. Flockmates outside this local neighborhood are ignored. The neighborhood defining the region in which flockmates influence a boids steering.

19 Scripted Flocking Happy aimless flocking is good – direction better Happy aimless flocking is good – direction better Direct motion at specific times Direct motion at specific times Simulations under control of general-purpose animation scripting system Simulations under control of general-purpose animation scripting system Interactive motion control facilities – provides ability to schedule invocation of user-supplied software on a frame by frame basis Interactive motion control facilities – provides ability to schedule invocation of user-supplied software on a frame by frame basis Describe Timing of flock actions Describe Timing of flock actions Flexible Control over time varying values of parameters Flexible Control over time varying values of parameters Set up and animate all nonbehavioral aspects of scene Set up and animate all nonbehavioral aspects of scene background/lighting/camera motion/ visible objects

20 Scripted Flocking Migratory urge – global target (global direction) Migratory urge – global target (global direction) Global position – a target point toward which birds fly (going z for the winter) Global position – a target point toward which birds fly (going z for the winter) Bounded acceleration, incrementally turns boid toward migratory target Bounded acceleration, incrementally turns boid toward migratory target Animate dynamic parameter – global position vector, global direction vector Animate dynamic parameter – global position vector, global direction vector Animate goal point along desired path Animate goal point along desired path

21 Avoiding Environmental Obstacles Two types of shapes of environmental collision avoidance Two types of shapes of environmental collision avoidance –Force field –Steer-to-avoid Force Field Force Field –Field of repulsion force emanating from obstacle out into space –Boid increasingly repulsed as it gets closer to obstacle Problem Problem –approach obstacle surrounded by a force field at angle such that exactly opposite to direction of force field –Worst case scenario – fail to turn –Problem with peripheral vision –Too strong up close/ too weak far away Want long-range planning to avoid obstacles, not panicky correction Want long-range planning to avoid obstacles, not panicky correction Steer-to-avoid more robust - natural Steer-to-avoid more robust - natural

22 Avoiding Environmental Obstacles Steer-to-avoid Steer-to-avoid Obstacles that are directly in front of boid (where local z and obstacle intersect) Obstacles that are directly in front of boid (where local z and obstacle intersect) Silhouette edge of obstacle is closest to point of eventual impact Silhouette edge of obstacle is closest to point of eventual impact Radial vector computed – aim boid at point 1 body length beyond silhouette edge Radial vector computed – aim boid at point 1 body length beyond silhouette edge

23 Other Applications of the Flock Model Polarized, noncolliding aggregate motion Traffic patterns, fish, locomotion, crowds Traffic patterns, fish, locomotion, crowds Scientific investigation Scientific investigation

24 Questions?


Download ppt "Flocks, Herds, and Schools: A Distributed Behavioral Model By: Craig Reynolds Presented by: Stephanie Grosvenor."

Similar presentations


Ads by Google