Multi-Layered Navigation Meshes Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts ICT.OPEN 2011.
-
Upload
myles-gregory -
Category
Documents
-
view
215 -
download
0
Transcript of Multi-Layered Navigation Meshes Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts ICT.OPEN 2011.
Multi-Layered Navigation MeshesWouter G. van Toll, Atlas F. Cook IV, Roland GeraertsICT.OPEN 2011
2 / 18Motivation
Path planning in games and simulations• Send virtual characters from start to goal…
– …in a smooth an visually convincing way…– …such that they pay attention to other characters– …in real-time, even for large crowds
• Typical solution: navigation mesh– Subdivision of the walkable space
into 2D polygons– Allows smooth, flexible movement– Should be built automatically…
3 / 18Research is necessary!
If you think path planning in games is “solved”…
4 / 18What to do?
What’s the problem?• Human error• Poor data structures • Poor algorithms
What do we want?• A general framework, as automatic as possible• Our framework: path planning with corridors
– Automatically built navigation mesh– Global path planning– Local forces
Our paper
5 / 182D data structure: The medial axis
The set of all points with at least two closest obstacle points• “The middle” of the
walkable space• Maximum clearance
to obstacles• Preserves connectivity
A useful roadmap– “If there’s no path on
the medial axis, then there’s no path at all”
6 / 18The Explicit Corridor Map (ECM)
Annotated medial axis (Geraerts, 2010)• All event points store
a closest obstacle pointon both sides
• Exact subdivision of the walkable space
A navigation mesh• O(n) storage• O(n log n) build time
7 / 18The Explicit Corridor Map (ECM) - 2
Features of the ECM• Global planning
– On the MA only: efficient!– Result: path + corridor
• Indicative Route Method– (Karamouzas et al., 2009)
• Short paths with clearance• Collision avoidance• Local updates
– “A Navigation Mesh for Dynamic Environments”, submitted to ICRA ‘12
Efficient, flexible path planning & crowd simulation
8 / 18Multi-layered navigation?
Crowd simulation is often a 2D problem• Many “3D” environments have a 2D top view (footprint)
But what about multi-layered environments?• It’s not 2D• It’s not 3D It’s a set of connected 2D problems
Existing methods are approximating• 3D grid: loss of precision
Our method is exact
9 / 18This paper
We extend the ECM to multi-layered environments• It is constructed automatically• Assumption: layers are given
– Can be extracted from 3D data
• All 2D algorithms will still work Real-time crowd simulation in multi-layered environments
Recall: The ECM is an annotated medial axis• Our algorithm first builds the multi-layered medial axis• Same annotations: multi-layered ECM
10 / 18
C01
Multi-layered: Definitions
What is a multi-layered environment?• A realistic set of layers and connections
Layer Li
• Bounded planar area with a polygonal footprint 2D
Connection CAB
• Line segment connecting LA to LB
• Half obstacle in LA, half window to LB (access side)
• Also appears in LB, with flipped sides
“Realistic”• Layers are logically connected• All footprints are taken from 1 top view
11 / 18Computing the M-L medial axis
Construction algorithm1. Build the 2D medial axis of each layer…
– …treating connections as impassable obstacles
– Correct, except in influence zones– i.e. the areas with an access side as a closest obstacle– These must be filled in
12 / 18Computing the M-L medial axis - 2
Construction algorithm2. Open up the connections one by one
– Choose any connection, say CAB between layers LA and LB
– Find the connection scene SAB: all obstacles adjacent to CAB
– Compute the medial axis of SAB
– Merge it with the medial axes of LA and LB
– Treat LA and LB as one layerfrom now on
3. Repeat until all connections are open
Result: 1 continuous medial axis of the whole environmentLA
LB
CAB
13 / 18Computing the M-L medial axis - 3
Example• Note: extra vertices on layer transitions
Complexity• n = #obstacle vertices; k = #connections• Storage: O(n) usually O(kn) worst-case• Construction: O(n log n) usually O(kn log n) worst-case
– Worst case is very uncommon
Incremental approach handles every case!• Connections may be close together• Order of opening does not matter
14 / 18Result: Multi-layered ECM
Add closest-point annotations• ECM computed in 46 ms• Real-time multi-layered crowd simulation
15 / 18Experimental results
Adding obstacles hardly affects stitching time• Connection influence is usually local
Running time increases with #connections• Improvements are possible
We can steer very large crowds in real-time• Tens of thousands of characters
16 / 18Conclusion
Our incremental algorithm…• builds the medial axis of a multi-layered environment• extends this to the multi-layered Explicit Corridor Map
Our navigation mesh…• is built automatically, given the separate layers• is the first exact mesh for polygonal
multi-layered environments• supports efficient and flexible crowd simulation
17 / 18Future work
What can still be added?• Faster automatic layer extraction
– Ongoing MSc projects
• Other game actions and environments– Jumping, 3D surfaces, …
There will always be new interesting problems
18 / 18The End
Thank you!