Controlling Individual Agents in High-Density Crowd Simulation
Crowd Simulation Seminar
-
Upload
isadora-carver -
Category
Documents
-
view
43 -
download
2
description
Transcript of Crowd Simulation Seminar
![Page 1: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/1.jpg)
Crowd Simulation Seminar
”Steering Behaviors For Autonomous Characters”
By Craig W. ReynoldsRudi Bonfiglioli (3565025)
![Page 2: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/2.jpg)
Outline
About the author and the paper Introduction, previous work, general concepts Main part:
Locomotive model The steering layer – Behaviors Combining Behaviors
Experiments Assessment
![Page 3: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/3.jpg)
Who?
Craig W. Reynolds, born in 1953 Creates ”Boids” in 1986: artifical life
program that simulates the flocking behavior of birds
Interested the field since then, mainly working in Sony R&D dep. In the US
Worked also on the films ”Tron” ('86) and ”Batman Returns” ('92)!
![Page 4: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/4.jpg)
What?
Paper discussed at the GDC 1999 (656 citations) Early days: Matrix was not even a movie!
Among first attempts at formalizing a crowd simulation approach: details about choices of words and overlapping related fields
![Page 5: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/5.jpg)
Introduction
Focus on autonomous characters meant as situated, embodied, reactive virtual agents
Situated: share world with similar entities Embodied: have a physical manifestation Reactive: have stimuli-driven instincts Virtual: not just simulation of a mechanical
device (easy to describe) but real agents in virtual world
![Page 6: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/6.jpg)
Introduction (2)
Behavior: ”improvisation and life-like actions of an autonomous character”
Classical AI instead defines steps to solve problems Complex: can be divided in layers
We will focus on the middle one
![Page 7: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/7.jpg)
Previous Related Work
Robotics: Arkin R. (1987) “Motor Schema Based Navigation for a Mobile Robot: An Approach to Programming by Behavior”
Perception → Action Mappings expressed in terms of potential fields (not procedural approach)
AI: Costa, M. Feijó, B., Schwabe, D. (1990) ”Reactive Agents in Behavioral Animation”
Artificial Life: Tu, X. Terzopoulos, D. (1994) “Artificial Fishes: Physics, Locomotion, Perception, Behavior”
![Page 8: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/8.jpg)
General Concepts
Our ”pipeline”: Signals→(Loco)Motion→Animation 3 Independent levels? Theoretically, yes In practice:
Signals have to compensate the lower agility of locomotion!
Animation model must be able to adapt to different locomotion scenarios!
The paper will try to treat the locomotion level as completely separated from steering level
![Page 9: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/9.jpg)
Locomotion Model
Very simple Not powerful, but general
and easy to extend A steering force (vector)
is applied to move it, then Euler Integration
Orientation stores a description of both global and local (different viewpoint) space
No explicit rotations used to update state!
![Page 10: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/10.jpg)
Locomotion Model (2)
While moving we mainly have to deal with updating the UP and SIDE vectors
Basic: UP is perpendicular to forward (velocity) direction, SIDE is perpendicular to new UP
Vehicle moving on surfaces → easy. UP vector is always aligned with the normal of the surface
Vehicle flying → Tricky. Banking: align the local floor (hence also UP) with the apparent gravity due to centrifugal force during a turn
![Page 11: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/11.jpg)
Intermezzo
We defined the scope of our problem We have a locomotion model Let's move to the above layer: steering Formal description of many steering behaviors
through geometric calculation of desired steer force
![Page 12: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/12.jpg)
Behaviors – Seek and Flee
Seek: adjust velocity so that its velocity is radially aligned towards the target
Character will eventually pass through target, then turn back
Flee: Similar to seek but the velocity points in the opposite direction
![Page 13: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/13.jpg)
Behaviors – Pursuit and Evasion
Pursuit: target is another moving char
Try to predict the future position of char, then seek the predicted pos
Position T units of time in the future → scale char velocity by T, then add to current pos
Defining T is the key
Evasion: instead, flee from predicted position
Optimal techniques for both pursuit and evasion exist!
![Page 14: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/14.jpg)
Behaviors – Offset pursuit
Offset pursuit: steering a path that passes near a moving target without never really touching it
Dynamically compute a target point which is offset by a radius R from the predicted pos, then use seek
![Page 15: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/15.jpg)
Behaviors - Arrival
Arrival: like seek, but when close to the target, incremental slow down so that we stop at target position
Max velocity kept until we are inside a circle with radius R (predefined) centered in the target position
Then, velocity is decreased (linearly?)
![Page 16: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/16.jpg)
Behaviors – Obstacle avoidance
Obstacle avoidance: both obstacles and character are approximated with spheres
Cilinder projected in the forward direction:
If any obstacles intersect it, we just move in the side direction with respect to the center of the nearest obstacle
![Page 17: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/17.jpg)
More Behaviors... Wander, path/wall
following, containment More elaborated
behaviors use the simpler ones
![Page 18: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/18.jpg)
… Even More Behaviors...
Collision avoidance (unaligned): one/both of the two characters must slow down/accelearate
But which one?
Flow following: powerful way to define the steering behavior to be adopted in an area
![Page 19: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/19.jpg)
Group Behaviors
Separation, Cohesion, Alignment: by combining just these 3 group behaviors we can simulate flocking
![Page 20: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/20.jpg)
Combining Behaviors Steering behaviors described since now serve as
building blocks for more complex patterns Sequential switching and Combining
Check whether two behaviors can be combined How to combine? Blending → calculate both forces
Computationally expensive! → Maybe alternating for some sequential frames? Momentum will be a filter
Defining priorities
![Page 21: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/21.jpg)
Wrap Up
The paper defined a new framework for (re)thinking crowd steering
It described both a locomotive model and a way to model the steering layer
The approach is based on the implementation of (averagely) small behavioral patterns: rather then calculating forces depending on a number of rules and constraints (force fields), we compute them in a sequential way depending on the current pattern (state) or by combining more than one
![Page 22: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/22.jpg)
Experiments?
Wait, no experiments/application? Not completely true: opensteer, an opensource
framework started by Reynoldshttp://opensteer.sourceforge.net/
Opensteer is now way more advanced, but fundamental principles (and some routines) are still the same
![Page 23: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/23.jpg)
Experiments (2)
[Show the video]
![Page 24: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/24.jpg)
Assessment
I think the method presented has some nice advantages:
+ Easy to modify/tune our situation in order to make something happen
Potential fields define a set of rules, hard to tune!
+ Easy to interact with the other ”layers” because we are always quite ”in control”
![Page 25: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/25.jpg)
Assessment (2)
… But there are also a number of drawbacks:
- Implementing so many patterns can be long
- The implementations of many patterns seem to be quite inefficient (linear in the number of agents, a lot of arithmetic)
Maybe we can apply some space-partitioning/LOD?
- Organizing the patterns is not trivial
- We will always be limited by the number of patterns and their combination: are they enough?
![Page 26: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/26.jpg)
Assessment (3)
Many challenges arise! What behavioral patterns are the fundamental ones
in crowd simulation? What's the best way to combine them in order to
obtain complex behavior? Can we make crowd phenomena emerge by just
defining a small number of patterns and combining them in some way?
”Big Fast Crowds on PS3” (2006) by Reynolds (PSCrowd) ”Continuum Crowds” (2006) by A. Treuille, S. Cooper, Z.
Popović
![Page 27: Crowd Simulation Seminar](https://reader038.fdocuments.net/reader038/viewer/2022103006/5681322e550346895d989430/html5/thumbnails/27.jpg)
Questions?