Crowd Simulations - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

Crowd Simulations

Description:

Title: Image based lighting Author: sashi Last modified by: sashi Created Date: 10/4/2006 11:18:19 PM Document presentation format: On-screen Show Company – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0
Slides: 43
Provided by: sash91
Category:

less

Transcript and Presenter's Notes

Title: Crowd Simulations


1
Crowd Simulations
  • Sashi Kumar Penta
  • Robotics Class Presentation

2
Overview
  • Motivation
  • Background
  • Behavior Planning for Character Animation,
    Kuffner et.al, Symposium on Computer Animation
    2005
  • Continuum Crowds, Adrein et.al, SIGGRAPH 2006
  • Summary

3
Motivation
  • Crowds are every where!!
  • Motivating video Clip
  • Movies
  • The Chronicles of Nornia The witch, The Lion
    and The ward robe
  • The Lord of the ring
  • I, Robot, etc

4
Applications
Courtesy Illknur
  • 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)
  • Transportation research for urban planning

5
Background
  • Motion-graph approaches
  • Gleicher et. al TOG 2003
  • Kuffner et. al SCA 2005
  • Static potential fields
  • Kirchner 2002
  • Continuous density field
  • Hughes 2003
  • Adrien et. al SIGGRAPH 2006

6
  • Behavior Planning for Character Animation,
    Kuffner et.al, SCA 2005

7
Abstract
  • Automatically generate realistic motions for
    animated characters
  • Motion clips - FSM - movements of a virtual
    character
  • Global search of the FSM a sequence of
    behaviors for the character

From small amount of data
Scales to large motion DBs
Flexible framework
Static/Dynamic environments
8
Behavior Finite-State Machine
  • Behavior FSM defines movement capabilities of
    the character
  • Each state consists of a collection of motion
    clips that represent a high-level behavior
  • Each directed edge represents a possible
    transition b/w two behaviors
  • There can be multiple motion clips with in a
    state.

9
Environment Abstraction
  • Environment as a 2D height-field gridmap
  • Gridmap also encodes
  • Obstacles that the character should avoid
  • Free space where character can navigate
  • Information about special obstacles such as an
    archway
  • Height value is used so that we can represent
    terrains with slopes or hills.
  • Virtual character is bounded by a cylinder with
    radius r position is the center of the cylinder

10
Data structures
  • A tree with nodes that record explored states in
    the FSM
  • Each node in the tree stores the motion clip,
    position, orientation, time and cost
  • Priority queue of FSM states ordered by cost,
    which represent potential nodes to be expanding
    during the next search iteration

11
A - search
  • Total cost
  • ( cost of the path up to that node)
  • (expected cost to reach the goal)
  • Using A-search, The planner iteratively expands
    the lowest cost node in the queue until either
    the a solution is found or the queue is empty.

12
ALGORITHM 1 BEHAVIOR PLANNER
  • Function T takes the input state sin and an
    action a as parameters and returns the output
    state sout
  • Function F returns the set of actions A that
    the character is allowed to take from sbest
  • Function G determines if we should expand
    Snext as a child of sbest in the tree.

13
Motion Generation Blending
  • Search algorithm returns a sequence of behaviors
  • Sequence is converted into an actual motion for
    the character
  • Blending to smooth out any slight
    discontinuities where the transitions b/w
    behaviors occur.

14
Advantages
  • Scalability
  • Memory Usage
  • Intuitive Structure
  • Generality
  • Optimality
  • Anytime

15
Limitations
  • This technique requires an existence of a
    behavior FSM
  • This technique expects the data has been
    appropriately segmented categorized

16
Results
17
(No Transcript)
18
What needs to be taken care
  • Individual human motion
  • Environmental constraints
  • Intelligent path planning

Large group of people exhibit behavior of
enormous complexity and subtlety.
  • Dynamic interactions between people

19
Previous methods
  • Agent based methods
  • Funge et al. 1999
  • Shao and Terzopoulos 2005
  • Massive Software 2006
  • Graph based techniques
  • Bayazit et al. 2002
  • Kuffner et al. 2005
  • Static potential fields
  • Goldeinstein et al. 2001
  • Continuous density field
  • Hughes 2002
  • Adrien et. al 2006

20
Agent based methods
  • Pros
  • Operate with each individual making independent
    decisions
  • Capture each persons unique situation
    visibility, proximity of other pedestrians, etc
  • Different simulation parameter may be defined for
    each crowd member
  • Cons
  • Computationally expensive
  • Difficult to develop behavioral rules that
    consistently produce realistic motion

21
Key points
  • Real-time crowd model based on continuum dynamics
  • Global navigation with moving obstacles such as
    other people
  • Motion of large crowds without need for explicit
    collision avoidance

Dynamic potential field
Interactive rates
Smooth flow
Emergent phenomena
22
The Governing Equations
  • Hypothesis 1
  • Each person is trying to reach a geographic goal
    G ? R2
  • Hypothesis 2
  • People move at the maximum speed possible.
  • Maximum speed field f
  • Where
  • Hypothesis 3
  • There exist a discomfort field g so that, people
    would prefer to be a point x rather than x if
  • g(x) gt g(x)

23
Tying together Hypothesis 4
  • People choose paths so as to minimize a linear
    combination of
  • The length of the path
  • The amount of time to the destination
  • The discomfort felt, per unit time, along the
    path
  • Hypothesis 4
  • A path P that minimizes

24
Optimal path Computation
  • Suppose, Cost function
    every where equal to the cost of the optimal
    path to the goal.
  • Optimal strategy to move the opposite the
    gradient of this function.
  • Potential function ( ) by following set of
    all optimal paths outwards from the goal.
  • In the goal 0
  • Every where,

25
Speed field
  • Speed is a density-dependent variable
  • Crowd density field
  • Low density (lt min) depends on slope
  • High density (gt max) depends vel of crowd
  • Medium density (gt min lt max)

26
Models of the future
  • Predictive discomfort
  • Future path planning through a constantly updated
    static view of environment.
  • Expected periodic changes
  • When the field deterministically changes over time

27
Algorithm
  • For each time step
  • Convert the crowd to a density field.
  • For each group
  • Construct the unit cost field C.
  • Construct the potential and its gradient
  • Update the peoples locations
  • Enforce the minimum distance between people

28
Implementation details
  • Physical fields as 2D arrays of floating point
    numbers.
  • Scalar fields defined at the center of each
    grid cell
  • Its true for average velocity ( ), stored
    as pair of floats
  • Anisotropic fields those depend on both
    position and
  • direction
  • Stored with four floats per
  • cell corresponding to
  • 0o, 90o, 180o, 270o , i.e.
  • EAST, NORTH, WEST and SOUTH
  • faces of each cell

29
Density Conversion
  • Splat the crowd particles onto a density grid,
    to compute speed field which are dependent on
    density
  • Requirements of density function
  • Must be continuous w.r.t location of the people
  • to avoid sharp discontinuities in density and
    subsequently to the speed
  • Each person should contribute no less than
    to their own grid cell, but no more than to
    any neighboring grid cell
  • to ensure each individual is not affected by its
    own contribution to the density field

30
Density Conversion ctd..
  • For each person, we find the closest cell center
    whose coordinates are both less than that of the
    person
  • Relative coordinates of that person
    w.r.t the cell center
  • Persons density then added
  • to the grid as

31
Unit cost field
  • Compute speed field f
  • Then calculate cost field C using
  • f and C are anisotropic
  • We would evaluate the speed
  • and discomfort at the cell into
  • which the person would be
  • moving if they choose that direction

32
Dynamic Potential Field
  • Constructing is the dynamic potential is the most
    complex and time consuming step of the algorithm
  • Implicit eikonal equation Solution
  • Assign the potential field inside the goal to
    0 include these cells in KNOWN cells all other
    to UNKNOWN
  • UNKNOWN cells adjacent to KNOWN cells are
    included in the CANDIDATE cells and we
    approximate at these locations by solving a
    finite difference approximation to
  • The CANDIDATE cell with the lowest potential is
    then included in the KNOWN cells and its
    neighbors are introduced into the CANDIDATE set
    by re-approximating the potentials at these cells
  • This process is repeated, propagating the KNOWN
    cells outwards from the goal until all cells are
    defined.
  • HEAP DATA STRUCTURE O(N log N)

33
Finite difference approximation
  • First find the less costly adjacent grid cell
    along the both x- and y-axis
  • Solve the equation for
  • Once we have computed , we
  • take its difference with the neighboring
  • grid cells in the upwind direction gives us
  • Renormalize the gradient, multiply by the speed
    in the appropriate directions to compute the
    velocity field at that point

34
Crowd Advection
  • Once velocity field is known
  • Each persons position is displaced by their
    velocity, which is effectively computing an Euler
    integration to
  • Min displacement Enforcement
  • All pairs within a threshold distance,
    symmetrically pushed apart so that min distances
    are preserved

35
General Algorithm Overview
Grids
Potential Fields
New positions
Density
Goal
Boundary
36
Results
Video
37
Contributions
  • Integrates both global navigation local
    collision avoidance into one framework
  • Velocity dependent term which induces lane
    formation
  • Distance based term which stabilizes the flow
  • Complexity depend on the number of grid cells

38
Limitations
  • Complex heterogeneous motion
  • Individual path planning
  • Depends on the number of groups
  • Depends on the resolution
  • Approximations
  • Dynamic potential field
  • Minimum distance enforcement to remove visual
    unpleasant artifacts

39
What remains challenging
  • Individual behavior planning in crowds
  • Inertia walking running
  • 4D eikonal equation (Position and Velocity)
  • Potential function across nonuniform grids for
    speed up
  • Sparse data points in areas with few people
  • Finer discretizations in areas of congestion

40
Summary
  • Behavior planning approach to automatically
    generate realistic motions for animated
    characters
  • Crowd simulation framework based on a continuum
    perspective

41
Questions?
42
Thank you!!
Write a Comment
User Comments (0)
About PowerShow.com