Unmanned Aerial Vehicles (UAVs) are used for many missions, including weather reconnaissance, search and rescue assisting operations over seas and mountains, aerial photographing and mapping, fire detection, and traffic control. Autonomous operation of UAVs requires the development of control systems that can work without human support for long time periods. The path planners, which generate collision-free and optimized paths, are needed to provide autonomous operation capabilities to the UAVs. The optimization of the flight trajectory is a multi-objective problem dealing with variable terrain features as well as dynamic environment conditions. This paper presents a simulation environment for offline path planning of unmanned aerial vehicles on three-dimensional terrains. Our path planner aims to identify the shortest path and/or flight envelope in a given line of sight by avoiding terrain collisions, traveling on a path that stays within the restricted minimum and maximum distances above the terrain, traveling far from the specified threat zones, and maneuvering with an angle greater than the minimum curvature radius. We present two meta-heuristics (genetic algorithms and hyper-heuristics) in order to construct the paths for UAV navigation and compare our results with a reference work given in the literature. A comparative study over a set of terrains with various characteristics validates the effectiveness of the proposed meta-heuristics, where the quality of a solution is measured with the total cost of a constructed path, including the penalties of all constraints.