Crowd Simulation - PowerPoint PPT Presentation

About This Presentation
Title:

Crowd Simulation

Description:

... scenes of games) crowds used more and more, usually to increase epic dimensions ... State of the Art (Movies) The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL ... – PowerPoint PPT presentation

Number of Views:409
Avg rating:3.0/5.0
Slides: 101
Provided by: kno9
Learn more at: http://www.cs.unc.edu
Category:
Tags: crowd | simulation

less

Transcript and Presenter's Notes

Title: Crowd Simulation


1
Crowd Simulation
  • Ilknur Kaynar Kabul
  • COMP 259 Spring 2006

2
Overview
  • Motivation
  • Simulating dynamic features of escape panic
  • D. Helbing, I. Farkas, and T. Vicsek
  • Hierarchical Model for Real Time Simulation of
    Virtual Human Crowds
  • Soraia Raupp Musse, Daniel Thalmann
  • Constrained Animation of Flocks
  • Matt Anderson, Eric McDaniel and Stephen Chenney
  • Scalable Behaviors for Crowd Simulation
  • Mankyu Sung, Michael Gleicher and Stephen Chenney
  • Summary

3
Motivation
  • Real worlds crowds are ubiquitous
  • Non-real time applications (films, cut-scenes of
    games) crowds used more and more, usually to
    increase epic dimensions
  • Real-time applications (games, training
    simulations) crowds are still rare, most
    interactive worlds are ghost towns

4
Applications
  • Entertainment industry (animation production,
    computer games)
  • Training of police military (demonstrations,
    riots handling)
  • Architecture (planning of buildings, towns,
    visualization)
  • Safety science (evacuation of buildings, ships,
    airplanes)
  • Sociology (crowd behavior)
  • Physics (crowd dynamics)

5
Approaches
  • Common approaches
  • Particle systems
  • Agent based models
  • Cellular automata
  • Probability networks
  • Social-force networks
  • Exotic approaches
  • Fractals
  • Chaos model
  • Flow and network models
  • Perceptual control theory

6
State of the Art (Movies)
7
Simulating dynamic features of escape panic
  • Dirk Helbing, Illes Farkas, and Tamas Vicsek
  • Nature, 2000

8
Contribution
  • Proposes a model of pedestrian behaviour to
    investigate the mechanisms of panic and jamming
    by uncoordinated motion in crowds

9
Characteristic features of escape panic
  • People move or try to move considerable faster
    than normal
  • Individuals start to pushing, and interactions
    become physical
  • Moving becomes uncoordinated
  • At exist, arching and clogging are observed
  • Jams build up
  • Pressure on walls and steel barriers increase
  • Escape is further slowed by fallen or injured
    people acting as obstacles

10
The Problem Solution
Crowd stampedes can be deadly People act in
uncoordinated and dangerous ways when
panicking It is difficult to obtain real data on
crowd panics
Model people as self-driven particles Model
physical and socio-psychological influences on
peoples movement as forces Simulate crowd panics
and see what happens
11
Acceleration of Simulated People
  • vi0(t) desired speed
  • ei0(t) desired direction
  • vi(t) actual velocity
  • ti characteristic time
  • mi mass

12
Forces from Other People
  • Force from other peoples bodies being in the way
  • Force of friction preventing people from sliding
  • Psychological force of tendency to avoid each
    other
  • Sum of forces of person j on person i is fij

13
Total Force of Other People
sum of the peoples radii
distance between peoples centers of mass
normalized vector from j to i
psychological force
  • Aiexp(rij dij)/Binij is psychological force
  • Ai and Bi are constants

14
Physical Forces
tangential direction
tangential velocity difference
force from other bodies
force of sliding friction
  • g(x) is 0 if the people dont touch and x if they
    do touch
  • k and ? are constants

15
Forces from Walls
  • Forces from walls are calculated in basically the
    same way as forces from other people

16
Values Used for Constants and Parameters
  • Insufficient data on actual panic situations to
    analyze the algorithm quantitatively
  • Values chosen to match flows of people through an
    opening under non-panic conditions

17
Simulation of Clogging
18
Simulation of Clogging
  • As desired speed increases beyond 1.5m s-1, it
    takes more time for people to leave
  • As desired speed increases, the outflow of people
    becomes irregular
  • Arch shaped clogging occurs around the doorway

19
Widening Can Create Crowding
  • The danger can be minimized by avoiding
    bottlenecks in the construction of buildings
  • However, that jamming can also occur at widenings
    of escape routes

20
Mass Behavior
  • Panicking people tend to exhibit either herding
    behavior or individual behavior, or try to
    mixture of both
  • Herding simulated using panic parameter pi

Individual direction
Average direction of neighbors
21
Effects of Herding
22
Effects of Herding
  • Neither individuals nor herding behaviors
    performs well
  • Pure individualistic behavior each pedestrian
    finds an exit only accidentally
  • Pure herding behavior entire crowd will
    eventually move into the same and probably
    blocked direction

23
Injured People Block Exit
24
A Column Can Increase Outflow
25
Conclusion
  • Bottlenecks cause clogging
  • Asymmetrically placed columns around exits can
    reduce clogging and prevent build up of fatal
    pressures
  • A mixture of herding and individual behavior is
    ideal

26
Demos
  • http//angel.elte.hu/panic/

27
Future work
  • Are parameters based on non-panic situations
    correct for panic situations?
  • How can we get quantitative data about panic
    situations to test simulations?
  • What happens when injured people are allowed to
    fall over (and possibly be trampled)?

28
Hierarchical Model for Real Time Simulation of
Virtual Human Crowds
  • Soraia Raupp Musse, Daniel Thalmann
  • IEEE Transactions on Visualization and Computer
    Graphics (2001)

29
Overview
  • Proposes a model to automatically generate human
    crowds based on groups, instead of individuals
  • Presents three different ways of controlling
    crowd behaviors

30
Contributions
  • Multilevel hierarchy formed by crowd, groups and
    agents
  • Various degrees of autonomy
  • Scripted behaviors (programmed behavior)
  • Interactive control (guided behavior)
  • Rule based behaviors (reactive behaviors)
  • Groups-based behaviors, where agents are simple
    structures and groups are more complex structure

31
Terms
  • Entities
  • Virtual human agent a humanoid whose behaviors
    are inspired by those of humans
  • Group Groups of agents
  • Crowd Set of groups
  • Intentions goals of the entities
  • Knowledge information of the virtual environment
  • Belief internal status of entities
  • Events incidence of something causing a specific
    reaction

32
ViCrowd
  • A system address two main issues
  • Crowd behavior
  • Crowd structure
  • Based on flocking systems
  • Includes a simple definition of behavioral rules
    using conditional events and reactions

33
Control of behaviors
34
Crowd Structure
35
Crowd Information
36
Knowledge
  • Crowd obstacles
  • All the objects and the areas that the crowd can
    walk
  • Crowd motion and action
  • Described using goals
  • Interest points (IP) crowd should pass
  • Action points (AP) crowd can go and perform an
    action
  • IP and AP define the crowd paths
  • Between two goals, different Bezier curves are
    created for each individual
  • Group knowledge
  • Processed by the leader of the group
  • Contain location of other groups and their
    knowledge, belief and intentions

37
Beliefs
  • Crowd and Groups Behaviors
  • Flocking
  • Group ability to walk together in a structured
    group movement
  • Following
  • Group ability to follow a group or an individual
    motion
  • Goal Changing
  • In sociological effects, agents can change their
    groups and become a leader

38
Beliefs
  • Crowd and Groups Behaviors
  • Attraction
  • Groups of agents are attracted around an
    attraction point

39
Beliefs
  • Crowd and Groups Behaviors
  • Repulsion
  • Group ability to be repulsed from a specific
    location or region
  • Split
  • Subdivision of a group to generate one or more
    groups

40
Beliefs
  • Crowd and Groups Behaviors
  • Space Adaptability
  • Group ability to occupy all the walking space
  • Safe-Wandering
  • Evaluate and avoid collision contacts with agents
    and objects

41
Beliefs
  • Emotional Status
  • Sad, calm, happy, regular, etc
  • Way of walking, walking speed and range of basic
    actions
  • Individual Beliefs
  • In sociological effects, individuals has goal
    changing behavior and domination value

42
Intentions
  • Crowd knowledge is used to generate crowd
    intentions
  • Based on crowd intentions, groups intentions are
    generated in a random way

43
Inter-dependence between the levels of information
44
Overview of Model
45
Results Demos
46
Results Demos
SB Scripted behavior GB Guided behavior RB
Reactive behavior
47
Summary
  • Simulations are generated with various levels of
    realism including scripted, reactive and guided
    behavior
  • Crowd is modeled using hierarchical structure
    which is based on groups, not individuals

48
Constrained Animation of Flocks
  • Matt Anderson, Eric McDaniel and Stephen Chenney
    Eurographics/SIGGRAPH Symposium on Computer
    Animation 2003

49
Motivation
  • In real applications, the animator usually wants
    to specify what happens in the scene!

50
Contribution
  • A method for imposing hard constraints on the
    paths of agents at specific times while retaining
    the global characteristics of an unconstrained
    flock

51
Overview
  • Two-step model for constrained animation
  • Produce a trajectory that satisfies the
    constraints
  • Evaluate plausibility and refine the trajectory

52
Behavior model
  • Animation should satisfy constraints and retain
    the underlying behavior model
  • Behavior model
  • Based on Reynolds model
  • Incorporates a wander behavior rule
  • Each character gets a randomly sampled wander
    impulse at each timestep.

53
Behavior model
  • The wander contribution added to the character is
    a combination of this wander impulse and the
    normalized wander contribution from the previous
    timestep.

wci-1 previous wander contribution (normalized)
wii current wander impulse wci total wander
contribution for this timestep
54
Behavior rules
  • Separation
  • Cohesion
  • Alignment
  • Collision avoidance
  • Speed Target
  • Wander

55
Constraints
  • Point constraints a character must be at a point
    at a certain time
  • Center-of-mass constraints the center of mass of
    some group must be at a point at a certain time
  • Shape constraints a group must lie inside a
    polygonal shape

56
Finding initial trajectories
  • Find configurations that satisfy all the
    constraints, then interpolate trajectories in the
    windows between them

57
Finding initial trajectories
  • Possible methods (some or all of these may be
    used)
  • Forward simulation
  • Path transformation
  • Backward simulation

58
Finding initial trajectories
  • Forward simulation
  • Used when initial conditions are given for a
    window
  • Position characters to meet initial conditions,
    then run an unconstrained simulation using the
    behavior model

59
Finding Initial Trajectories
  • Path Transformation
  • Used when the window is part of a sequence of
    point or COM constraints
  • Fit a B-spline curve through the sequence of
    points
  • Run a forward simulation, and at each timestep,
    move the character onto the curve

60
Finding Initial Trajectories
  • Backward Simulation
  • Used when end constraints are given for the
    window
  • Position characters to meet end constraints, then
    run the simulation backwards (just reverse the
    birds perception)

61
Finding Initial Trajectories
  • Blend the resulting trajectory (xbackward) with
    the forward simulation (xforward) using a
    weighting function

62
Evaluating plausibility of an animation
  • gw Determine whether the wander impulses are
    plausibly distributed
  • gc, gs Determine how well the animation
    satisfies the COM and shape constraints
  • gf Bias the animation toward producing a single
    flock

63
Evaluating the wander impulses
  • gw evaluates whether the wander impulses look
    like they were sampled from the right
    distribution
  • In this model, the wander impulses had uniformly
    random direction and normally distributed length,
    so it is evaluated how well the lengths wii fit
    a normal distribution

64
Evaluating constraint enforcement
  • Center of mass constraints
  • COM(A, t) is the center of mass of the group at
    time t
  • Cx is the center of mass defined in the
    constraint
  • Shape constraints
  • cs is a user-defined constant
  • dist(S, A, t) calculates the sum-of-squares
    distance of each character from the shape

65
Generating a better animation
  • If the current animation fails the plausibility
    test, the system generates a new one using one of
    the following strategies

Change the characters velocity along a
trajectory
Add random bumps to a trajectory
Completely re-generate some or all of the
trajectories
66
Generating a better animation
  • Repeat the sampling process for a given number of
    iterations, or until a plausible animation is
    found.

This animation was generated in 1000 iterations
(about two hours)
67
Examples
68
Demos
  • Constrained Flocking

69
Summary
  • The agents in the simulations meet exact
    constraints at specific times
  • The simulations retain the global properties
    present in unconstrained motion

70
Scalable Behaviors for Crowd Simulation
  • Mankyu Sung, Michael Gleicher and Stephen Chenney
  • Computer Graphics Forum (2004) (Eurographics '04)

Some of the slides are taken from
http//www.cs.wisc.edu/graphics/Gallery/Crowds/
71
The GoalScalable Crowd Simulation
  • Large Crowds
  • Scalable performance
  • Large Complex Environments
  • Scalable Authoring
  • Rich, Complex Behaviors
  • Scalable Behaviors

72
Conflicting Goals
  • Large, Complex World
  • Rich Behaviors
  • But
  • Fast performance (simple agents)
  • Reasonable authoring

73
An Environment
Example Model of Street Simulation Real time,
Reactive Rendering Unreal Game Engine for
playback
74
ScalabilityComplex Environments
Store Window
Doorway
In front of Store Window
In front of Doorway
Sidewalk
Friends Together
Use crosswalk
Bench
In Crosswalk
Street
75
ObservationBehavior Depends on Situation
Store Window
Doorway
In front of Store Window Possibly stop to
window shop
In front of Doorway Possibly open door,
enter Unlikely stand blocking door
Friends Together Possibly Stop to
talk Probably Have same goal
Sidewalk Walk here
Use crosswalk Wait for green light Start crossing
In Crosswalk Walk across street once youve
started
Street Generally, Dont walk here
76
Managing Environmental ComplexitySituation-Based
Approach
Store Window
Doorway
In front of Store Window Possibly stop to
window shop
In front of Doorway Possibly open door,
enter Unlikely stand blocking door
Friends Together Possibly Stop to
talk Probably Have same goal
Sidewalk Walk here
Use crosswalk Wait for green light Start crossing
  • Many different situations
  • Each has a different set of local behaviors
  • An agent only needs a few at a time
  • Blend situations/behaviors together

77
ObservationCrowds are Crowds
  • Individuals are anonymous
  • Doesnt matter what any one does
  • At any given time, do something reasonable
  • Aggregate behavior
  • ? Stochastic Control
  • ? Short term view of agent

An Individual
78
Key Ideas
  • Situation-Based Approach
  • Breaks behavior into small pieces
  • Extensible agents kept simple
  • Situation Composition
  • Probabilistic scheme to compose behaviors
  • Painting Interface
  • Place behaviors in world, not agents
  • Use Motion-Graph-based runtime
  • Based on Gleicher et al 2003

79
Situation-Based ApproachAgent Architecture
  • Agents
  • Discrete set of actions (from mograph)
  • Randomly choose from distribution
  • Behavior functions provide distributions
  • All aspects of agents can be updated dynamically

80
Situation-Based ApproachSimple Default Agents
  • Default agents very simple
  • Wander, dont bump into things,
  • Extend agents as necessary to achieve complex
    behaviors

81
Situation-Based ApproachExtensible Agent
  • Situations extend agents
  • Add Actions
  • Add Behavior Functions
  • Add Sensors and Rules that inform Behavior
    Functions

82
Example
  • Default agent cant cross the street.
  • How an agent crosses the street
  • Enters a Crosswalk Situation
  • Crosswalk situation extends agent
  • Sensor to see traffic light
  • Behavior Functions to cross street
  • Behavior Functions to stop
  • Rules to wait for light to change
  • Remove extensions when done

83
Composing BehaviorsAction Selection
Left
?
Agent
Right
Straight
84
Composing BehaviorsProbability Scheme
Behavior Function A
Left
.5
Agent
Right
.3
Straight
.2
85
Composing BehaviorsProbability Scheme
Behavior Function A
Behavior Function B
.4
Left
.5
.1
Agent
.25
Right
.3
.1
.33
Straight
.2
.2
86
Composing BehaviorsExtending Agents
Behav Func A
Behav Func B
Behav Func J
Left
.5
.1
.5
.41
Agent
Right
.3
.1
.5
.24
Straight
.2
.2
.5
.33
Jump
.2
.03
87
Composing BehaviorsProbability Scheme
  • Simple example
  • Three rooms with different set of composing
    behaviors.

88
Situations Compose
  • Agent can be in multiple situations
  • Agent has union of all the things that different
    situations put in

89
Authoring Painting interface
  • Author environments (not characters)
  • Set of situation types
  • Paint into environments
  • Mix situations to make complex/compound ones
  • Ulicny et al (SCA 2004)
  • Painting on people, not environment

90
Advantages
  • Scalability / Efficiency
  • Agent complexity is independent of overall world
    complexity
  • Agent only carries information for current
    situations
  • Authorability
  • Re-use situations
  • Compose / combine / paint
  • Stochastic control
  • variability

91
Demos
92
Limitations/Future work
  • Behavior depends on available actions
  • All behaviors are concatenation of actions
  • Time scale issues / long term behaviors
  • Hierarchical / Ordered Situation
  • Discrete Choices
  • Parameterized actions?
  • Aggregate Control (e.g. Density)
  • Probability Tuning?

93
SummaryScalable Crowd Simulation
  • Situation-Based Approach
  • Simple Extensible Agents
  • Localized behaviors
  • Behavior decomposed in situations
  • Situation Composition
  • Probability distributions

94
Performance evaluation
95
Performance evaluation
96
Summary
  • Simulating dynamic features of escape panic
  • The model is based on plausible interactions
  • It is robust with respect to parameter variations
  • It accounts for the different dynamics in normal
    and panic situations
  • It can be used to test buildings for their
    suitability in emergency situations

97
Summary
  • Hierarchical Model for Real Time Simulation of
    Virtual Human Crowds
  • Presents 3 different ways to control crowd
    behaviors
  • By using innate and scripted behaviors
  • By defining behavioral rules, using events and
    reactions
  • By providing an external control to guide crowd
    behaviors in real time
  • Presents a hierarchical structure based on groups
    to compose a crowd

98
Summary
  • Constrained Animation of Flocks
  • Presents a new technique for the generation of
    constrained group animations that improves on
    existing approaches
  • The agents meet exact constraints at specific
    times
  • The simulation retains the global properties in
    unconstrained motion

99
Summary
  • Scalable behaviors for crowd simulation
  • Presents an approach to controlling the behavior
    of agents in a crowd
  • Complex crowds can be created without increasing
    complexity
  • Character motion produced by the system is
    visually convincing

100
Summary
  • Crowd simulation in real time is still a problem
  • Selection of crowd behaviors can be achieved in
    many ways, e.g. hierarchical approaches
  • Solutions are based on the applications
Write a Comment
User Comments (0)
About PowerShow.com