Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Navigation Mesh for Dynamic Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts CASA 2012.

Similar presentations


Presentation on theme: "A Navigation Mesh for Dynamic Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts CASA 2012."— Presentation transcript:

1 A Navigation Mesh for Dynamic Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts CASA 2012

2 Problem solved? 2 / 16

3 3 / 16 Path planning in games and simulations Send virtual characters from start to goal Increasing desire for efficiency and realism – Characters: smooth movement, collision avoidance, … – Environments: complex (2.5D), dynamic, … Foundation: a navigation mesh – Subdivision of the walkable space into 2D polygons – Allows smooth, flexible movement Our framework: corridors – Based on the 2D medial axis  Contribution: dynamic updates Motivation

4 4 / 16 Preliminaries: 2D medial axis Medial axis: Pruned version of the Voronoi diagram Subdivision into cells with 1 closest obstacle A useful roadmap Maximum clearance to obstacles Preserves connectivity The set of all points with at least two closest obstacle points

5 5 / 16 Preliminaries: Explicit Corridor Map ECM: Annotated medial axis (Geraerts, 2010) Bisector vertices store a closest obstacle point on both sides Exact subdivision of the walkable space An efficient nav. mesh O(n) storage O(n log n) build time

6 6 / 16 Preliminaries: Explicit Corridor Map Some features of the ECM Clearance information – Supports all character sizes Global planning on the MA – Result: path + corridor Following indicative routes Short paths with clearance Local forces can be added – Collision avoidance – Group coherence Multi-layered environments Dynamic updates

7 7 / 16 Contribution: Local updates Dynamic environments can change locally E.g. collapsing bridges, newly built roads, … Complete navmesh reconstruction is expensive! Local operations: adding/removing obstacles Update the mesh only where it is necessary Recall: The ECM is an annotated medial axis  We use Voronoi algorithms; skip the annotations today 1. Inserting a point among points 2. Inserting a point among polygons 3. Inserting a polygon among polygons 4. Deleting an obstacle

8 8 / 16 1. Inserting a point among points Insertion = 1 step of incremental construction – Let C j be the Voronoi cell of point p j – Let p be the point to add Algorithm (Green and Sibson, 1978) – Find the cell C i in which p lies – Compute the bisector of p and p i – Find the intersections of bisector and C i – Compute new neighbor + bisector – Iterate until the new cell is finished – Remove the old edges Complexity: O(log n + k) – n = number of points – k = complexity of the new cell

9 9 / 16 2. Inserting a point among polygons What if the other obstacles are polygons? Bisector edges are chains of line/parabola segments A bisector vertex (BV) marks a switch BV occurs when the edge intersects a surface normal Adapted insertion algorithm In each iteration, choose the 1st of 2 intersections

10 10 / 16 3. Inserting polygon among polygons What if the inserted obstacle P is a line or polygon? P can also induce bisector vertices Adapted insertion algorithm In each iteration, choose the 1st of 3 intersections – With the Voronoi cell – With the neighbour’s normal vector – With P’s normal vector

11 11 / 16 4. Deleting an obstacle Deleting P: the cell C P needs to be removed Its interior must be filled in with new edges These can only come from P’s neighbors! Deletion algorithm – Compute N P, set of P’s neighbors – Build the medial axis for N P – Connect the old/new medial axes – Delete the boundary of C P Complexity: O(m log m) – m = number of neighbors for P

12 12 / 16 Experimental results 1. Inserting random points into an empty scene Incremental insertion Local updates vs. global reconstruction – Local: Always fast (< 1 ms) – Global: Slower, depends on #points so far

13 13 / 16 Experimental results (2) 2. Inserting polygons into various scenes Running times: 1.3ms to 2.5ms Efficiency depends on the new cell’s complexity  In practice, most updates will be very local  Fast enough for real-time updates!

14 14 / 16 Experimental results (3) 3. Deleting polygons from various scenes Same polygons/scenes as before Running times: 1.2ms to 5.4ms Efficiency depends on the old cell’s complexity 4. Moving a polygon through various scenes Re-insert the polygon into a static version Running times below 1.5ms  We can handle multiple moving obstacles in real-time

15 15 / 16 Conclusions Algorithms for updating a navigation mesh Based on Voronoi diagram techniques Insertions of points and polygons Deletions based on insertions Implementation and experiments Insertions: real-time performance Deletions: slower, but still applicable Movement: real-time insertions into a static scene Applications in 2D and 2.5D demo 1demo 2

16 16 / 16 Future work Goal: a generic path planning framework for games and simulations

17 Thank you Contact Roland Geraerts R.J.Geraerts@uu.nl http://www.staff.science.uu.nl/~gerae101 17 / 16


Download ppt "A Navigation Mesh for Dynamic Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts CASA 2012."

Similar presentations


Ads by Google