Flocking and Group Behavior

Slides:



Advertisements
Similar presentations
Reactive and Potential Field Planners
Advertisements

Flocking and more.  NPC groups can move in cohesive groups not just independently ◦ Meadow of sheep grazing? ◦ Hunting flock of birds? ◦ Ants? Bees?
Motivation Hair animation used in movies, games, virtual reality, etc. Problem due to complexity –Human head has over 100,000 strands of hair –Computation.
APC -Unit 2. 2 nd Law A 72kg person stands on a scale which sits on a floor of elevator. It starts to move from rest upward with speed v(t) = 3t +
Flocks, Herds and Schools Modeling and Analytic Approaches.
Flocks, Herds, and Schools: A Distributed Behavioral Model By: Craig Reynolds Presented by: Stephanie Grosvenor.
BOIDS by Craig Reynolds Cs 527 Computer Animation. Dr. Robert Kenyon. Vaidyasubramanian Chandrasekhar Vaidyasubramanian Chandrasekhar.
1 CO Games Development 2 Week 22 Flocking Gareth Bellaby.
Group Behaviors and Artificial Life Claire O’Shea COMP 259 – Spring 2005.
Behavioral Animation Procedural Animation Type?. Behavioral Animation Introduced by C. Reynolds (1987) Animating many things at one time –A group of the.
Rick Parent - CIS682 Flocking Geometric objects Many objects Simple motion - e.g., local rules, more physics, collision avoidance Consider other members.
1Notes  Assignment 2 is out  Flocking references  Reynolds, “Flocks, Herds, and Schools…”, SIGGRAPH’87  Tu and Terzopoulos, “Artificial Fishes…”, SIGGRAPH’94.
Flocking and Group Behavior Luv Kohli COMP259 March 24, 2003.
1cs533d-term Notes  list Even if you’re just auditing!
1cs426-winter-2008 Notes  Please read: C. Reynolds “Flocks, Herds, and Schools…” SIGGRAPH ‘87
Rotational Motion and The Law of Gravity
Classical Mechanics Describes the relationship between the motion of objects in our everyday world and the forces acting on them Conditions when Classical.
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
1 Three dimensional mosaics with variable- sized tiles Visual Comput 2008 報告者 : 丁琨桓.
Three Behavioral Zones Zone of repulsion Zone of orientation Zone of attraction Blind Region  Adapted from Inada, 2002 RoRo.
Problems Ch(1-3).
CLASS 10 SCENE GRAPHS BASIC ANIMATION CS770/870. A scene Graph A data structure to hold components of a scene Usually a Tree of a Directed Acyclic Graph.
Chapter 7 Rotational Motion and The Law of Gravity.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Behavioral Animation: Knowing the environment Flocking.
Chapter 5 The Laws of Motion.
Mar. 30, 2001 Xiaoyuan Tu and Demetri Terzopoulos, Dept. of CS, University of Toronto Artificial Fishes: Physics, Locomotion, Perception, Behavior Presentation.
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’
Engineering Modeling: Mathematical and Computer. What is Engineering Modeling? Model: A representation of a real object or system of objects for purposes.
Group Behaviors. Seminal flocking papers Craig Reynolds Flocks, Herds, and Schools: A Distributed Behavioral Model – SIGGRAPH 1987Flocks, Herds, and Schools:
Robot Intelligence Technology Lab. 10. Complex Hardware Morphologies: Walking Machines Presented by In-Won Park
Forces and the laws of motion. Force A bat strikes the ball with a force that causes the ball to stop and then move in the opposite direction.
Chapter 6 Force and Motion II. Forces of Friction When an object is in motion on a surface or through a viscous medium, there will be a resistance to.
Artificial Fishes: Physics, Locomotion, Perception, Behavior
Computer Animation Algorithms and Techniques
Chapter 4 The Laws of Motion.
Objectives: Write the equation of motion for an accelerating body.
Motion in Two Dimensions
Behavioral animation CSE 3541 Matt Boggus.
Physics 2 – April 20, 2017 P3 Challenge – A kg block with an initial speed of 3.5 m/s is sliding on a level surface with a kinetic coefficient of.
Flocking Geometric objects Many objects
Dawson High School AP Physics 1
Introduction & Rectilinear Kinematics:
Chapter Four The Laws of Motion.
Chapter 13 Gravitation.
Computer Animation Ying Zhu Georgia State University
College Physics, 7th Edition
CHAPTER 11: MOTION ..
APC -Unit 2.
Swarm simulation using anti-Newtonian forces
Motion in Two Dimensions
Circular Motion and Other Applications of Newton’s Laws
Kinematics Acceleration
Motion.
Chapter 5 The Laws of Motion.
PHYS 211 Exam 1 HKN Review Session
PHYS 1443 – Section 001 Lecture #9
Physics 11a.
Chapter 13 Gravitation.
Motion in Two Dimensions
Physics 1 – Oct 27, 2017 Get out Forces p1-2 for Hmk check
Synthesis of Motion from Simple Animations
College Physics, 7th Edition
Computer Animation Algorithms and Techniques
Computer Graphics Lecture 15.
Science Notes: Stnd 03 Date Standard 03: 8.PS2.3 Kinematics
The Laws of Motion (not including Atwood)
In this section you will:
Kinetic Energy and Work
Presentation transcript:

Flocking and Group Behavior Brian Salomon

Papers Reynolds, C.W. Flocks, Herds, and Schools: A Distributed Behavioral Model. Computer Graphics, 21(2):25-34,1987. Tu, X., and Terzopoulos, D. Artificial Fishes: Physics, Locomotion, Perception, Behavior. In Computer Graphics: Proceedings of SIGGRAPH 94, 43--50, 1994.

Reynolds Birds

Motivation Flocks are interesting because Purpose Overall fluid movement from discrete actors Emergent Behavior Purpose Higher level animation Automatic constraint satisfaction

Boids Bird-oid Oriented particles Rendered as a geometric shape Independent computation: “distributed”

Movement Coordinate System travels with boid y Intermittent translation and rotation about X and Y, not a real flight model, no notion of lift, gravity Speed may not exceed certain limit through viscous damping, acceleration may not exceed fraction of max speed. Banking, keeps negative Y pointing in direction of acceleration (including gravity) y z x

Flocking Reason for flocking Flocking in nature is scalable Predator protection Finding food Mating opportunities Flocking in nature is scalable Schools of fish 17 miles long with millions of fish Implies O(1) complexity

Simulated Flocking Three behaviors Collision Avoidance (other boids and obstacles) Velocity Matching Flock Centering (move towards centroid of neighbors) Algorithm is O(N2). More on this later. Diagrams from Craig Reynolds’ boids page

Behaviors Each behavior produces a normalized vector and an importance [0,1] Strict priority order as opposed to averaging Once magnitude is used up subsequent behaviors have no say

Simulated Flocking, cont’d Flocks may split when obstacle encountered, but may not rejoin Not realistic (more like fish in murky water) Actual birds use long range vision: Rate of propagation of maneuvers can be as high as 3 times startle reaction time

Perception Complete knowledge led to unrealistic behavior. Flocking requires locality. Boid surrounded by a zone (sphere) of sensitivity. Specified by two parameters, radius and exponent (1/rn falloff up to rmax). Found n=1 was unnatural but n=2 worked well. Vague notion of gravity vs spring, seems like hackery

Scripting, “Going Z for the Winter” Want more control Add a point of attraction or direction of movement Can be position dependent Can only apply to certain boids Can change over time

Environmental Obstacles Don’t want simple repulsion because it is OK to be near obstacles, just don’t want to fly at them. Algorithm: Look along Z for obstacles If found find nearest silhouette point and add 1 body length, use this radial vector for collision avoidance Works for obstacles that are spheres, cylinders, planes, boxes

Complexity Described algorithm is O(N2) but: Treating each boid as a separate computer changes complexity to O(N) Could use spatial decomposition to achieve O(1)

Results Some Applets: http://www.red3d.com/cwr/boids/ http://members.ozemail.com.au/~dcrombie/project/applet.html

Tu and Terzopoulos Fish

Motivation Schooling and other behaviors Memory Eating Wandering Mating Memory More accurate Perception Physically based motion

Fish Model 23 Nodes, 91 Springs, 12 Contractible Springs diagram from the paper

Physical Simulation xi(t)=[xi(t), yi(t), zi(t)] v(t)=dx/dt a(t)=d2x/dt2 Si,j ~ spring between nodes i and j li,j ~ resting length ci,j ~ spring constant fsi,j ~ force from spring Si,j on node i, fsj,i= -fsi,j ri,j=xj(t)-xi(t) ei,j=|ri,j|-li,j fsi,j=ci,jei,j(t)ri,j/|ri,j|

Physical Simulation, cont’d mi(d2xi/dt2) + i(dxi/dt) – wi=fwi fwi ~ external forces wi ~ sum of spring forces Sparse Matrix, integrated using Implicit Euler.

External Forces for Swimming When fish swings tail left to right water is displaced. Moving water applies force to tail proportional to volume of water displaced. Instantaneous force is proportional to -∫s(n·v)nds s ~ surface v ~ relative velocity of surface to water n ~ surface normal Approximate by triangulating surface with vertices at nodes. Use f=min(0, -A(n·v)n) and give 1/3 force to each node of triangle. A = triangle area.

Muscles Contract resting length (li,j from previous slide) up to lmini,j To swim contract one side while relaxing other in periodic manner To turn contract one side sharply and then slowly relax There are three muscle sections with four muscles each. Swimming uses front two groups, turning uses back two.

Motor Controllers According to Paper only 3 motor controllers (Swim, Turn-Left, Turn-Right). move muscles by specifying amplitude and frequency for two muscle sections to generate muscle movements described on previous slide For Swim empirically found maximum speed parameters and specify rest in terms of max For turn found params for 30 °,45 °,60 °,90° turn. Interp for turns in between these values. Multiple turns for greater than 90° . But, next section talks about using pectoral fins for braking, rising, etc. No mention of how this fits into the controllers. Presumably these are used by the swim controller.

Perception Vision Temperature Cyclopean solid angle of 300 Lookup properties of visible objects. Access to shading information Average whole picture for “light” perception Effective radius determined by murkiness Temperature

Mental State Three functions determine the mental state of a fish Hunger: H(t) = min[1-ne(t)R(∆tH)/,1] ne(t) ~ amount of food eaten R(x) = 1 – p0x po ~ rate of digestion ∆tH ~ time since last meal  ~ appetite

Mental State, cont’d Libido L(t) = min[s(∆tL)(1-H(t)), 1] Fear s(x) = p1x p1 ~ libido constant H is hunger from previous slide ∆tH ~ time since last mating Fear F(t) = min[Do/di(t), 1] Do = 100 di(t) = distance to visible predator i

Intentions diagram from paper Focuser selects target of intention if necessary

Behavior Intentions generate behaviors Behaviors use muscle controllers Behaviors: avoiding-static-obstacle avoiding-fish eating-food mating leaving wandering escaping schooling Some have sub-behaviors (chase-target sub-behavior of eating-food)

Schooling

Results http://mrl.nyu.edu/~dt/animat-vision/

Questions/Comments?