Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA ....

21
JOHANNES MOERSCH & HOWARD HAMILTON UNIVERSITY OF REGINA Hybrid Vector Field Pathfinding

Transcript of Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA ....

Page 1: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

J O H A N N E S M O E R S C H & H O W A R D H A M I L T O N

U N I V E R S I T Y O F R E G I N A

Hybrid Vector Field Pathfinding

Page 2: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

The Problem

Page 3: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

The Method

A* for Long-Range Pathfinding

Crowd Continuum for Medium-Range Pathfinding

Page 4: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Waypoint Graph

A way of planning routes for characters that is not used much any more

Page 5: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

NavMesh

Short for Navigational Mesh

Page 6: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Constructing NavMesh

A navmesh can be constructed by starting with one polygon (typically a rectangle) representing the overall area. This is the initial open area.

Add the obstacles, each modeled by a polygon, one by one.

When an obstacle is added it is either completely inside the open area or overlaps part of it (otherwise it wouldn’t be an obstacle!).

Split the open area into more polygons by drawing a line segment “out” from the obstacle all the way across the open area (example follows)

Page 7: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Constructing NavMesh

Suppose a white obstacle is placed overlapping the blue open area. Draw lines outward to form new polygons. Remove area covered by obstacle.

Page 8: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Constructing NavMesh

Four cases for consecutive vertices of the obstacle polygon were identified, as shown below.

Page 9: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Traversing NavMesh

To measure the lengths of a path through a navmesh, go from the center of one connecting side to the center of the other connecting side.

Page 10: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Density Map

Page 11: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Velocity Map

Legend for Directions

+x −x

−y

+y

Page 12: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Speed Map

Page 13: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Cost Map

Page 14: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Potential Field

Page 15: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Fast Marching Method

Page 16: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Vector Field

Legend for Directions

+x −x

−y

+y

Page 17: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Lane Formation Results

Page 18: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Congestion Avoidance Results

Page 19: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Maze Results

Page 20: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

Performance Results

64x64 128x128 192x192 256x256

4 ms 18 ms 37 ms 65 ms

Page 21: Combinational Vector Field Pathfindinganima/408/Notes/Crowds/VectorField.pdfUNIVERSITY OF REGINA . Hybrid Vector Field Pathfinding . ... polygon were identified, as shown below. Traversing

References

Cui, Xiao. “A*-based Pathfinding in Modern Computer Games” IJCSNS January 2011. <http://paper.ijcsns.org/07_book/201101/20110119.pdf> Gas Powered Games. “Supreme Commander 2 ‘Flowfield Pathfinding’ Trailer” Youtube 2010.

<http://www.youtube.com/watch?v=bovlsENv1g4> Shopf, Jeremy. “Crowd Simulation in Froblins” SIGGRAPH 2008.

<http://s08.idav.ucdavis.edu/shopf-crowd-simulation-in-froblins.pdf> Tozour, Paul. “Fixing Pathfinding Once and For All” ai-blog.net 2008. <http://www.ai-blog.net/archives/2008_07.html> Treuille, Adrien. “Continuum Crowds” SIGGRAPH 2006.

<http://grail.cs.washington.edu/projects/crowd-flows/continuum-crowds.pdf>