38
1 CS 231 Crowd Simulation CS 231 CS 231 Crowd Simulation Crowd Simulation Outline Outline Introduction to Crowd Simulation Introduction to Crowd Simulation Fields of Study & Applications Fields of Study & Applications Visualization vs. Realism Visualization vs. Realism Microscopic vs. Macroscopic Microscopic vs. Macroscopic Flocking Flocking Social Forces Social Forces 2D Cellular Automaton 2D Cellular Automaton Continuum Crowds Continuum Crowds

CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

  • Upload
    ngoque

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

1

CS 231

Crowd Simulation

CS 231CS 231

Crowd SimulationCrowd Simulation

OutlineOutline

Introduction to Crowd SimulationIntroduction to Crowd Simulation

Fields of Study & ApplicationsFields of Study & Applications

Visualization vs. RealismVisualization vs. Realism

Microscopic vs. MacroscopicMicroscopic vs. Macroscopic

FlockingFlocking

Social ForcesSocial Forces

2D Cellular Automaton2D Cellular Automaton

Continuum CrowdsContinuum Crowds

Page 2: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

2

IntroductionIntroduction

Crowd simulation attempts to model the motions of Crowd simulation attempts to model the motions of objects within an environment.objects within an environment.

The topic has been researched from several different The topic has been researched from several different areas of study:areas of study:

EntertainmentEntertainment

Civil EngineeringCivil Engineering

PsychologyPsychology

Computer ScienceComputer Science

Applications of Crowd SimulationApplications of Crowd Simulation

Entertainment and Visual EffectsEntertainment and Visual EffectsGoal: Create a visually realistic model of crowds for use in movGoal: Create a visually realistic model of crowds for use in movies, ies,

television, and video games.television, and video games.

Architecture and Civil EngineeringArchitecture and Civil EngineeringGoal: Study the flow of people/vehicles through environments.Goal: Study the flow of people/vehicles through environments. Analyze road network efficiency.Analyze road network efficiency. Building evacuation characteristics.Building evacuation characteristics.

PsychologyPsychologyGoal: Validate behavior models of the human mind under differentGoal: Validate behavior models of the human mind under different

environmental conditions (ex. panic).environmental conditions (ex. panic).

Computer ScienceComputer ScienceGoal:Goal: Help out in any of the three areas above with algorithmic knowHelp out in any of the three areas above with algorithmic know--

how.how. Study AI models and behavior.Study AI models and behavior.

Page 3: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

3

Visualization vs. RealismVisualization vs. Realism

The various crowd simulation techniques can generally The various crowd simulation techniques can generally be divided into two categories:be divided into two categories:VisualizationVisualization

Entertainment and Visual EffectsEntertainment and Visual EffectsRealismRealism

Architecture and Civil EngineeringArchitecture and Civil EngineeringPsychologyPsychology

Techniques have begun to merge over the last Techniques have begun to merge over the last decade.decade.

Crowd VisualizationCrowd Visualization

Goal: Create a visually realistic model of crowds.Goal: Create a visually realistic model of crowds.

Simulation does not have to be physically accurate.Simulation does not have to be physically accurate.

Techniques may have to integrate with motion Techniques may have to integrate with motion captured animations.captured animations.

Algorithms frequently exploit LevelAlgorithms frequently exploit Level--ofof--Detail.Detail.

Movies and television applications can afford offline Movies and television applications can afford offline processing as long as simulation time is processing as long as simulation time is reasonable.reasonable.

Video games have realVideo games have real--time requirements.time requirements.

Page 4: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

4

Crowd VisualizationCrowd Visualization

Lord of the Rings Trilogy(2000 – 2003).Using the tool “Massive.”

Disney’s Lion King (1994).

Crowd RealismCrowd Realism

Goal: Study the flow of people/vehicles through Goal: Study the flow of people/vehicles through environments.environments.

Must be as physically accurate as possible.Must be as physically accurate as possible.

Studies constantly compare simulation results Studies constantly compare simulation results with empirical data.with empirical data.

Simple visualizations such as a single point per Simple visualizations such as a single point per object.object.

Page 5: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

5

Crowd RealismCrowd Realism

Simulation of a ship evacuation,using the tool EXODUS.

Paths of pedestrian exploration driven byspace syntax architectural concepts.

Microscopic vs. MacroscopicMicroscopic vs. Macroscopic

Simulations techniques can also be categorized as Simulations techniques can also be categorized as microscopic vs. macroscopic.microscopic vs. macroscopic.

Microscopic techniques simulate the individual Microscopic techniques simulate the individual object.object.

Crowd behavior is an emergent property of the Crowd behavior is an emergent property of the microscopicmicroscopic--level algorithms driving the level algorithms driving the simulation.simulation.

Macroscopic techniques simulate groups of objects.Macroscopic techniques simulate groups of objects.

Example: Treating a transit system as a flow Example: Treating a transit system as a flow problem.problem.

..

Page 6: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

6

FlockingFlocking

Flocking technique introduced by Craig W. Reynolds Flocking technique introduced by Craig W. Reynolds and his and his BoidsBoids..Techniques to simulate animal flocking, herds, and Techniques to simulate animal flocking, herds, and

schooling.schooling.

Sets the stage for further study into crowd simulation.Sets the stage for further study into crowd simulation.

Each agent in the simulation is called a Each agent in the simulation is called a ““boidboid..””

Big Idea: Big Idea: Complex crowd behaviors can be achieved Complex crowd behaviors can be achieved through individual agents following simple rules.through individual agents following simple rules.

Flocking Flocking –– Geometry in FlightGeometry in Flight

Each Each boidboid has its own local coordinate system:has its own local coordinate system:

X axis is left/rightX axis is left/rightY axis is up/downY axis is up/downZ axis is ahead/backZ axis is ahead/back

Rotations too:Rotations too:Rotation about X is pitchRotation about X is pitchRotation about Y is yawRotation about Y is yawRotation about Z is rollRotation about Z is roll

Page 7: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

7

Flocking Flocking –– Geometry in FlightGeometry in Flight

For realism in the simulationFor realism in the simulation……Momentum is conserved.Momentum is conserved.

Speed damping achieved by setting a maximum speed Speed damping achieved by setting a maximum speed and acceleration.and acceleration.

Gravity is used for banking of Gravity is used for banking of boidsboids..

Banking orientation a function of path curvature and Banking orientation a function of path curvature and direction of gravity.direction of gravity.

Not physically realistic. Does not capture that Not physically realistic. Does not capture that traveling up is harder than traveling down.traveling up is harder than traveling down.

Flocking Flocking –– Steering BehaviorsSteering Behaviors

Flocking is closely related to particle systems.Flocking is closely related to particle systems.Forces between particles cause motion.Forces between particles cause motion.Interactions take place within a local neighborhood of Interactions take place within a local neighborhood of

each each BoidBoid..

Three basic steering behaviors:Three basic steering behaviors:SeparationSeparationAlignmentAlignmentCohesionCohesion

Each steering behavior directs thrust in a desired Each steering behavior directs thrust in a desired direction.direction.

Page 8: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

8

Flocking Flocking –– Steering BehaviorsSteering Behaviors

SeparationSeparation

BoidsBoids steer to avoid crowding local steer to avoid crowding local flockmatesflockmates..

Collision avoidance.Collision avoidance.

Keeps Keeps boidsboids a realistic distance apart.a realistic distance apart.

Flocking Flocking –– Steering BehaviorsSteering Behaviors

Alignment (AKA Velocity Matching)Alignment (AKA Velocity Matching)

BoidsBoids attempt to match the velocity of their attempt to match the velocity of their neighbors.neighbors.

Complements separation.Complements separation.

Causes Causes boidsboids to move in the same general to move in the same general direction.direction.

Page 9: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

9

Flocking Flocking –– Steering BehaviorsSteering Behaviors

CohesionCohesion

BoidsBoids steer to move towards the average position of steer to move towards the average position of local local flockmatesflockmates..

Stay together in a Stay together in a locallocal flock.flock.

Allows flocks to both merge and bifurcate.Allows flocks to both merge and bifurcate.

Flocking Flocking –– BoidBoid BrainBrain

Each steering behavior may yield a different thrust Each steering behavior may yield a different thrust vector.vector.

The The BoidBoid Brain combines, prioritizes, and arbitrates Brain combines, prioritizes, and arbitrates between potentially conflicting urges.between potentially conflicting urges.

Page 10: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

10

Flocking Flocking –– BoidBoid BrainBrain

Averaging (and weighted averaging) of steering Averaging (and weighted averaging) of steering vectors works but can yield poor behavior in cases vectors works but can yield poor behavior in cases where steering urges are in opposite directions.where steering urges are in opposite directions.

Hesitation or indecision can lead to collisions with Hesitation or indecision can lead to collisions with obstacles.obstacles.

Flocking Flocking –– BoidBoid BrainBrain

Better Solution:Better Solution:A fixed amount of A fixed amount of ““accelerationacceleration”” is available to each is available to each

boidboid each simulation iteration.each simulation iteration.Steering vectors are processed in order of priority Steering vectors are processed in order of priority

with a weighted average.with a weighted average. Priorities may be reassigned dynamically.Priorities may be reassigned dynamically.

Steering vectors are processed until all acceleration Steering vectors are processed until all acceleration credits have been used up.credits have been used up. The last processed vector is attenuated to keep The last processed vector is attenuated to keep

within acceleration credit limits.within acceleration credit limits.

Page 11: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

11

Flocking Flocking –– Simulated Perception Simulated Perception

Perception is limited to a local field of view.Perception is limited to a local field of view.

Local neighborhood is a spherical zone of sensitivity Local neighborhood is a spherical zone of sensitivity centered around a centered around a boidboid’’ss origin.origin.

Sensitivity is weighted with the inverse of distance Sensitivity is weighted with the inverse of distance square, 1/rsquare, 1/r22. L. Linear weighting yielinear weighting yieldsds unrealistic springunrealistic spring--like animations.like animations.

Additional parameters can be used to simulated bias:Additional parameters can be used to simulated bias:Extra weighting in forward direction to increase Extra weighting in forward direction to increase

awareness of what is ahead.awareness of what is ahead.

Flocking Flocking –– Simulated Perception (2)Simulated Perception (2)

Implications of local perception:Implications of local perception:Flocks of Flocks of boidsboids are allowed to bifurcate as groups of are allowed to bifurcate as groups of

boidsboids may break away from others and still satisfy the may break away from others and still satisfy the cohesion steering behavior.cohesion steering behavior.

Global cohesion/centering models were used early in Global cohesion/centering models were used early in BoidsBoids’’ development.development.

Generated unusual effects causing all members of Generated unusual effects causing all members of a scattered flock to simultaneously converge a scattered flock to simultaneously converge towards the flocktowards the flock’’s s centroidcentroid..

Page 12: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

12

Video Break Video Break

Page 13: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

13

Social ForcesSocial Forces

Developed by Dirk Developed by Dirk HelbingHelbing and Peter Molnar in 1995 and Peter Molnar in 1995 with several advancements since.with several advancements since.

A frequently referenced piece of work.A frequently referenced piece of work.

Widely successful because it elegantly reproduces Widely successful because it elegantly reproduces many common features observed in pedestrian many common features observed in pedestrian movement.movement.

Social ForcesSocial Forces

Social Forces are not exerted by the environment on a Social Forces are not exerted by the environment on a pedestrianpedestrian’’s body, but rather a quantity that s body, but rather a quantity that describes the describes the motivation to act:motivation to act:Respect personal space.Respect personal space.

Follow others at a safe distance.Follow others at a safe distance.

Avoid getting too close to walls and obstaclesAvoid getting too close to walls and obstacles..

Can be thought of as a developed model of Can be thought of as a developed model of ““flocking flocking for humansfor humans”” as pedestrians follow a set of social as pedestrians follow a set of social rules that guide their movement.rules that guide their movement.

Page 14: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

14

One equation describes all forces acting on an One equation describes all forces acting on an individual agent:individual agent:

Social ForcesSocial Forces

Desired MotionDesired Motion

Obstacle AvoidanceObstacle Avoidance

Social ForceSocial Force

Attractive ForcesAttractive Forces

Social ForcesSocial Forces

Acceleration towards a goal.Acceleration towards a goal.Given current location, desired location, current speed, Given current location, desired location, current speed,

and desired speedand desired speed

Acceleration towards the destination is given by:Acceleration towards the destination is given by:

Where Where eeαα is a vector towards the destination.is a vector towards the destination.

The The τταα term is a term is a relaxation varelaxation valuelue thathat controls timingt controls timing..

Page 15: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

15

Social ForcesSocial Forces

Pedestrians will keep a certain distance from others Pedestrians will keep a certain distance from others that depends upon the pedestrian density and that depends upon the pedestrian density and desired speed.desired speed.

IImplemented as a repulsive forcemplemented as a repulsive force with with equipotentialequipotentiallines having the form of an ellipse that is in the lines having the form of an ellipse that is in the direction of motion.direction of motion.

Elliptical range allows for an agent to leave room for Elliptical range allows for an agent to leave room for their own subsequent steps.their own subsequent steps.

Social ForcesSocial Forces

Respect the personal space of othersRespect the personal space of others

Pedestrians have a limited cone of vision, so forces Pedestrians have a limited cone of vision, so forces from agents outside an agentfrom agents outside an agent’’s immediate attention s immediate attention should be attenuated.should be attenuated.

IInternter--agent forces to not cross between obstacles. agent forces to not cross between obstacles. For example, agents on opposite sides of a wall For example, agents on opposite sides of a wall should not affect each other.should not affect each other.

Page 16: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

16

Social ForcesSocial Forces

Avoid colliding with obstacles.Avoid colliding with obstacles.

Pedestrians keep a certain distance from buildings, Pedestrians keep a certain distance from buildings, walls, obstacles, etc. walls, obstacles, etc.

This behavior can be described by the following:This behavior can be described by the following:

Where Where UUααBB is a monotonic decreasing potential.is a monotonic decreasing potential.

The vector The vector rrααBB denotes the distance between the denotes the distance between the agent and the nearest portion of the obstacle.agent and the nearest portion of the obstacle.

Social Forces Social Forces –– EquationsEquations

Social Forces also allows attractive forcesSocial Forces also allows attractive forcesExamples:Examples: FriendsFriends Street PerformersStreet Performers Window DisplaysWindow Displays

The equation for these forces has the same form as The equation for these forces has the same form as the interthe inter--agent repulsive forcesagent repulsive forces

This force is also attenuated with a field of attentionThis force is also attenuated with a field of attention

Page 17: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

17

Social Forces Social Forces –– EquationsEquations

Final Social Force equationFinal Social Force equation

The social force model is now defined by:The social force model is now defined by:

The fluctuation term takes into account random The fluctuation term takes into account random variations in behavior which enhances realism.variations in behavior which enhances realism.

Social Forces Social Forces –– SimulationsSimulations

Two pedestrian phenomena were observed with Two pedestrian phenomena were observed with these equations:these equations:

Lane FormationLane Formation

Door OscillationDoor Oscillation

Page 18: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

18

Social Forces Social Forces –– SimulationsSimulations

Lane FormationLane Formation

The empty circles and full circles have desired The empty circles and full circles have desired direction of motion in opposite directions.direction of motion in opposite directions.

Circle diameter reflects actual velocity.Circle diameter reflects actual velocity.

Social Forces Social Forces –– SimulationsSimulations

Door OscillationDoor OscillationIf one pedestrian has been able to If one pedestrian has been able to

pass a narrow door, other pass a narrow door, other pedestrians with the same pedestrians with the same desired walking direction can desired walking direction can follow easily. Others wait.follow easily. Others wait.

The door can be The door can be ““capturedcaptured”” as as pressure on the opposite side pressure on the opposite side builds up, allowing pedestrians in builds up, allowing pedestrians in the other direction to pass.the other direction to pass.

Page 19: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

19

Social Forces Social Forces –– AdditionsAdditions

Several additions to Social Forces appearSeveral additions to Social Forces appear

Example, evacuation and panic:Example, evacuation and panic:

People move or try to move considerably faster than normal.People move or try to move considerably faster than normal.Individuals start pushing each other (violating repulsive forcesIndividuals start pushing each other (violating repulsive forces from from

earlier work).earlier work).Moving becomes uncoordinated.Moving becomes uncoordinated.Arching and clogging appears at exits.Arching and clogging appears at exits.Jams build up.Jams build up.Physical interactions in jams can build up to dangerous pressurePhysical interactions in jams can build up to dangerous pressures, s,

injuring people and breaking of obstacles.injuring people and breaking of obstacles.Injured people become obstacles to the rest of the crowd.Injured people become obstacles to the rest of the crowd.People show a tendency towards mass behavior.People show a tendency towards mass behavior.Alternative exits are often overlooked or not efficiently used.Alternative exits are often overlooked or not efficiently used.

Social Forces (II) Social Forces (II) –– EquationsEquations

Revised interRevised inter--agent force equation is given by:agent force equation is given by:

““Body forceBody force”” counteracts body compression. k is a counteracts body compression. k is a large constant.large constant.

““Sliding friction forceSliding friction force”” impedes relative tangential impedes relative tangential motion if pedestrians come too close. motion if pedestrians come too close. ΚΚ is another is another large constant.large constant.

Inspired by granular interactions.Inspired by granular interactions.

Page 20: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

20

Social Forces (II) Social Forces (II) –– SimulationsSimulations

Corridor widening can lead to bottlenecks:Corridor widening can lead to bottlenecks:

Arching/Clogging at exits:Arching/Clogging at exits:

Social Forces Social Forces –– ResultsResults

Below shows the effects of fire, which is said to have Below shows the effects of fire, which is said to have a socioa socio--psychological strength 10x greater than a psychological strength 10x greater than a normal wall.normal wall.

Page 21: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

21

Social Forces Social Forces –– ResultsResults

Breaking of a corridor doorway into two helps in Breaking of a corridor doorway into two helps in lane formation and avoid door clogging and lane formation and avoid door clogging and oscillation.oscillation.

Social Forces Social Forces –– ResultsResults

Placing a column in front of an exit can alleviates Placing a column in front of an exit can alleviates problems due to arching by reducing pressure.problems due to arching by reducing pressure.More efficient egress.More efficient egress.Fewer or no injuries.Fewer or no injuries.

Injured agents are shown as full circles on the left.Injured agents are shown as full circles on the left.

Page 22: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

22

2D Cellular Automata2D Cellular Automata

Cellular automatonCellular automaton (plural: (plural: cellular automatacellular automata) )

AA regular grid of regular grid of cellscells, each in one of a finite number of , each in one of a finite number of statesstates. Time is also discrete, updates based on . Time is also discrete, updates based on neighborneighbors form last s form last timesteptimestep..

NNeighbors are a selection of cells relative to the specified eighbors are a selection of cells relative to the specified cell, and do not change (though the cell itself may be in cell, and do not change (though the cell itself may be in its neighborhood, it is not usually considered a neighbor).its neighborhood, it is not usually considered a neighbor).

Page 23: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

23

2D Cellular Automata2D Cellular Automata

2D CA system for modeling pedestrian crowds:2D CA system for modeling pedestrian crowds:

Goal to replicate the phenomena generated by Social Goal to replicate the phenomena generated by Social Forces.Forces. Lane formationLane formation Door oscillationsDoor oscillations Arching and cloggingArching and clogging

By replicating these phenomena, they hope to prove CA By replicating these phenomena, they hope to prove CA is a valid approach to pedestrian modeling.is a valid approach to pedestrian modeling.

(Historical Note: Most cellular automata solutions are 1D and in(Historical Note: Most cellular automata solutions are 1D and in the domain of traffic analysis.)the domain of traffic analysis.)

2D Cellular Automata2D Cellular Automata

The 2D CA pedestrian model presented here breaks The 2D CA pedestrian model presented here breaks an environment (floor plan) down into a grid of cells.an environment (floor plan) down into a grid of cells.Each cell may be occupied by one particle (agent) or by Each cell may be occupied by one particle (agent) or by

an obstacle.an obstacle.Particles move through the environment by moving to Particles move through the environment by moving to

adjacent unoccupied cells.adjacent unoccupied cells.

Page 24: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

24

2D Cellular Automata2D Cellular Automata

Particles may move in 1 of 9 directions with Particles may move in 1 of 9 directions with probabilities denoted by probabilities denoted by MMijij. (Or one is to stay put.). (Or one is to stay put.)

Each particle may have its own local probability grid.Each particle may have its own local probability grid.If the target cell is occupied, the particle stays put.If the target cell is occupied, the particle stays put.

2D Cellular Automata2D Cellular Automata

Lane FormationLane Formation

Two different species of pedestrians traveling in Two different species of pedestrians traveling in different directions across the screen.different directions across the screen.

Page 25: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

25

2D Cellular Automata2D Cellular Automata

Arching/CloggingArching/Clogging

Pedestrians exit the room.Pedestrians exit the room.

Arching is clearly visible around the exit.Arching is clearly visible around the exit.

2D Cellular Automata2D Cellular Automata

A full simulation: Lecture hall evacuation.A full simulation: Lecture hall evacuation.

Page 26: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

26

Continuum Crowds Continuum Crowds –– TreuilleTreuille et al.et al.

Page 27: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

27

Continuum Crowds Continuum Crowds -- motivationmotivation

Most previous methods are Most previous methods are agentagent--basedbased

This isThis is aa ((macroscopic)macroscopic) continuumcontinuum approachapproach

Page 28: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

28

CostCostCC

PotentialPotentialФФ

GoalGoalGG

DiscomfortDiscomfortgg

SpeedSpeedff

CostCostCC

PotentialPotentialФФ

GoalGoalGG

DiscomfortDiscomfortgg

SpeedSpeedff

GoalGoal

GG

GG

GG

Page 29: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

29

Speed Speed -- TopographyTopography

Height

DiscomfortDiscomfort

Page 30: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

30

CostCost

Assumption:Assumption: People always choose the People always choose the path P to the goal which minimizes:path P to the goal which minimizes:

distancedistance timetime discomfortdiscomfort

PotentialPotential

GoalGoal

Page 31: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

31

PotentialPotential

Group 1Group 1

Group 3Group 3Group 2Group 2

Page 32: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

32

CostCostCC

PotentialPotentialФФ

GoalGoalGG

DiscomfortDiscomfortgg

SpeedSpeedff

CostCostCC

PotentialPotentialФФ

GoalGoalGG

DiscomfortDiscomfortgg

SpeedSpeedff

CostCostCC

PotentialPotentialФФ

GoalGoalGG

DiscomfortDiscomfortgg

SpeedSpeedff

CostCostCC

PotentialPotentialФФ

GoalGoalGG

DiscomfortDiscomfortgg

SpeedSpeedff

CostCostCC

PotentialPotentialФФ

GoalGoalGG

DiscomfortDiscomfortgg

SpeedSpeedff

CostCostCC

PotentialPotentialФФ

GoalGoalGG

DiscomfortDiscomfortgg

SpeedSpeedff

ResultsResults

Page 33: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

33

Video Break Video Break

ConclusionConclusion

Path planning for large groups of people at Path planning for large groups of people at interactive ratesinteractive rates

Unify overall path planning and collision avoidanceUnify overall path planning and collision avoidance

Captures emergent phenomenaCaptures emergent phenomena

Model adaptable to many situationsModel adaptable to many situations

Page 34: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

34

LOD in RenderingLOD in Rendering

Page 35: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

35

LOD in RenderingLOD in Rendering

While not explicitly related to simulation, fast While not explicitly related to simulation, fast rendering allows for more time to be spent rendering allows for more time to be spent performing simulation.performing simulation.

There are several techniques that are commonly There are several techniques that are commonly used to speed up crowd rendering.used to speed up crowd rendering.

Geometric LODGeometric LOD

Geometric & Animation LODGeometric & Animation LODReduce the number of polygons in the model at different Reduce the number of polygons in the model at different

LOD steps.LOD steps.

At a certain LOD, stop animating bones of figure and use At a certain LOD, stop animating bones of figure and use staticstatic--keyframekeyframe meshes instead.meshes instead.

May continue to reduce polygons in the model.May continue to reduce polygons in the model.

At the farthest LOD, stop using static meshes and use 2D At the farthest LOD, stop using static meshes and use 2D billboards.billboards.

May be a simple sprite animation.May be a simple sprite animation.

Or more complex Or more complex ““polyposterpolyposter”” [[KavanKavan] which is a ] which is a collection of 2D deformable textured polygons.collection of 2D deformable textured polygons.

Page 36: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

36

Geometric LOD (2)Geometric LOD (2)

Geometric LOD (3)Geometric LOD (3)

A 2D billboard from different views can be generated dynamically.

Billboards can be used to dramatically increase crowd size.

Page 37: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

37

Geometric LOD (4)Geometric LOD (4)

Polyposter approximation of a full mesh animation.

Crowd InterfacesCrowd Interfaces

Crowds brushCrowds brush

Page 38: CS 231 Crowd Simulation - cs.ucr.eduvbz/cs231f10/lecture07-10.pdf · CS 231 Crowd Simulation ... objects within an environment. The topic has been researched from several different

38

Crowd InterfacesCrowd Interfaces

Crowds brushCrowds brush