Flocking and Group Behavior Luv Kohli COMP259 March 24, 2003.

Slides:



Advertisements
Similar presentations
UNIT 6 (end of mechanics) Universal Gravitation & SHM.
Advertisements

Real-Time Game Physics
Beyond the Centralized Mindset
Torque, Equilibrium, and Stability
Motivation Hair animation used in movies, games, virtual reality, etc. Problem due to complexity –Human head has over 100,000 strands of hair –Computation.
Surface Modeling with Oriented Particle System Szeliski and Tonnesen Siggraph 1992.
Evolving Flocking Simulation and Robotics Dan Sayers iotic.com.
Behavioral animation CSE 3541 Matt Boggus. Material recap and trajectory Geometric – Artist specifies translation and rotation over time Physically based.
Better Group Behaviors in Complex Environments using Global Roadmaps O. Burchan Bayazit, Jyh-Ming Lien and Nancy M. Amato Presented by Mohammad Irfan Rafiq.
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.
Dynamics of a Continuous Model for Flocking Ed Ott in collaboration with Tom Antonsen Parvez Guzdar Nicholas Mecholsky.
Optimizing Flocking Controllers using Gradient Descent
Advanced Computer Animation. Group Behaviors Group Behaviors : Motivation Many animations require natural-looking behavior from a large number of characters.
Florian Klein Flocking Cooperation with Limited Communication in Mobile Networks.
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.
Crowd simulation Taku Komura. Animating Crowds We have been going through methods to simulate individual characters We have been going through methods.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
Animation Following “Advanced Animation and Rendering Techniques” (chapter 15+16) By Agata Przybyszewska.
Character Setup Character Setup is the process of creating handles and controls for anything that a character animator will need to adjust in order to.
1Notes  Assignment 2 is out  Flocking references  Reynolds, “Flocks, Herds, and Schools…”, SIGGRAPH’87  Tu and Terzopoulos, “Artificial Fishes…”, SIGGRAPH’94.
1Notes  Textbook: matchmove 6.7.2, B.9. 2 Match Move  For combining CG effects with real footage, need to match synthetic camera to real camera: “matchmove”
John S Gero Agents – Agent Simulations AGENT-BASED SIMULATIONS.
Particle Systems 1 Adapted from: E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012.
Scalar-Vector Interaction for better Life …… P M V Subbarao Professor Mechanical Engineering Department I I T Delhi Vector Analysis : Applications to.
Interactive Animation of Structured Deformable Objects Mathieu Desbrun Peter Schroder Alan Barr.
Better Group Behaviors in Complex Environments using Global Roadmaps O. Burchan Bayazit, Jyh-Ming Lien and Nancy M. Amato Andreas Edlund.
CS274 Spring 01 Lecture 5 Copyright © Mark Meyer Lecture V Higher Level Motion Control CS274: Computer Animation and Simulation.
1cs426-winter-2008 Notes  Please read: C. Reynolds “Flocks, Herds, and Schools…” SIGGRAPH ‘87
Crowd Simulation Seminar ”Steering Behaviors For Autonomous Characters” By Craig W. Reynolds Rudi Bonfiglioli ( )
Steering Behaviors For Autonomous Characters
Collective Animal Behavior Ariana Strandburg-Peshkin.
Feature-length films: Games: Desktop Animations: Computer Animation.
Crowd Simulations Guest Instructor - Stephen J. Guy.
Curve Modeling Bézier Curves
Spring Topic Outline for Physics 1 Spring 2011.
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Modelling and Simulation Dynamics. Dynamics Dynamics is a branch of physics that describes how objects move. Dynamic animation uses rules of physics to.
1 Animation & Java3D ©Anthony Steed Overview n Introduction to Animation Kinematics Dynamics Boids n Java3D Scene graph Animation Vehicles.
Adapting Simulated Behaviors For New Characters Jessica K. Hodgins and Nancy S. Pollard presentation by Barış Aksan.
Three Behavioral Zones Zone of repulsion Zone of orientation Zone of attraction Blind Region  Adapted from Inada, 2002 RoRo.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
The coordinates of the centre of mass are M is the total mass of the system Use the active figure to observe effect of different masses and positions Use.
Detail-Preserving Fluid Control N. Th ű rey R. Keiser M. Pauly U. R ű de SCA 2006.
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.
Character Setup In addition to rigging for character models, rigging artists are also responsible for setting up animation controls for anything that is.
A Computationally Efficient Framework for Modeling Soft Body Impact Sarah F. Frisken and Ronald N. Perry Mitsubishi Electric Research Laboratories.
1996 Eurographics Workshop Mathieu Desbrun, Marie-Paule Gascuel
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Behavioral Animation: Knowing the environment Flocking.
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.
Smoothed Particle Hydrodynamics Matthew Zhu CSCI 5551 — Fall 2015.
Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’
Group Behaviors. Seminal flocking papers Craig Reynolds Flocks, Herds, and Schools: A Distributed Behavioral Model – SIGGRAPH 1987Flocks, Herds, and Schools:
Constraint-Based Motion Planning for Multiple Agents Luv Kohli COMP259 March 5, 2003.
Rotational Motion – Kinematics, Moment of Inertia, and Energy AP Physics 1.
Robot Intelligence Technology Lab. 10. Complex Hardware Morphologies: Walking Machines Presented by In-Won Park
Waves & Sound.  PERIODIC MOTION:  Any motion that repeats itself in equal interval of time is known as periodic motion in equal intervals of time along.
Feature-length films: Games: Desktop Animations:.
Kinetic Energy and Work Chapter 7. Definition: The Energy (E) of a body is its capacity to do work. Energy is present in the Universe in various forms.
Artificial Fishes: Physics, Locomotion, Perception, Behavior
Computer Animation Algorithms and Techniques
Chapter 10 - Rotational Kinematics
Flocking Geometric objects Many objects
Flocking and Group Behavior
Computer Graphics Lecture 15.
Presentation transcript:

Flocking and Group Behavior Luv Kohli COMP259 March 24, 2003

Outline First, birdies! –Craig Reynolds paper on flocking Then, fishies! –Tu & Terzopoulos paper on artificial fishes

What is a flock? One definition: a group of birds or mammals assembled or herded together

Why model flocking? It looks cool Difficult to animate using traditional keyframing or other techniques –Hard to script the path –Hard to handle motion constraints –Hard to edit motion

Boids! “boids” comes from “bird-oids” Similar to particle systems, but have orientation Have a geometric shape used for rendering Behavior-based motion

Boid motion (1) Boids have a local coordinate system

Boid motion (2) Flight is accomplished using a dynamic, incremental, and rigid geometrical transformation Flight path not specified in advance Forward motion specified as incremental translations in local +Z direction

Boid motion (3) Rotation about X, Y, and Z axes for pitch, yaw, and roll No notion of lift or gravity (except for banking) Limits set for maximum speed and maximum acceleration

Flocking motion Boids must coordinate with flockmates Two main desires: –Stay close to the flock –Avoid collisions with the flock Flocking seems to have evolved due to protection from predators, higher chances of finding food, mating, etc.

Flocking – 3 Behaviors (1) Collision avoidance: avoid collisions with nearby flockmates

Flocking – 3 Behaviors (2) Velocity matching: attempt to match velocity with nearby flockmates

Flocking – 3 Behaviors (3) Flock centering: attempt to stay close to nearby flockmates

Arbitrating behaviors Behavioral urges produce acceleration requests: normalized 3D vector with importance in [0,1] Priority acceleration allocation is used instead of averaging acceleration requests Acceleration requests are prioritized and the most important ones are used up to a maximum acceleration

Simulated perception Unrealistic for each boid to have complete knowledge Flocking depends upon a localized view of the world Each boid has a spherical neighborhood of sensitivity, based upon a radius and an exponent: 1/r n Can be exaggerated in forward direction

Scripted flocking More control is needed for animation (e.g., flocks should be near point A at time t 0 and near point B at time t 1 ) Flock has a migratory urge towards a global target Global target can be moving and can vary depending on boids or other factors

Avoiding obstacles (1) Force field approach –Obstacles have a field of repulsion –Boids increasingly repulsed as they approach obstacle Drawbacks: –Approaching a force in exactly the opposite direction –Flying alongside a wall

Avoiding obstacles (2) Steer-to-avoid approach –Boid only considers obstacles directly in front of it –Finds silhouette edge of obstacle closest to point of eventual impact –A vector is computed that will aim the boid at a point one body length beyond the silhouette edge

Avoiding obstacles (3)

Algorithmic considerations Naïve algorithm is O(N 2 ) This can be significantly reduced: –Localizing each boid’s perception –Parallelization –Spatial partitioning can be used to achieve O(1)

On to fish! Want to model schooling and other behaviors: –Eating –Avoiding predators –Mating Modeled with limited memory, perception of the world, behavior, and physics

Overview

Physics-based fish model (1) Dynamic fish model consisting of 23 nodal point masses and 91 springs Spring arrangement maintains structural stability while allowing flexibility 12 springs run the length of the body to serve as simple muscles

Physics-based fish model (2)

Mechanics (1) Each node has: –mass m i –Position x i (t) = [x i (t) y i (t) z i (t)] –Velocity v i (t) = dx i /dt –Acceleration a i (t) = d 2 x i /dt 2

Mechanics (2) Spring S ij connects node i to node j –Spring constant c ij –Rest length l ij –Deformation e ij = ||r ij || - l ij r ij = x j (t) – x i (t) –Exerts force f s ij = c ij e ij (t)r ij /||r ij || on node i, and –f s ij on node j

Mechanics (3) Equations of motion specified by: m i (d 2 x i /dt 2 ) + ρ i (dx i /dt) – w i = f w i ρi = damping factor w i (t) = sum of spring forces f w i = external (hydrodynamic) forces Integrated using numerically stable implicit Euler method

How to swim fish-style (1) Artificial fish moves by contracting muscles Forward motion achieved by swinging tail, which displaces water Displaced water produces a reaction force normal to the fish’s body and proportional to the displaced volume

How to swim fish-style (2) Instantaneous force proportional to ∫s(n·v)nds s = surface v = relative velocity between surface and fluid n = unit outward normal function over surface Approximated with f=min(0, -A(n·v)n), where A is triangle area. (1/3)f is given to each triangle node

How to swim fish-style (3) Tail swinging achieved by contracting swimming muscles on one side and relaxing on the other side periodically Turning achieved by contracting one side sharply, relaxing the other side, then slowly relaxing the contracted side Swimming uses back two muscle groups, turning uses front two muscle groups

Motor controllers Artificial fish has three motor controllers –Swim-MC(speed) Converts speed into contraction amplitude and frequency –Left-turn-MC(angle) –Right-turn-MC(angle) Converts angle into parameters for muscles

Sensory perception (1) Vision sensor: vision is cyclopean Covers 300 degree spherical angle extending to some effective radius based on water translucency Vision sensor has access to geometry, material properties, and illumination information Image is averaged to determine overall light

Sensory perception (2) Temperature sensor Samples ambient water temperature at center of fish’s body

Mental state (1) Fish’s mental state specified by: –Hunger H(t) = min[1-n e (t)R(∆t H )/ ,1] n e (t) = amount of food consumed R(x) = 1 – p 0 x, p o = digestion rate ∆t H = time since last meal  = appetite –p 0 = results in ravenous fish

Mental state (2) Fish’s mental state specified by: –Libido L(t) = min[s(∆t L )(1-H(t)), 1] s(x) = p 1 x, p 1 = libido constant H is hunger ∆t L = time since last mating –p 1 = 0.01 results in sexual mania

Mental state (3) Fish’s mental state specified by: –Fear F(t) = min(sum(min[D o /d i (t), 1]),1) D o = 100 (constant) d i (t) = distance to visible predator i

Intention generator

Satisfying intentions Once an intention is selected, control is passed to a behavior routine Eight behaviors: –Avoiding-static-obstacle –Avoiding-fish –Eating-food –Mating –Leaving –Wandering –Escaping –Schooling Behaviors can also have subroutines that are called

Schooling

Different fish types Predators, prey, pacifists Each type has different intentions which lead to different behavioral patterns Pacifists exhibit mating behavior based upon criteria for being interested in potential mates

Pacifists A male fish selects a mate as follows: –A female of the same species is preferred to one of other species –Closer females are more attractive than ones further away A female fish selects a mate similarly but shows preference to male fish size (stronger, more protective) rather than proximity

References Reynolds, C. W., "Flocks, Herds, and Schools: A Distributed Behavioral Model." Computer Graphics, 21(4): Tu, X. and Terzopoulos, D. "Artificial fishes: Physics, locomotion, perception, behavior." Proc. ACM SIGGRAPH '94 Conference.