BroadcastAsia 2013: Crowd Funding, Peer-to-Peer Investing, Crowd Sourcing
Crowd Simulations
description
Transcript of Crowd Simulations
![Page 1: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/1.jpg)
Crowd Simulations
Guest Instructor - Stephen J. Guy
![Page 2: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/2.jpg)
Outline Animation basics
Key framing Simulation Loop
How to move one man Walk Cycle IK
How to move one thousand Crowd Models Collision Avoidance Data Structures
Rendering
![Page 3: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/3.jpg)
Outline Animation basics
Key framing Simulation Loop
How to move one man Walk Cycle IK
How to move one thousand Crowd Models Collision Avoidance
Rendering
![Page 4: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/4.jpg)
Animation - Basics Comp 768 Preview… Goal: Illusion of continuous motion Divide into several small time-steps (length
T) Show new image at each time-step Needs to happened at least ~12/second (more
is better) Advance T
Update StateDraw Picture
![Page 5: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/5.jpg)
Outline Animation basics
Key framing Simulation Loop
How to move one man Walk Cycle IK
How to move one thousand Crowd Models Collision Avoidance Data Structures
Rendering
![Page 6: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/6.jpg)
Walk Cycle Simply Translating a character to its goal
is unrealistic Walk Cycle: A looping series of positions
which represent a character walking (or running or galloping)
Shifting the animation provides the illusion of walking
Inplace Shifted w/ Time
![Page 7: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/7.jpg)
Digression - Eadweard Muybridge 19th Century English Photograyher
Used multiple cameras to capture motion Invented Zoopraxiscope (spinning wheel of still
images) to animate images
![Page 8: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/8.jpg)
Walk Cycle - Analysis Pros:
Simple to implement Captures the basics of human movement
Cons: Walks must cycle Can’t handle changes in stride length Can’t handle jumps Must be animated by hand
![Page 9: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/9.jpg)
Walk Cycle - Alternatives Inverse Kinematics
Using math to figure out where to place the rest of the body to get the feet moving forward
Motion Capture Record data of real humans walking
Motion Clips FSM of different motions
![Page 10: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/10.jpg)
Outline Animation basics
Key framing Simulation Loop
How to move one man Walk Cycle IK
How to move one thousand Crowd Models Collision Avoidance Data Structures
Rendering
![Page 11: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/11.jpg)
Crowd Simulation Models Simplest model – Agent Based:
Capture Global Behavior w/ many interacting autonomous agents
Each person is represented by one agent Chooses next state based on goal and neighbors
Pioneered by Craig Reynolds Won 1998 (Technical) Academy Award
Advance T
Gather Neighbor
sDraw Agent
Update State
s
For Each Agent
![Page 12: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/12.jpg)
Agent Based Simulations Flocking
Craig Reylonds SIGGRAPH1987
Social Forces Model Dirk Helbing Physics Review B 1995 Nature 2000
Reciprocal Velocity Obstacles Van den Berg I3D 2008
![Page 13: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/13.jpg)
Agent Based Simulations Flocking
Craig Reylonds SIGGRAPH1987
Social Forces Model Dirk Helbing Physics Review B 1995 Nature 2000
Reciprocal Velocity Obstacles Van den Berg I3D 2008
![Page 14: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/14.jpg)
Flocking Seminal work in multi-agent movement Assign simple force to each agent Used in
Lion King Batman Returns
Separation Alignment Cohesion
![Page 15: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/15.jpg)
Boids - Continued New forces can be added to incorporate more
behaviors Avoiding Obstacles
Collision Avoidance
Be Creative!
![Page 16: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/16.jpg)
Boids Online Visit: http://www.red3d.com/cwr/boids/
And: http://www.red3d.com/cwr/steer/Unaligned.html
![Page 17: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/17.jpg)
Agent Based Simulations Flocking
Craig Reylonds SIGGRAPH1987
Social Forces Model Dirk Helbing Physics Review B 1995 Nature 2000
Reciprocal Velocity Obstacles Van den Berg I3D 2008
![Page 18: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/18.jpg)
Helbing’s Social Force Model Very similar to boid model Treats all agents as physical obstacles Solves a = F/m where F is “social force”:
Fij – Pedestrian Avoidance
FiW – Obstacle (Wall) Avoidance
Desired Velocity Current Velocity
Avoiding Other Pedestrians
Avoiding Walls
![Page 19: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/19.jpg)
Social Force Model – Pedestrian Avoidance
rij – dij Edge-to-edge distance nij – Vector pointing away from agent
Ai*e[(rij-dij)/Bi] Repulsive force which is exponential increasing with distance
g(x) x if agents are colliding, 0 otherwise tij – Vector pointing tangential to agent
Vtji – Tangential velocity difference
FiW is very similar
Collision Avoidance
Non-penetration Sliding Force
![Page 20: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/20.jpg)
Helbing - Continued Noticed arching
Also observed in real crowds
Killed or injured people whoexperienced too much force (1,600 N/m) – became unresponsive obstacles
Noticed Faster-is-slower effect
![Page 21: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/21.jpg)
Agent Based Simulations Flocking
Craig Reylonds SIGGRAPH1987
Social Forces Model Dirk Helbing Physics Review B 1995 Nature 2000
Reciprocal Velocity Obstacles Van den Berg I3D 2008
![Page 22: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/22.jpg)
Reciprocal Velocity Obstacles Applied ideas from robotics to crowd simulations Basic idea:
Given n agents with velocities, find velocities will cause collisions
Avoid them! Planning is performed in velocity space
RVOAB(vB, vA) = {v’A | 2v’A – vA
VOAB(vB)}
![Page 23: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/23.jpg)
23
RVO: Planning In Velocity Space
![Page 24: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/24.jpg)
24
RVO: Planning In Velocity Space
![Page 25: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/25.jpg)
RA + RB
25
RVO: Planning In Velocity Space
![Page 26: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/26.jpg)
(VA + VB)/2
RVO: Planning In Velocity Space
26
![Page 27: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/27.jpg)
27
RVO: Planning In Velocity Space
![Page 28: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/28.jpg)
28
RVO: Planning In Velocity Space
![Page 29: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/29.jpg)
RVO: Planning In Velocity Space
29
![Page 30: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/30.jpg)
30
RVO: Planning In Velocity Space
![Page 31: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/31.jpg)
RVO: Planning In Velocity Space
31
![Page 32: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/32.jpg)
RVO: Planning In Velocity Space
32
![Page 33: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/33.jpg)
Videos 12 Agents in a Circle
![Page 34: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/34.jpg)
Videos 1,000 agent’s in a circle
![Page 35: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/35.jpg)
Related data-structures KD-trees
Allowing efficient gathering of nearby neighbors O(log n)
Roadmaps & A* Allows global navigation around obstacles
![Page 36: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/36.jpg)
Roadmaps
1. Create roadmap in free space
2. Find visible source nodes
3. Graph Search to find path to Destination
A* is very popular graph search algorithm
36
![Page 37: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/37.jpg)
Video 1,000 people leaving Sitterson Hall
Uses RVO, Roadmaps, A* and Kd-Trees
![Page 38: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/38.jpg)
Outline Animation basics
Key framing Simulation Loop
How to move one man Walk Cycle IK
How to move one thousand Crowd Models Collision Avoidance Data Structures
Rendering
![Page 39: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/39.jpg)
Rendering Crowds Traditional OpenGL pipeline can be too slow
for 1000s of agents View Culling helps, but often not enough
Need Level-of-Detail techniques Use models with more polygons up close, less
when far away
![Page 40: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/40.jpg)
Imposters
40
Replace Far off agents with an oriented texture
Several Issues “Popping” Uniformity Lighting Shadows
Many issues addressed in recent works
![Page 41: Crowd Simulations](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815c33550346895dca158e/html5/thumbnails/41.jpg)
Questions
?