realistic crowd simulation with density-based path planning

18
Wouter G. van Toll Atlas F. Cook IV Roland Geraerts Realistic Crowd Simulation with Density-Based Path Planning ICT.OPEN / ASCI October 22nd, 2012

Upload: sofia

Post on 05-Jan-2016

44 views

Category:

Documents


0 download

DESCRIPTION

Realistic Crowd Simulation with Density-Based Path Planning. Wouter G. van Toll Atlas F. Cook IV Roland Geraerts. ICT.OPEN / ASCI October 22nd, 2012. Introduction. Path planning in virtual environments (e.g. games) Global planning: find a main route - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Realistic Crowd Simulation with Density-Based  Path Planning

Wouter G. van Toll

Atlas F. Cook IV

Roland Geraerts

Realistic Crowd Simulationwith Density-Based

Path Planning

ICT.OPEN / ASCIOctober 22nd, 2012

Page 2: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

IntroductionPath planning in virtual environments (e.g. games)

Global planning: find a main route

Local planning: variety, collision avoidance

Many characters at once: crowd simulation

Problem: in a crowd, short routes are not always good

Collision avoidance cannot solve everything

Other routes are unused

2

Page 3: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Overview

3

We use crowd density information for global planningStored in a navigation mesh (Explicit Corridor Map)

Planning algorithm: time-based A*

Periodic replanning

ResultsCharacters take detours around congested areas

Crowd spreads over different routes

Efficient: tens of thousands of characters in real-time

Page 4: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Sneak preview

Before: After:

4

Page 5: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Preliminaries

Navigation Meshes / Crowd Density

5

Page 6: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Navigation meshesCharacters need to find paths through an environment

Navigation graph: 1D edgesNot flexible enough for crowds

Navigation mesh: 2D polygonsGlobal path: sequence of polygons

Local planning during movement

Common in modern games / simulations

“Crowd simulation has been solved!”Assumptions in the navigation mesh / crowd

General framework?

6

Page 7: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

An exact and flexible navigation meshMedial axis

Closest-obstacle annotations

A* on the medial axis path

+ corridor

Shortest paths with clearance

Collision avoidance

Multi-layered environments

Dynamic updates

Explicit Corridor Map

7

Page 8: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Fraction of a region Ri that is occupied by characters

Often in persons per m²

Often in levels and colors

For us: value ρi between 0 and 1

(allows multiple character sizes)

Practical studiesWhen the density is high,people walk more slowly

Density-speed function v(ρ) : [0,1] [0, vmax]

Time-based path planning?crowd density

avg.

wal

king

spe

ed

Crowd density

8

F

D

E

CBA

Page 9: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Method

Density Map / Density-Based Path Planning

9

Page 10: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

ECM divides the environment into non-overlapping regions

Each region maps to an ECM edge

Each region stores its local density

Updated in real-time

Density of a region Expected walking speed

within the region

Expected traversal time of the edge

Expected delay

Density map

10

Page 11: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Density-based path planning

A* search on the medial axisA character wants a “fast path”, not necessarily the shortest

Each ECM edge ei has a density ρi

tmin(ei): traversal time at speed v(0) = vmax

tdens(ei): traversal time at speed v(ρi)

tdelay(ei) = tmin(ei) - tdens(ei)

cost(ei) = tmin(ei) + w • tdelay(ei)

Controlling the sensitivity to delaysw = 0: shortest path

w = 1: “fastest path” (Höcker et al., 2010)

w > 1: more eager to take detours

11

Page 12: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

ReplanningDensities change all the time

Characters should re-check their paths

“We cannot see crowds that are far away”Density viewing distance D along the medial axis

A*: if the path length > D, assume ρ = 0

Path has a visible and an invisible part

Partial replanning: re-use invisible partsCharacter has moved

More points are visible

At a mutually invisible point, A* can stop

Speed vs. knowledge

12

Page 13: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Results

Realistic Crowds in Real-Time

13

Page 14: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Experimental resultsVarying the cost weight w

w = 0 congestions

w = 1, no replanning periodic effect

w = 1, replanning realistic crowd flow

longer but faster paths

w > 1 larger detours, indecisive crowd

Useful in other environments?

Varying the viewing distance1 - 2 ms in a large city

Real-time periodic replanningMulti-threading: steering 50K characters in 30 ms/frame

70 ms/frame left for e.g. replanning

14

# path vertices

repl

anni

ng ti

me

D = ∞D = 350 mD = 0 m

Page 15: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Closing Comments

Conclusions / Future work

15

Page 16: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

ConclusionsThe ECM navigation mesh serves as a density map

Non-overlapping, exact, always defined

Region densities map to “edge speeds”

Updated in real-time

Characters use density-based A*Short paths with little expected delay

Sensitivity to delay can be set

(Partial) replanning

Result: More realistic crowdsCharacters spread over routes

Characters avoid congestions

Emergent: global effects due to individual choices

(Still) real-time performance for large crowds

16

Page 17: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

Future workNew questions

Use flow information? (speed + direction)

Use actual visibility?

Event-based vs. periodic replanning

Plan with terrain information?

17

Page 18: Realistic Crowd Simulation with Density-Based  Path Planning

Realistic Crowd Simulation with Density-Based Path Planning

More informationPoster

Contact [email protected]

[email protected]

http://people.cs.uu.nl/roland/

Questions?

18