Efficient Path Finding in 3D Games by Using Visibility Tests

가시성 검사를 이용한 3차원 게임에서의 효율적인 경로 탐색

  • 김형일 (동국대학교 컴퓨터공학과) ;
  • 정동민 (동국대학교 컴퓨터공학과) ;
  • 엄기현 (동국대학교 게임멀티미디어공학과) ;
  • 조형제 (동국대학교 멀티미디어학과) ;
  • 김준태 (동국대학교 컴퓨터공학과)
  • Published : 2006.11.30

Abstract

The navigation mesh represents a terrain as a set of triangles on which characters may move around. The navigation mesh cab be generated automatically, and it is more flexible in representing 3D surface. The number of triangles to represent a terrain may vary according to the structure of the terrain. As characters are moving around on a navigation mesh, the path planning can be performed more easily by projecting the 3D surfaces into 2D space. However, when the terrain is represented with an elaborated mesh of large number of triangles to achieve more realistic movements, the path finding can be very inefficient because there are too many states(triangles) to be searched. In this paper, we propose an efficient method of path finding in 3D games where the terrain is represented by navigation meshes. Our method uses the visibility tests. When the graph-based search is applied to elaborated polygonal meshes for detailed terrain representation, the path finding can be very inefficient because there are too many states(polygons) to be searched. In our method, we reduce the search space by using visibility tests so that the search can be fast even on the detailed terrain with large number of polygons. First we find the visible vertices of the obstacles, and define the heuristic function as the distance to the goal through those vertices. By doing that, the number of states that the graph-based search visits can be substantially reduced compared to the plane search with straight-line distance heuristic.

이동망(Navigation Mesh)은 캐릭터가 이동할 수 있는 다각형(삼각형) 집합으로 지형을 표현한다. 이동망은 자동화된 생성이 가능하며, 유연하게 3차원 공간을 표현할 수 있다. 지형 구조에 따라 삼각형 수를 달리함으로써 다양한 표현이 가능하며, 캐릭터는 3차원 상태 공간을 2차원 평면 공간으로 표현한 이동망으로만 이동하기 때문에 효율적인 이동과 경로 계획을 보장받을 수 있다. 그러나 현실적인 캐릭터의 이동을 위해 보다 많은 삼각형을 이용하여 지형을 표현함으로 경로 계획 수립 시 많은 상태 공간(다각형)을 검색하여 효율적인 탐색이 이루어지지 않는다. 본 논문에서는 이동망으로 표현된 3차원 게임에서에서의 효율적인 경로 탐색 방법을 위한 가시성 검사 시법을 제안한다. 정교한 다각형으로 이루어진 세밀한 지형에 그래프 기반 탐색을 적용하면 탐색할 공간이 많기 때문에 효율적인 탐색이 이루어지지 않는다. 그래서 본 논문에서는 정교하게 구성되어 있는 3차원 지형에서 효율적인 탐색이 이루어질 수 있도록 가시성 검사(visibility test)를 이용하여 탐색 공간을 줄이는 방법을 사용하였다. 장애물의 정점을 찾고 추정 함수(heuristic function)를 이동망을 지나가는 거리로 정의함으로서, 직선거리를 추정 함수로 정의한 그래프 기반 탐색 방법보다 탐색 영역을 현저하게 줄일 수 있었다.

Keywords