Download presentation
Presentation is loading. Please wait.
Published byBarnard Singleton Modified over 6 years ago
1
Crowd Simulation (INFOMCRWS) - UU Crowd Simulation Software
Wouter van Toll November 20, 2017
2
INFOMCRWS: UU Crowd Simulation Software
Goals of this session Understand the various crowd simulation levels Get an overview of our simulation software Prepare for Assignment 2 November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
3
INFOMCRWS: UU Crowd Simulation Software
But first... Where are we on Assignment 1? Anything still unclear? Deadline on Friday(!) Please fill in the team schedule, so I can prepare Blackboard November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
4
Recap + Overview Algorithms in a crowd simulation framework
November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
5
Crowd simulation framework
Towards Believable Crowds: A Generic Multi-Level Framework for Agent Navigation Paper B of the course Our software focuses on levels 4/3/2 Geometric components November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
6
INFOMCRWS: UU Crowd Simulation Software
4: Global path planning We use the Explicit Corridor Map (ECM) Compact navigation mesh Supports any character radius Multi-layered environments Dynamic updates Other options could also work As long as characters can compute an indicative route November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
7
ECM implementation GPU “Exact”: Boost, VRONI, CGAL? November 23, 2018
INFOMCRWS: UU Crowd Simulation Software
8
INFOMCRWS: UU Crowd Simulation Software
3: Path following Smoothly follow a desired path Input: indicative route, non-smooth indication of the path In each simulation step, compute an attraction point Leads to a preferred velocity for the next level Indicative Route Method (IRM, 2009) MIRAN: improvement by Jaklin et al. (2013) Supports weighted regions Better smoothness/ shortcut control November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
9
INFOMCRWS: UU Crowd Simulation Software
2: Local movement Roughly move in the preferred direction, while... ...responding to collisions with other characters ...avoiding future collisions ...adapting to the surrounding streams of people ...maintaining social group behavior etc. November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
10
Demo time The ECM framework in action November 23, 2018
INFOMCRWS: UU Crowd Simulation Software
11
INFOMCRWS: UU Crowd Simulation Software
Demos ECM Single agent Crowd Circle Unity3D November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
12
Paper vs. Implementation
It’s hard to judge a method in practice Not all parameter settings are described in a paper Lots of details are up to the programmer Some necessary hacks are not mentioned Small changes can have huge impacts Geometric algorithms are painful to implement Good enough for a paper ≠ 100% robust November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
13
Implementation details
Crowd simulation in the ECM framework November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
14
INFOMCRWS: UU Crowd Simulation Software
Simulation step performStep(Δt) For each character: path following Update pointers along indicative route Update attraction point, preferred velocity For each character: collision avoidance Compute new velocity vNew Smoothen vNew (optional) Compute collision forces F (optional) For each character Update velocity: v := vNew + Δt · F/mass Update position: p := p + Δt · v Update nearest-neighbor data structure (There are actually many more substeps) Why separate loops? Order of characters does not matter Characters are independent, each loop can be parallellized November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
15
INFOMCRWS: UU Crowd Simulation Software
Simulation loop Repeatedly call performStep(Δt) Possible approach: do as many steps as possible Use time between frames as step size Use FPS to measure efficiency We use a fixed time step (0.1 s) Use computation time to measure efficiency Behavior does not depend on the framerate Fast-forward by calling performStep() more/less often You really don’t need a higher simulation framerate Visualization framerate can be much higher Is this a good idea? November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
16
Performance (without visualization)
1 thread November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
17
Performance (without visualization)
8 threads November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
18
INFOMCRWS: UU Crowd Simulation Software
DLL / Plug-in We built a DLL for our software API with ~50 functions (C) Environment modelling Simulation setup Simulation: add/remove characters, set goals, ... Unity plug-in C# wrapper around API functions Grouped into logical objects (Unity scripts) GUI November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
19
INFOMCRWS: UU Crowd Simulation Software
Update in development Different version of the simulation loop DLL still does most of the simulation, except updating the positions DLL sends velocities to Unity Unity computes new positions You can apply physics there Higher framerate than our framework Unity sends positions back to DLL Available soon Hopefully late November / early December November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
20
INFOMCRWS: UU Crowd Simulation Software
Your turn November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
21
INFOMCRWS: UU Crowd Simulation Software
Assignment 2 Create a game in Unity that uses our crowd simulation software as a plug-in Solve at least one problem you’ve seen in Assignment 1 Write a report about your solutions Bonus points if the game is original, fun, etc. Also an experiment for us! November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
22
INFOMCRWS: UU Crowd Simulation Software
Things to keep in mind DLL uses a slow version of dynamic updates Faster method is not yet robust enough Don’t use “removable obstacle” for fast-moving things Recommended to use 2D environments A single layer, everything visible from above Height differences are OK Unity does not like multi-threading very much Manually set the number of available threads? November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
23
INFOMCRWS: UU Crowd Simulation Software
Getting started Install Unity 5.x (if you already have Unity 2017, that’s probably OK) Sign EULA Clone our git repository Unity project with scripts and UUCS DLL Follow the tutorial Mostly GUI-related Bonus challenges, useful for Assignment 2 November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
24
INFOMCRWS: UU Crowd Simulation Software
Extra sessions Support hours Wednesday Nov 29, Dec 6, Dec 13, Dec 20, Jan 10, Jan 17 Locations: see website Mid-term session December 13, Give a demo / progress report November 23, 2018 INFOMCRWS: UU Crowd Simulation Software
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.