Crowd simulation Taku Komura. Animating Crowds We have been going through methods to simulate individual characters We have been going through methods.

Slides:



Advertisements
Similar presentations
A predictive Collision Avoidance Model for Pedestrian Simulation Author: Ioannis Karamouzas et al. Presented by: Jessica Siewert.
Advertisements

Controlling Individual Agents in High Density Crowd Simulation N. Pelechano, J.M. Allbeck and N.I. Badler (2007)
Beyond the Centralized Mindset
Right and Left Turns.
CSE 380 – Computer Game Programming Pathfinding AI
Flocking Behaviors Presented by Jyh-Ming Lien. Flocking System What is flocking system? – A system that simulates behaviors of accumulative objects (e.g.
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.
1 CO Games Development 2 Week 22 Flocking Gareth Bellaby.
OBJECT-ORIENTED THINKING CHAPTER Topics  The Object-Oriented Metaphor  Object-Oriented Flocks of Birds –Boids by Craig W. Reynolds  Modularity.
Optimizing Flocking Controllers using Gradient Descent
Behavioral Animation Procedural Animation Type?. Behavioral Animation Introduced by C. Reynolds (1987) Animating many things at one time –A group of the.
Kristen Gardner. Outline Swarm Intelligence Flocking Basic Steering Swarms Applications Animals Vehicles People.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Dynamic Path Planning, Flocking Spring 2012.
Transportation Tuesday TRANSPORTATION TUESDAY What needs quick thinking and concentration? Intersection, junctions, roundabouts & U turns all require your.
 Mankyu Sung Scalable, Controllable, Efficient and convincing crowd simulation (2005)  Michael Gleicher “I have a bad case of Academic Attention Deficit.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Reciprocal Velocity Obstacles for Real-Time Multi-Agent Navigation Jur van den Berg Ming Lin Dinesh Manocha.
Crowd Simulation Sai-Keung Wong. Crowd Simulation A process of simulating the movement of a large number of entities or characters. While simulating these.
1 Reactive Pedestrian Path Following from Examples Ronald A. Metoyer Jessica K. Hodgins Presented by Stephen Allen.
1Notes  Assignment 2 is out  Flocking references  Reynolds, “Flocks, Herds, and Schools…”, SIGGRAPH’87  Tu and Terzopoulos, “Artificial Fishes…”, SIGGRAPH’94.
John S Gero Agents – Agent Simulations AGENT-BASED SIMULATIONS.
Path Planning with the humanoid robot iCub Semester Project 2008 Pantelis Zotos Supervisor: Sarah Degallier Biologically Inspired Robotics Group (BIRG)
C ROWD P ATCHES : P OPULATING L ARGE - S CALE V IRTUAL E NVIRONMENTS FOR R EAL -T IME A PPLICATIONS Barbara Yersin, Jonathan Maïm, Julien Pettré, Daniel.
Presenter: Robin van Olst. Avneesh SudRussell Gayle Erik Andersen Stephen GuyMing Lin Dinesh Manocha.
Better Group Behaviors in Complex Environments using Global Roadmaps O. Burchan Bayazit, Jyh-Ming Lien and Nancy M. Amato Andreas Edlund.
Crowds Andrew Kaufman Michael Welsman-Dinelle. What is a crowd? A group of agents performing actions. Agents can affect each other. Agent actions may.
Continuum Crowds Adrien Treuille, Siggraph 王上文.
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 ( )
Real-time Crowd Movement On Large Scale Terrains Speaker: Alvin Date:4/26/2004From:TPCG03.
Steering Behaviors For Autonomous Characters
A Crowd Simulation Using Individual- Knowledge-Merge based Path Construction and Smoothed Particle Hydrodynamics Weerawat Tantisiriwat, Arisara Sumleeon.
Collective Animal Behavior Ariana Strandburg-Peshkin.
Crowd Simulations Guest Instructor - Stephen J. Guy.
Yingcai Xiao Artificial Intelligence in Game Development Yingcai Xiao.
Biology: flocking, herding & schooling Day 5 COLQ 201 Multiagent modeling Harry Howard Tulane University.
Computer Science 101 Modeling and Simulation. Scientific Method Observe behavior of a system and formulate an hypothesis to explain it Design and carry.
Adrian Treuille, Seth Cooper, Zoran Popović 2006 Walter Kerrebijn
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.
Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.
Controlling the Behavior of Swarm Systems Zachary Kurtz CMSC 601, 5/4/
Controlling Individual Agents in High-Density Crowd Simulation
Crowds (and research in animation and games) CSE 3541 Matt Boggus.
1 Real-Time Parking Information on Parking-Related Travel Cost TRIP Internship Presentation 2014 Kory Harb July 24, 2014 Advisor: Dr. Yafeng Yin Coordinator:
Behavior Control of Virtual Vehicle
Particle Swarm Optimization † Spencer Vogel † This presentation contains cheesy graphics and animations and they will be awesome.
A New Traffic Kinetic Model Considering Potential Influence Shoufeng Lu Changsha University of Science and Technology.
Intersections.
Crowd Self-Organization, Streaming and Short Path Smoothing 學號: 姓名:邱欣怡 日期: 2007/1/2 Stylianou Soteris & Chrysanthou Yiorgos.
Scalable Behaviors for Crowd Simulation Mankyu Sung Michael Gleicher Stephen Chenney University of Wisconsin- Madison
Mar. 30, 2001 Xiaoyuan Tu and Demetri Terzopoulos, Dept. of CS, University of Toronto Artificial Fishes: Physics, Locomotion, Perception, Behavior Presentation.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
Particle Swarm Optimization (PSO)
Simulating Crowds Simulating Dynamical Features of Escape Panic & Self-Organization Phenomena in Pedestrian Crowds Papers by Helbing.
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.
11/13/03CS679 - Fall Copyright Univ. of Wisconsin Last Time A* Improvements Hierarchical planning Pre-Planning.
Sébastien Paris, Anton Gerdelan, Carol O’Sullivan {Sebastien.Paris, gerdelaa, GV2 group, Trinity College Dublin.
Artificial Fishes: Physics, Locomotion, Perception, Behavior
Crowds (and research in computer animation and games)
Computer Animation Algorithms and Techniques
A theory on autonomous driving algorithms
Simulating Dynamical Features of Escape Panic
CIS 488/588 Bruce R. Maxim UM-Dearborn
Crowd Simulation (INFOMCRWS) - Introduction to Crowd Simulation
Crowds (and research in computer animation and games)
CIS 488/588 Bruce R. Maxim UM-Dearborn
Robot Motion Planning Project
Toward Solving Pathfinding
Hiroki Sayama NECSI Summer School 2008 Week 2: Complex Systems Modeling and Networks Agent-Based Models Hiroki Sayama
Presentation transcript:

Crowd simulation Taku Komura

Animating Crowds We have been going through methods to simulate individual characters We have been going through methods to simulate individual characters What if we want to simulate the movement of crowds? What if we want to simulate the movement of crowds? Pedestrians in the streets Pedestrians in the streets Flock of birds, school of fishes Flock of birds, school of fishes People in panic People in panic

Why need a crowd simulation ? Shooting scenes with many people Shooting scenes with many people Expensive to hire many extra actors Expensive to hire many extra actors We don’t see the details : use simple computer- based models We don’t see the details : use simple computer- based models Security reasons: Security reasons: Need to evaluate the safety of buildings Need to evaluate the safety of buildings

Overview Agent based Methods Agent based Methods Flocking Flocking Intention generator Intention generator Creating scenes with human crowds Creating scenes with human crowds Patch-based methods Patch-based methods Create scenes by building blocks Create scenes by building blocks (Local) Collision avoidance (Local) Collision avoidance Global methods (Continuum crowds) Global methods (Continuum crowds) Other Applications: Other Applications:

Flocking Models – Most basic agent model (Reynolds ’87) The agents interact based on simple dynamics The agents interact based on simple dynamics Good to simulate Good to simulate Flock of birds flying, Flock of birds flying, school of fishes swimming school of fishes swimming

Forces applied to individuals Separation Alignment Cohesion Avoidance

Separation Try to avoid running into local flock- mates – –Use a perception volume to limit visible flock-mates – –S : surrounding entities Separation: Fly away away from neighbors that are “too close”

Alignment Try to fly in same direction as local flock-mates – –Gets everyone flying in the same direction Alignment: steer toward average velocity

Cohesion Try to move toward the average position of local flock-mates – –Spaces everyone out evenly, – –keep boundary members toward the group Cohesion: steer toward average position

Avoidance Try to avoid obstacles – –The closer the character is, the stronger the force Avoidance: steer away from obstacles

Combining Commands

Flocking Evaluation Advantages: Advantages: Complex behaviour from simple rules Complex behaviour from simple rules Many types of behaviour can be expressed with different rules and parameters Many types of behaviour can be expressed with different rules and parameters Disadvantages: Disadvantages: Can be difficult to set parameters to achieve desired result Can be difficult to set parameters to achieve desired result Problems regarding strength of forces Problems regarding strength of forces

Making the Agents Smarter Designing the details of the behaviours What to do when you see a predator What to do when you find somebody you know? What to do when the traffic lights are red? Need to add more rules…

Artificial Fish -Terzopoulos et al. SIGGRAPH ‘94 Adding further factors such as Adding further factors such as Hunger Hunger Libido Libido Fear Fear for deciding the behaviour of the fish Adding sensory perception such as Adding sensory perception such as vision vision

Intention Generator 1.First check the sensory information for collision 2.If any close predator, either Schooling Escape Otherwise if hungry eat If full mate

Intention Generator Decision making for the fish Decision making for the fish

What about humans? Can do something similar Can do something similar But humans are a bit more high level But humans are a bit more high level Not only eating or escaping Not only eating or escaping Have destinations Have destinations Contexts Contexts Socializing Socializing Grouping, Grouping, Talking to somebody you know Talking to somebody you know Just make a more (ad hoc) complex model

Behavior model : Autonomous Pedestrians More complex than a fish More complex than a fish

More serious problems for humans : context Interactions with the environment Interactions with the environment Collision avoidance Collision avoidance More complex than fishes More complex than fishes Create a more complex controller Create a more complex controller Getting to the destination : Getting to the destination : use path-finding algorithms such as A* search (shortest route to the destination) use path-finding algorithms such as A* search (shortest route to the destination)

Interactions with the Environment Examples At bus stops, people stop and queue At an elevator, people wait for it and ride on it when it comes and travel to different floors TV in the living room : turn on the TV and sit on the sofa to watch TV TV in the living room : turn on the TV and sit on the sofa to watch TV IDEA: associate such motions with the objects Once the character comes across such objects, they launch the associated motion

Embedding motions into the environment : Advantages of the approach Efficient data handling Efficient data handling Each agent holds the data only needed at that moment Each agent holds the data only needed at that moment The control is decentralized The control is decentralized The system is scalable, and large crowds can be simulated The system is scalable, and large crowds can be simulated

Patch-based approaches Pre-compute the patches (building blocks) which includes the characters and the environment Pre-compute the patches (building blocks) which includes the characters and the environment Concatenate them to generate large scale scenes during runtime Concatenate them to generate large scale scenes during runtime Motion Patches Motion Patches Crowd patches Crowd patches

Motion Patches Building Blocks for Virtual Environments Building Blocks for Virtual Environments Embed the motions into the environment Embed the motions into the environment The patches are spatially aligned The patches are spatially aligned

Crowd Patches A patch-based approach to generate scenes of crowded environment A patch-based approach to generate scenes of crowded environment Crowds avoiding each other in the patches Crowds avoiding each other in the patches The timing and location the characters entering the patches are fixed so that the people can keep on entering / exiting The timing and location the characters entering the patches are fixed so that the people can keep on entering / exiting The characters can be switched to make more variations The characters can be switched to make more variations

Collision avoidance Humans avoid others in streets in a complex way Humans avoid others in streets in a complex way Sometimes wait, sometimes, move aside while walking Sometimes wait, sometimes, move aside while walking Need to either Need to either Model them based on a complex collision avoidance engine Model them based on a complex collision avoidance engine Find a good mathematical model Find a good mathematical model

Local collision avoidance Prepare a sensing fan Prepare a sensing fan Check if there are other agents / obstacles in the sensing fan Check if there are other agents / obstacles in the sensing fan Launch avoiding movements Launch avoiding movements

Avoid oncoming pedestrians If a cross collision is estimated by H with C If a cross collision is estimated by H with C – If H is arriving slightly earlier, it accelerates and turn away from C – If H is arriving slightly later, it decelerates and turn towards C – So C does the same

Head-on collision If a head-on collision is estimated, the agents turn away from each other If a head-on collision is estimated, the agents turn away from each other

Safe turning If an agent needs to make a quick turn, the curvature of the turn is gradually increased until a collision free turn is found If an agent needs to make a quick turn, the curvature of the turn is gradually increased until a collision free turn is found The velocity is decreased according to the curvature The velocity is decreased according to the curvature

Front Safe Area Decelerate and stop when something suddenly comes into the front safe area Decelerate and stop when something suddenly comes into the front safe area

Collision Avoidance : Local vs. Global Combining various rules requires careful parameter-tuning (local model) Combining various rules requires careful parameter-tuning (local model) Need a good controller that Need a good controller that Considers the future Considers the future Finds an optimal path for avoidance Finds an optimal path for avoidance to simulate this effect well (global model)

Continuum Crowds Solving the path-planning and collision avoidance at the same time Solving the path-planning and collision avoidance at the same time 1. Compute the potential field at every time step Based on the other avatars and obstacles Based on the other avatars and obstacles The goal location The goal location 2. The character’s movement determined based on the potential field 3. Update the potential field

Continuum Crowds : procedure Discretize the space into grids Discretize the space into grids Decide the start / goal of the characters Decide the start / goal of the characters

Continuum Crowds : procedure 2 The cost to the goal is going to be computed by the following function: The cost to the goal is going to be computed by the following function:

Discomfort Field Produced by other obstacles / characters Produced by other obstacles / characters

Continuum Crowds : procedure 1

Eikonal function Φ

Continuum Crowds : procedure 2 Starting from the goal we expand outwards and accumulate the cost C Starting from the goal we expand outwards and accumulate the cost C Fast Marching Method Fast Marching Method Similar to Djikstra’s algorithm Similar to Djikstra’s algorithm

Fast Marching Method

Marching Forwards

Potential Field If the group of people share the same speed, goal, and discomfort, we can use the same potential field for all these characters If the group of people share the same speed, goal, and discomfort, we can use the same potential field for all these characters Very efficient if there are little number of groups Very efficient if there are little number of groups

Can simulate the dynamics of crowds A global approach (optimal towards the goal) A global approach (optimal towards the goal) Can simulate phenomena observed in real humans Can simulate phenomena observed in real humans

Another application of crowd simulation Simulating dynamical features of escape panic : Helbing ‘00 A particle system model to simulate the crowd under panic A particle system model to simulate the crowd under panic People rush towards the exit People rush towards the exit

Simulating dynamical features of escape panic : Helbing ’00 f ij, the force to stay away from other entities, f ij, the force to stay away from other entities, f iw the force to stay away from walls f iw the force to stay away from walls : velocity of entity i : velocity of entity i : the desired velocity of entity i : the desired velocity of entity i

Simulating dynamical features of escape panic : Helbing ‘00 f ij, the force to stay away from other entities, f ij, the force to stay away from other entities, f iw the force to stay away from walls f iw the force to stay away from walls : velocity of entity i : velocity of entity i : the desired velocity of entity i : the desired velocity of entity i

Simulating dynamical features of escape panic : Helbing ‘00 f ij, the force to stay away from other entities, f ij, the force to stay away from other entities, f iw the force to stay away from walls f iw the force to stay away from walls : velocity of entity i : velocity of entity i : the desired velocity of entity i : the desired velocity of entity i

Reference REYNOLDS, C. W Flocks, herds, and schools: A distributed behavioral model. In Computer Graphics (Proceedings of SIGGRAPH 87) TU, X., AND TERZOPOULOS, D Artificial fishes: Physics, locomotion, perception, behavior. In Proceedings of SIGGRAPH 94, Computer Graphics Proceedings, Annual Conference Series, 43–50. SHAO, W., AND TERZOPOULOS, D Autonomous pedestrians. In SCA ’05: Proceedings of the 2005 ACM SIGGRAPH/Eurographics symposium on Computer animation, ACM Press, New York, NY, USA, 19–28. Crowd Patches: Populating Large-Scale Virtual Environments for Real- Time Applications. Barbara Yersin, Jonathan Maïm, Julien Pettré and Daniel Thalmann. ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games Kang Hoon Lee, Myung Geol Choi and Jehee Lee, Motion Patches: Building Blocks for Virtual Environments Annotated with Motion Data, accepted to ACM SIGGRAPH Kang Hoon LeeMyung Geol ChoiJehee Lee Adrien Treuille, Seth Cooper, Zoran Popovic, Continuum Crowds, SIGGRAPH 2005