10 Sca Tripath
10 Sca Tripath
Abstract
This paper addresses the problem of efficiently computing optimal paths of arbitrary clearance from a polygonal
representation of a given virtual environment. Key to the proposed method is a new type of triangulated navigation
mesh, called a Local Clearance Triangulation, which enables the efficient and correct determination if a disc of
arbitrary size can pass through any narrow passages of the mesh. The proposed approach uniquely balances speed
of computation and optimality of paths by first computing high-quality locally shortest paths efficiently in optimal
time. Only in case global optimality is needed, an extended search will gradually improve the current path (if not
already the global optimal) until the globally shortest one is determined. The presented method represents the first
solution correctly extracting shortest paths of arbitrary clearance directly from a triangulated environment.
Categories and Subject Descriptors (according to ACM CCS): I.3.7 [Computer Graphics]: Three-Dimensional
Graphics and RealismAnimation
1. Introduction
The efficient computation of free paths in virtual environments remains a central problem in many areas of computer
animation, and in particular in applications related to computer games and crowd simulation systems [ST07, MH03].
Marcelo Kallmann / Shortest Paths with Arbitrary Clearance from Navigation Meshes
Marcelo Kallmann / Shortest Paths with Arbitrary Clearance from Navigation Meshes
Figure 2: The leftmost image shows the CDT of input obstacles. The next image shows the corresponding LCT triangulation,
obtained after 5 refinements. Based on the LCT representation, locally shortest paths of arbitrary clearance are efficiently
computed. The rightmost image shows the globally optimal solution of the central path.
Marcelo Kallmann / Shortest Paths with Arbitrary Clearance from Navigation Meshes
sector.pdf
sector is not margins:
crossed 2.15,
by a 4.55,
constraint
then cl(a, b, c) =
2.5, 5.4
min{dist(b, a), dist(b, c)}.
s
Note that disturbances can only occur for traversals leading to a corner transition from one side of the channel to the
other side (see Figure 4). Note also that the constraint of the
disturbancedisturbance.pdf
may be the edge ac of the traversal and that a
same traversal
may have
several
margins:
1.45,
3.9, disturbances.
2.45, 5.1
v u
Definition 2 (LCT) A LCT triangulation is a CDT triangulation with all traversals having local clearance.
v u
Figure 4: The shown traversal abc leads to a corner transition (from b to c) and therefore may have disturbances.
The dashed lines show the orthogonal projections of several
vertices on s. Vertex v is a disturbance since dist(v, v0 ) <
dist(b, b0 ) = cl(a, b, c) and dist(v, v0 ) < dist(v, c). Vertices d
and u cannot be disturbances since dist(d, d 0 ) > dist(b, b0 )
and u is shared by two collinear constraints.
With the definition of disturbances a local clearance triangulation (LCT ) can be now defined with the following definitions.
Definition 1 (Local Clearance) A traversal abc in T has
local clearance if it does not have disturbances.
refpoint.pdf
margins: 1.55, 3.85, 2.5, 1.3 Marcelo Kallmann / Shortest Paths with Arbitrary Clearance from Navigation Meshes
x1
pref
x2
pref
a
Figure 6: In this example, T0 = CDT (S) has three disturbances detected in the first iteration. The blue segments connect each disturbance to its respective refinement point for
clearing the traversal. In the following iteration, one disturbance is detected in T1 . The additional refinement leads to
T2 , which still shows one disturbance. Finally, after 3 iterations, T3 = LCT (S).
c
a
l1
l2
d
Marcelo Kallmann / Shortest Paths with Arbitrary Clearance from Navigation Meshes
t2
c
v
t1 b
Figure 10: The departure (or arrival) test detects all vertices between tangents t1 and t2 and checks if they represent
a disturbance.
Departure and arrival tests can be efficiently performed
on-line since they only depend on local tests. One useful
property is that these disturbances can only occur on one
side of an entrance at each time. Another special case which
has to be dealt with is when both points p and q of the query
lie in a same triangle t. In this situation a special capsule test
is required in order to verify if there is enough clearance between the two points for a direct path inside t. These tests
are similar to the entrance and arrival tests.
5. Channel Search
Once the LCT of the planar environment is available, a graph
search can be performed over the adjacency graph of the triangulation in order to obtain a channel Cr with enough clearance and connecting the two input points p and q.
The process first locates the triangle tinit containing p,
Marcelo Kallmann / Shortest Paths with Arbitrary Clearance from Navigation Meshes
Note that the channel is already represented as a triangulated simple polygon. This is important since it allows the direct application of the efficient funnel algorithm
[Cha82, LP84, HS94], which is able to determine the shortest path inside a triangulated simple polygon in linear time.
Although the funnel algorithm only addresses shortest paths
for points, the needed extensions for taking into account desired clearances are now presented.
Given clearance r, whenever path r has to make a turn
inside the channel it will follow a circle of radius r centered
at one vertex of the channel. Therefore the final obtained
path will be a sequence of straight segments and circle arcs.
Let cr (p) denote the circle centered at point p of radius r,
and let v1 and v2 be two vertices of the channel. Note that
a vertex will be either at the top or at the bottom boundary
of the channel and circles centered at the vertices will have
an interior and an exterior side. Finally, let r (v1 , v2 ) denote
the segment tangent to circles cr (v1 ) and cr (v2 ), such that
the segment is tangent to the interior sides of the circles.
Note that for each given pair of circles, r identifies only one
interior tangent (see the tangents in Figure 12 for examples).
If tangent r (p, v) is in respect to a point p which is not a
vertex of the triangulation, the tangent will start at p and
will be only tangent to the circle centered at vertex v.
Given initial and final points p and q, path r (p, q) will
therefore be composed by r tangents and circle arcs centered at the channel vertices. If v1 and v2 are vertices of the
channel, consider the sub-path r (v1 , v2 ) to be the shortest
path in the channel starting tangent to cr (v1 ) and ending tangent to cr (v2 ).
Marcelo Kallmann / Shortest Paths with Arbitrary Clearance from Navigation Meshes
b
c
w
v
Figure 12: The r-funnel algorithm. The red circles are centered at the top vertices of the funnel and the blue circles are
centered at the bottom vertices.
u
b
a
w
v
exp
Marcelo Kallmann / Shortest Paths with Arbitrary Clearance from Navigation Meshes
Marcelo Kallmann / Shortest Paths with Arbitrary Clearance from Navigation Meshes
environment
env1
env2
obst1k
obst5k
obst15k
obst30k
world map
n
171
313
1207
5550
14963
29198
63426
refinements
16
29
19
44
88
105
2198
LCT triangles
333
687
2455
11191
30105
58609
131247
tlocal (ms)
0.09
0.11
0.19
0.49
1.49
2.28
3.11
tglobal (ms)
0.22
0.29
1.48
13.51
62.88
206.99
401.92
lenlocal
8.75
55.8
159.6
156.4
164.5
168.1
212.0
lenglobal
8.74
55.7
159.4
156.1
164.0
167.6
210.1
Table 1: Environment env1 is shown in Figure 14, env2 is shown in Figure 1, and the world map environment is shown in the
accompanying video. The remaining environments are like the one shown in Figure 15 but with varying number of obstacles. The
numbers represent averages over 100 paths randomly computed. Times tlocal and tglobal are the average times in milliseconds
for computing locally and globally optimal paths. Their average lengths are shown in the two rightmost columns.
[HCK 00] H OFF III K. E., C ULVER T., K EYSER J., L IN M.,
M ANOCHA D.: Fast computation of generalized voronoi diagrams using graphics hardware. In Proceedings of the sixteenth
annual symposium on computational geometry (2000). 2
[NT95] N OSER H., T HALMANN D.: Synthetic vision and audition for digital actors. In Proc. of Eurographics (1995). 2
[OW88] OVERMARS M. H., W ELZL E.: New methods for computing visibility graphs. In SCG 88: Proceedings of the fourth
annual symposium on Computational geometry (1988), ACM,
pp. 164171. 2
[Rey99] R EYNOLDS C.: Steering behaviors for autonomous characters. In GDC99: Game Developers Conference (1999). 1, 2
[SAC 08] S UD A., A NDERSEN E., C URTIS S., L IN M. C.,
M ANOCHA D.: Real-time path planning in dynamic virtual environments using multiagent navigation graphs. IEEE Transactions
on Visualization and Computer Graphics 14 (2008), 526538. 2
[SR94] S TORER J. A., R EIF J. H.: Shortest paths in the plane
with polygonal obstacles. J. ACM 41, 5 (1994), 9821012. 2
[ST07] S HAO W., T ERZOPOULOS D.: Autonomous pedestrians.
Graphical Models 69, 5-6 (2007), 246274. 1, 2
Errata: In an attempt to simplify the text, it is mentioned that the proposed locally
shortest paths are computed in optimal time. This statement is however not accurate sometimes as it does not distinguish the precomputation time from the query time. For instance
the channel search procedure (Section 5) can be easilly modified to run in O(n) time using
available linear time planar graph search techniques.