Crowd Simulation
Intro to steering algorithms
Presented By
Glen Berseth
University of British Columbia
What is steering
- Situationally aware agent (locally)
- Active collision avoidance
- Has a GOAL (target location)
Hitman: Absolution
Uses Boids algorithm [Craig W. Reynolds, 1987]
Where are they used?
- Video Games (e.g. Hitman Absolution, Warhammer online)
- Some character animation systems (MiArmy, MASSIVE)
- Research and analysis (SteerSuite, Menge)
- Data Driven Crowd analysis (Machine learning)
- Some Films (World War Z, LOTR
Why do we want steering algorithms?
- Want to be able to simulate crowds of people
- In some situations it is unrealistic to use people
- Expensive to pay that many people to work together
- Maybe the desired performance may be exaggerated or unsafe
- Used for navigation of robotic systems (better behaviour)
- Airplane boarding (saves money, pedAir)
- How to make a good crowd simulation algorithm?
Outline: how to make good steering algorithms
- The steering problem
- Some popular steering algorithms
- Issues with the disk model
- How can we compare steering algorithms
- What's next?
What kinds of behaviour do we see in crowds?
- Flocking
- Lane forming
- The Vortex
- Compression waves
- More?
Steering Model
- Sliding particle
- Configuration state \(q = \langle x, y, \dot{x}, \dot{y} \rangle \)
- Commonly internal to the steering model
- Preferred Velocity \(v_{pref}\)
- max speed \(v_{max}\)
- radius \(r\)
- neighbours \(a_{0} \ldots a_{n}\)
- waypoints \(p_{0} \ldots p_{m}\)
Simulation loop?
- Steering decision can be even simpler than simulation loop
- \(\langle x, y, \dot{x}, \dot{y} \rangle' = steeringAlgorithm(\langle x, y, \dot{x}, \dot{y} \rangle, \Delta t)\)
Assume steering algorithm has access to all other agents
Example Steering algorithms
Anyone used a steering algorithm before?
Continuum crowds
[Treuille et al. 2006]
Key ideas
- Convert the crowd to a density field
- For each group:
- Construct the unit cost field C
- Construct the potential φ and it’s gradient ∇φ
- Update the agent locations
- Enforce the minimum distance between people
Issues with Disk model
- Foot Skating
- Does not capture rigid body
- Limbs can intersect
- People are not circular
Re-visit Hitam Absolution??
Footstep based [Singh et all 11]
[Singh et al. 2011]
Awesome! Now which one works the best??
- How do we even compare these things?
- Why do we want to compare them?
- Defining what is good motion is a BIG problem.
- Which disks looks more realistic?
SteerBench
- Suite of steering benchmarks
- Consist of common steering benchmarks and new ones
- set of metrics that are independant of steering approach
- number of colissions
- total acceleration, distance traveled, time spent and energy
[Singh et al. 2009]
ScenarioSpace: [Kapadia et al 11]
- Construct a subspace of possible scenarios
- What should this subspace consist of?
- More difficult scenarios
- Reference agent
- Force interaction
- Better metrics for comparison
- Coverage
- Time quality
- Distance Quality
[Kapadia et al. 2011]
Now we can evaluate steering algorithms, so what?
- What do we gain by this?
- What can we do with this information?
Architecture optimization
- Lets not optimize the crowd but the environment for the crowd
- Can we optimize parts of buildings for crowd flow?
[Berseth et al. 2015]
Parameterized scenario (Scenario Subspace)
- A scenario \( s \) is a set of Obstacle and Agents ( \(s = \langle \textbf{O},\textbf{A} \rangle \))
- An obstacle \( o \) has a position \( \textbf{x} \) and geometry (circle or square)
- An agent \( a \) has a position \( \textbf{x}\), radius \( r \) and goal location \( \textbf{g} \)
- A Scenario subspace will define bounds on positions (agents or obstacles) \( \mathcal{S}_{sub} \)
- A scenario is created from \( \mathcal{S}_{sub} \) with parameters \( \textbf{p} \in \mathcal{P} \)
Crowd Flow
- $$ f(\textbf{p}) = \frac{ | A_c | |A|}{\sum_{a \in A_c} t_a} $$
- \(A_{c}\), number of agents that completed the scenario
- \(t_{a}\), Time to complete scenario for agent \(a\)
Formulate Optimization
- penalize overlapping obstacles \(g(\textbf{p})\)
- \(g(\textbf{p}) = \sum\limits_{\forall (o_{1},o_{2}) \in O \times O } g_{o}(o_{1},o_{2}) \)
- $$ \textbf{p}^* = \arg \min_{\textbf{p} \in \mathcal{P}} (-f(\textbf{p}) + g(\textbf{p})) $$
Path planning
- Path planning influences \(v_{pref}\)
- Path planning is usually based on some static discretization of the environment
- This results in very bad noise in the optimization
- Jaring discountinuities in flow wrt \(\textbf{p}\)
- Increased crowd congestion
Results
optimization results
Crowd Simulation with Physics
link
[Guy et al. 2013]
Crowds on any surface
[Ricks et al. 2014]
Conclusion
- Starting to show that we are making good steering algorithms
- Still large barrier between crowd simulation and character simulation
- Physics is going to have to sneek in there somewhere
- More data, we need more data...