Geographic Information Systems (GIS) are widely used in research for the visualization and spatial analysis of historical data. Their power lies in the fact that they are able to combine and visualize diverse datasets containing geographical information. Archaeological research questions, for example, can be investigated by combining landscape models with historical data and applying Least Cost Path (LCP) analysis to reconstruct historical routes and identify potential corridors for unknown routes (Citter 2012; Doneus 2013; Herzog & Posluschny 2012; Van Lanen et al. 2015; Verhagen 2013).
The use of gaming engines in archaeology is not new (Anderson et al. 2010). In the gaming world pathfinding is often used and discussed (Buro 2004; Hagelbäck & Johansson 2008; Matthews 2002; Orkin 2002 & 2004; Stout 2000) However, gaming engines for investigation of movement in the past are very little applied (Anderson et al. 2010; Ch’ng 2007). Moreover, comparisons based on pathfinding (route modeling) between gaming engines and GIS were not found. Nevertheless, gaming engines are interesting from the perspective of movement research.
The term “believable” in games is often used in the context of movement (Anderson et al. 2010; Ch’ng 2009; Jurney 2008; Nareyek 2004; Olsson 2008). For example, it is not considered believable for humans to walk through walls nor across water. Therefore, the movement of an agent should be constrained by believable physical barriers such as a wall or body of water. Believable movement in games has similarities with realistic movement within GIS where constraints can be modelled and thus, behavior approaches, rational decision-making or artificial intelligence. In this sense, the scientific spatial analysis of movement within GIS and the movement of agents in a game environment share a common interest.
Game engine features are currently advancing within a growing market. It is interesting, therefore, to consider whether results from a game engine are comparable to commonly used GIS calculations. For the purpose of this paper, the game engine Unity is used. Its capabilities include: excellent rendering, ease of use, multi-player options and expandability through custom scripting. Unity also boasts a large support community for development (Ch’ng 2007).
The full range of Unity’s capabilities is not explored here as the specific purpose of this analysis is to investigate the potential in historical road and path research. Within this scope, a comparison will be made between the LCP results in ArcGIS and Unity. Datasets derived from previous research into historical routes of the Leitha Hills in Austria (Doneus & Briese 2011) are used for this comparison.
The Leitha Hills are forested, middle-range mountains lying about 40 km southeast from Vienna covering an area of c.25 km2 (Figure 1). Many roads and paths are present here, which may date from prehistoric times. Certain routes are dated to the Middle Ages and make the area interesting for investigation. The availability of high-resolution relief data for the area further enhances the suitability of the Leitha Hills for historical route research (Table 1). This dataset will be discussed in detail below.
|ALS project||Leitha Hills|
|Purpose of scan||Archaeology|
|Time of Data Acquisition||March-12th of April 2007|
|Point distribution (pt. per sq.m)||7|
|Scanner Type||Riegle LMS-Q680i Full-Waveform|
|Scan Angle (whole FOV)||45°|
|Flying Height above Ground||600 m|
|Speed of Aircraft (TAS)||36 m/s|
|Laser Pulse Rate||100 000 Hz|
|Scan Rate||66 000 Hz|
|Filtering||Robust interpolation (SCOP++)|
A comparison between GIS (ArcGIS software) and a game engine is the central theme of this paper.
A game engine is a platform where computer games are developed with integrated tools or alternatively, by writing additional computer scripts.
LCP modelling provided the analytical basis for the comparison between ArcGIS and Unity. LCP analysis calculates a path between two points, which represents the lowest cost in movement (Howey, 2011). The corresponding cost function should be built on variety of factors which influence travel, like personal preference, administrative borders, religious incentives, social customs, existing sites and terrain circumstances. However, quantifying all these factors is often complicated. Indeed, terrain circumstances are probably the easiest to incorporate. Slope factor in particular is almost always used as it is easily applied and has often been the sole factor in LCP calculations (Herzog & Posluschny, 2011). However, the use of slope as a sole input is criticized for making the models too dependent on topography (Wheatly & Gillings, 2002). Nevertheless, they are two good reasons to start only with slope. First, it is difficult to incorporate other factors, especially if they have to function equally in both GIS and a gaming engine. Second, it is good modelling practice to begin with a simple model. Once the model works, other factors can be added. The Dijkstra algorithm is used in both applications for the LCP analysis (Anderson et al. 2010; Herzog 2014; Nareyek 2004). This is important as research has proven that different algorithms can deliver different results in LCP modelling, even with the same datasets and parameters (Gietl et al. 2007; Herzog 2013). The Dijkstra algorithm calculates the lowest cost on the basis of a cost surface and the backwards calculation of the lowest cost from destination to end points (Herzog 2014). A cost surface represents cost values based on the cost function of all the pixels in a digital terrain model (DTM) (Crutchley 2010; Opitz & Cowley 2012).
The relief or digital terrain model (DTM) for the analysis is derived from an Airborne Laser Scan (ALS) dataset of the study area. The most important parameters of the collection of the ALS data are listed the table below.
Both Unity and ArcGIS make use of the same DTM to calculate the LCP. In ArcGIS, the import of the DTM is straightforward. In Unity extra steps are necessary to import the DTM in a format that allows LCP modelling.
The initial step in ArcGIS involves amalgamating all the terrain tiles into a continuous surface. The model is then rotated as the Unity grid has an origin point in the top left corner, whereas the grid origin point of the ArcGIS data is the bottom left corner. The next step is to convert the tiff format file into a raw format file necessary for terrains in Unity, by using a simple line command in GDAL. The latter is software which enhances raster data. By the same command, the original tiff file is rescaled and changed into the 16-bit type necessary to complete the import preparation of the DTM into Unity.
A shape file of roads and paths extracted from previous research (Vletter 2014) can also be imported. It is crucial that the roads and paths align with the terrain very closely to enhance the analytical purposes. The complexity lies in the fact that a shape file is 2D and the terrain model in Unity is 3D. This means that the shape file should be draped over the terrain model. This problem is resolved by converting shape file into raster format.
However, importing the complete DTM and the whole extracted route network in one step results in a loss of detail. This issue is caused by the maximum pixel size allowed for images in Unity. At the moment of writing, the limit is 4096 × 4096 pixels. It renders the DTM with little detail and extracted roads blurry when zoomed in. It was decided therefore, to repeat the steps for a smaller tile of 1 km2.
As can been seen in Figure 2 below, the roads and paths align fairly well with the height model and are sufficiently visible. This means that to maintain high resolution during import, the original DTM must be split up in smaller tiles; similar applies to the import of the extracted routes files.
In order to reconstruct the historical road and path networks in a gaming engine like Unity, the following minimum components are needed: physical landscape, roads and paths, aspects of time, vegetation and players (agents) in the landscape. The topography and extracted roads are already mentioned above, while the possibilities for incorporating the influence of surface, time, vegetation and players (agents) are discussed below.
The cost of movement varies for different terrains and terrain covers (Herzog 2013). Additionally, the surface itself influences the energy cost (Caspersen et al. 1985; Soule & Goldman, 1972). These varieties in energy cost can be reflected in Unity by using different layers, whereby each layer represents a certain soil and its relative cost (factor) in comparison with other soils. This determines the speed for the movement of an agent and enables comparison.
No trees were implemented in the model for two main reasons. First, there is insufficient information about the historical development of vegetation of the Leitha area to recreate it in Unity. Second, the transport mode chosen influences the level of obstructions such as trees. For example, trees do not seem to be real obstacles for pack animals nor humans following small paths, as can they easily go around them. Navigation of a wooded area though, is more complex for wheeled transport, especially a horse-drawn wagon. Consequently, the influence of vegetation was set aside as the predominant mode of transport is uncertain.
The use and the conditions of road and path networks can change over time. Time plays a role for roads and paths on two levels. First, there is ‘seasonal time’, in other words the influence of the seasons on the use of the roads and paths. Second, there are periods of time, thus speaking of periods covering decades, or even centuries. Over longer periods of time, road networks can disappear and be replaced by others due to political, economic or natural reasons. The dynamics of roads is often underestimated (Fovet & Zaksek 2014).
In order to visualize the road and path networks from separate periods, a ‘slider’ function can be applied in both Unity and GIS (Figure 3). By moving the slider to a given period, an imported shape file of roads and paths pertaining to that same period can be visualized. This function allows development of route networks to be analyzed the chronologically. The periods linked to the slider depend on the available data. For more recent periods, historical maps are primary source material. For earlier periods, topography and interpretation of the known archaeological record are most important. The result though makes the earlier reconstructed networks less reliable.
The final components for the analysis are the players or agents. In order to reconstruct/model them, some knowledge of how and when people went into the hills is necessary. Historically, the Leitha Hills have attracted human activity for many reasons, including economic (quarry, forestry, viticulture and stock breeding), religious and travel (Krizsanits & Horvath 2012). We can translate these motives into possible characters or transport modes.
For forestry, it is probable that a two-wheeled cart was used. Such a cart is considered most suitable for transportation in the forest because of flexibility of movement compared to a four-wheeled wagon. Medieval paintings with two-wheeled carts from other middle-mountain areas in Europe support this theory (Tarr 1978).
Pack animals such as mules or horses are an even more flexible transportation mode than the two-wheeled cart. Cows, also good climbers, were traditionally pastured on the Leitha Hills. Pasturing was part of a cattle trading route stretching from the Hungarian plane to Vienna (Krizsanits & Horvath, 2012). We have also people who went on foot up into the Leitha Hills for a multitude of reasons; religion, smuggling, travel, hunting, or for leisure. Finally, although the horse-drawn four-wheeled car was a transport mode which was intentionally not taken in consideration here, historical photographs from around 1900 demonstrate that it was used for quarrying. However, the quarries of the 19th and 20th century were mostly located on edge of the Leitha Hills area and linked with good roads to major centres, such as Vienna. Two-wheeled carts were most probably used for quarries located deeper in the forest.
The primary concern of this study is to investigate is the analytical potential of Unity. In this section, LCP analysis utilizing integrated tools within Unity as well as LCP analysis based on the scripting will be tested and compared to similar results produced within ArcGIS. However, before proceeding, it is necessary to test first the validity of LCP analysis for roads and paths in the Leitha Hills.
The validity for LCP modelling was tested in ArcGIS. In other words, how well do the results of LCP modelling approximate known historical roads and paths? Previously, LCP and variations of this technique have been tested for the Leitha Hills using ArcGIS 9.3 and a 10 m raster DTM (Doneus 2013). The most important outcome of that study was how a combination of ‘openness’ analysis and slope analysis delivered excellent results within the Leitha Hills area.
Ideally, for the purpose of the present study, openness analysis should also be applied within Unity. However, a problem was caused by the known smoothing of the terrain in Unity. This smoothing would influence the outcome of an openness analysis and thus reduce the objectivity of the comparison with ArcGIS. Therefore, it was decided to investigate with only one variable in the first instance: the influence of the terrain within Unity and ArcGIS. The validity was checked by a LCP model based on slope raster calculation in ArcGIS 10.3.
For consistency to the above mentioned case study, a 10m raster was used. However, this resulted in unrealistic routes including enormous detours over virtually flat areas and unnecessary crossings of streams. After some trial and error, a 0.5 m raster delivered the best results and was used in all subsequent calculations. In order to make the analysis more realistic and provide a possible time depth, a path was modelled between two caves, both of which had known long use in the past.
The results were encouraging. About 87% of the path lined up with, or was parallel (within a 50 m range) to, documented roads and paths (Figure 5). The reverse exercise had the same result. However, close examination of the outcome resulted in two observations. First, examination of the topography showed that the calculated path to be logical and almost the only feasible solution. Second, the path partly follows modern roads, which caused some suspicion.
Subsequently, a second test was done in another part of the Leitha Hills between caves of which the historical usage is unknown (Figure 6). The results of the LCP modelling were also encouraging. About 78% of the modeled route lines up with, or are parallel (within 50 m) to roads and paths visible on the ALS data. For this reason, it was assumed that LCP modelling based solely on slope was a sufficiently valid tool for determining roads and paths in the Leitha Hills.
For comparison to the analysis within Unity, a smaller area (tile) of one square kilometer was considered due to the limitations of the maximum image size resolution of the game engine. In ArcGIS, three points were created and the least cost path between these three points was calculated (Figure 7). The same exercise was done within Unity.
Movement within Unity is based essentially on the ‘navigation’ tool. This tool is set up to let an agent move around in a game environment. The standard parameters set for this tool were worthy of further investigation.
Slope or inclination is an important parameter. Overcoming the slope gradient was of importance for all the transportation modes. For modes of wheeled transport, this was especially true. According to other studies, between 8% and 12% was the maximum inclination range a cart or wagon could overcome (Herzog & Posluschny 2011). The load, of course, played a contributing factor. It is important to insert a slope threshold when navigating within Unity; the navigation tool permits the setting of a maximum slope which can be traversed.
The width of roads is another parameter, which is also of importance for wheeled vehicles. Establishing a suitable road/path width though, is difficult as there was not only a huge variation in the size of cars and carts over time, but also within a certain time periods (Denecke 1969). This variation and uncertainty surrounding cart widths makes setting a limiting factor (i.e. the narrowest path one can pass through) difficult. Moreover, setting a radius similar to that of a probable cart width, limited the processing capability of Unity and the parameter was unused.
As mentioned above, different relative costs can be set by creating different layers which can be applied (Figure 4). Once all the parameters have been set, a Navigation Mesh (NavMesh) that shows the areas where the agent can move can be generated. Unfortunately, the outcome of the NavMesh baking did not produce the desired outcome. (See Figure 9).
From Figure 8, it is clear that artificial terraces are created using NavMesh. These processing artefacts hinder the pathfinding within the navigation tool as they form unnatural obstacles. Adjusting the analysis parameters to make the terrain flatter risked creating an equally unrealistic landscape. This limitation is possibly the result of a too-low resolution of the DTM or alternatively, the unsuitability of the navigation tool. Both possibilities may be related to the maximum image size resolution (2048 × 2048) allowed within Unity. Unfortunately, this issue remains unresolved at the time of writing.
Besides the navigation tool, scripting provides another possibility to move around a gaming environment using languages like Java (adapted for Unity), C# and Booh. Indeed, the power of a game engine like Unity is that user can create a lot of features by scripting. For this research, a script has been used that comes from the A* Pathfinding Project of Aron Granberg (Granberg 2018), a free-to-use script written in C# for Unity. One interesting feature of this tool is that multi-agents can be created. A* can also be combined with the standard navigation tool of NavMesh, described earlier. However, the grid option was chosen for modelling movement as the NavMesh did not function well and made computation too heavy. This means that the agent walks over a grid. Parameters are set within A* pathfinding script and defines where the agent actually can go.
Several tests were carried out in order to find ‘realistic’ settings, meaning movement parameters which approximate human movement. The lowest climb (vertical) height was 30cm and the inclination was 20% to allow the agent reach its destination. Below these thresholds, the agent either does not reach its destination or an error message related to processing capacity is triggered. To summarize, these settings come close to realistic movement for a human being or a draught animal. For movement of cart and wagons the 20% inclination is probably too high.
In the following steps, routes were computed between the same three points used above in ArcGIS. The comparison demonstrated that in general, Unity delivers comparable results to ArcGIS. Both applications avoid the main obstacles in a similar way. However, the results between the two don’t align, with the Unity results seeming unrealistically too straight. The fact their results diverge doesn’t constitute a real problem as different software packages can result in different results using the same data and parameters for creating a least cost path model (Gietl et al. 2008). Their sensitivity to minor obstacles, meaning micro relief differences, is a major point of difference between the two applications. The outcome in ArcGIS seems to be too sensitive to these obstacles as a relatively high number of small turns are made over short distances, which does not appear realistic. Unity, on the other hand, shows a ‘lack’ of sensitivity, choosing a very straight path which ignores minor obstacles. This is probably due to the smoothing in Unity, which is also visible in Figure 9. It means that for analysis in ArcGIS, a lower resolution on a small scale or, alternatively, changing the analysis parameters, would possibly work better. However, worse results in ArcGIS were obtained when a lower resolution was used in the path modelling for larger areas (see section 5.1). In Unity, a higher sensitivity must be created either through a higher resolution or by changing the settings of DTM.
There are clearly disadvantages in the use a game engine. The principal one is that computational power is needed (Nareyek 2004). Increasing the processing complexity leads to a rise of computational power. Insufficient processing power will slow down the game or even make the game crash. The level of detail of large areas (such as a study area DTM) is also limited due to the large computational power needed. Further scripting skills are needed to bring the analytical strength of gaming engine to a higher level (Nareyek 2004). However, these issues can be resolved through the continued evolution of scripting languages as well as the development of computing power of PCs.
There are also several advantages in using a game engine. First, the landscape can be made more realistic, which enlarges the embodiment and perception of the land under investigation (Ch’ng 2007 & 2010). The movement of the player can be shown from the agent position, like a video, instead of the 2-D outcome of logarithm in GIS. Incorporating multi-players which can interact with one another is also possible. An experimental study could be carried out by ‘walking’ in the reconstructed landscape with a non-predefined agent (Ch’ng 2009). This also adheres to the embodiment of the landscape. Additionally, areas to be avoided can be created by making use of influence maps (Paanakker 2008), which could in turn simulate border areas (Casimir & Roa 1992).
Resolution issues are a possible limitation if large DTMs or extracted roads and paths are imported. Such issues can be solved by splitting up the DTM or the roads and paths file into smaller tiles and reassembled in Unity. The resolution of the 1 sq. km tile presented in this study produced good results, while the roads and paths texture lined up encouragingly well with the height model. A slider function created a temporal-spatial model by visualizing the road and path networks through different periods.
The use of the navigation tool of Unity was, instead, disappointing. The NavMesh baking did not result in walk-able areas which could be used for analytical purpose. This may be due to either a resolution issue or to a limited capacity of the navigation tool. This issue has yet to be resolved before spatial modelling can take place with this tool.
In comparison, the script of the A* pathfinding project worked well on the imported DTM. The comparison of results to the GIS analysis results showed that Unity delivers similar results, despite not aligning exactly. This outcome, together with the advantages of the fast developing gaming world, make that the application of game engines for route modelling look promising and hopefully future research will live up to these expectations.
I would like to thank Eamonn Baldwin of University of Birmingham, Eugene Ch’ng of the University of Nottingham Ningbo in China and James Wesolowski of the University of Arkansas for putting me on the right track. Also special thanks go to Herman Veluwekamp, PhD researcher at the faculty of Philosophy at the University of Groningen, for his help with GDAL software.
The author has no competing interests to declare.
Anderson, EF, McLoughlin, L, Liarokapis, F, Peters, Petridis, P and de Freitas, S. 2010. Developing serious games for cultural heritage: A state-of-the-art review. Virtual Reality, 14: 255–275. DOI: https://doi.org/10.1007/s10055-010-0177-3
Caspersen, CJ, Powell, KE and Christenson, GM. 1985. Physical activity, exercise, and physical fitness: Definitions and distinctions for health-related research. Public Health Reports, 100(2): 126–131.
Ch’ng, E. 2007. Using Games Engines for Archaeological Visualization: Recreating Lost Worlds. In: Mehdi, Q, Estraillier, P and Eboueya, M (eds.), AI, Animation, Mobile, Educational and Serious Games. Proceedings of the 11th International Conference on Computer Games, 26–30. Wolverhampton: The university of Wolverhampton School of Computing and information technology.
Ch’ng, E. 2009. Experiential archaeology: Is virtual time travel possible? Journal of Cultural Heritage, 10: 458–470. DOI: https://doi.org/10.1016/j.culher.2009.02.001
Citter, C. 2012. Modelli predittivi e archeologia postclassica: Vecchi strumenti e nuove prospettive. In: Redi, F and Forgione, A (eds.), Atti del VI convegno nazionale della SAMI, L’Aquila, 2012, 3–6. Modelli predittivi e archeologia postclassica: Vecchi strumenti e nuove prospettive, 12–15. Firenze: Edizioni All’Insegna del Giglio.
Denecke, D. 1969. Methodische Untersuchungen zur historisch-geographischen Wegeforschung im Raum zwischen Solling und Harz. Ein Beitr. zur Rekonstruktion d. mittelalterl. Kulturlandschaft. Göttingen: Goltze.
Doneus, M. 2013. Die hinterlassene Landschaft Prospektion und Interpretation. Die Landschaftsarchäologie in Mitteilungen der Prähistorischen Kommission, 78. Vienna: OAW. DOI: https://doi.org/10.2307/j.ctt1vw0qcb
Doneus, M and Briese, C. 2011. Airborne Laser Scanning in Forested Areas – Potential and Limitations of an Archaeological Prospection Technique. In: Cowley, D (ed.), Remote Sensing for Archaeological Heritage Management. Proceedings EAC, 53–76. Budapest: Archaeolingua.
Fovet, E and Zaksek, K. 2014. Path network modelling and network of aggregated settlements: A case study in Languedoc (Southeastern France). In: Polla, S and Verhagen, Ph (eds.), Computational approaches to the study of movement in archaeology. Theory, practice and interpretation of factors and effects of long term landscape formation and transformation, 43–72. Berlin: de Gruyter.
Gietl, R, Doneus, M and Fera, M. 2008. Cost Distance Analysis in an Alpine Environment: Comparison of Different Cost Surface Modules. In: Posluschny, A, Lambers, K and Herzog, I (eds.), Layers of Perception. Proceedings of the 35th International Conference on Computer Applications and Quantitative Methods in Archaeology Berlin, Germany, April 2–6, 2007 (Kolloquien zur Vor- und Frühgeschichte), 10: 336–341. Bonn: Dr Rudolf Habelt GmbH.
Granberg, A. 2018. A*Pathfinding Project. Available at: https://arongranberg.com/astar/ [Last accessed 31 December 2018].
Hagelbäck, J and Johansson, SJ. 2008. The rise of potential fields in real time strategy bots. In: Darken, C and Mateas, M (eds.), AIIDE 08: The Fourth Artificial Intelligence and Interactive Digital Entertainment Conference, 42–47. Menlo Park: The AAAI Pres.
Herzog, I. 2013. Theory and practice of cost functions. In: Contreras, MF and Melero, FJ (eds.), Fusion of culture. Proceedings of the 38th Annual Conference on Computer Applications and Quantitative Methods in Archaeology, Granada, Spain, April 2010, 375–382. Oxford: Archaeopress.
Herzog, I. 2014. Least-cost Paths. Some Methodological Issues. Internet Archaeology, 36. [Last accessed 28 May 2014]. DOI: https://doi.org/10.11141/ia.36.5
Herzog, I and Posluschny, A. 2011. Tilt – Slope-Dependent Least Cost Path Calculations Revisited. In: Jerem, EE, Redő, F and Szeverényi, V (eds.), On the Road to Reconstructing the Past. Computer Applications and Quantitative Methods in Archaeology (CAA). Proceedings of the 36th International Conference. Budapest, April 2–6, 2008, 212–218. Budapest: Archeaeolingua.
Howey, MCL. 2011. Multiple pathways across past landscapes: Circuit theory as a complementary geospatial method to least cost path for modeling past movement. Journal of Archaeological Science, 38: 2523–2535. DOI: https://doi.org/10.1016/j.jas.2011.03.024
Nareyek, A. 2004. Smarter games are making for a better user experience. What does the future hold? Ai in computer games. ACM Queue, 1(10): 58–65. DOI: https://doi.org/10.1145/971564.971593
Soule, RG and Goldman, S. 1972. Terrain Coefficients for Energy Cost Reduction. Journal of Applied Physiology, 32(5): 706–708. DOI: https://doi.org/10.1152/jappl.1918.104.22.1686
Van Lanen, RJ, Kosian, MC, Groenewoudt, BJ and Jansma, E. 2015. Finding a way: Modeling Landscape Prerequisites for Roman and Early-Medieval Routes in the Netherlands. Geoarchaeology: An international Journal, 30: 200–222. DOI: https://doi.org/10.1002/gea.21510
Verhagen, JWHP. 2013 On the Road to Nowhere? Least Cost Paths, Accessibility and the Predictive Modelling Perspective. In: Contreras, F, Farjas, M and Melero, FJ (eds.), Fusion of culture. Proceedings of the 38th Annual Conference on Computer Applications and Quantitative Methods in Archaeology, Granada, Spain, April 2010 (BAR International Series 2494), 383–390. Oxford: Archaeopress.
Vletter, WF. 2014. (Semi) automatic extraction from Airborne Laser Scan data of roads and paths in forested areas. In: Hadjimitsis, DG, et al. (eds.), Proceedings of the Second International Conference on Remote Sensing and Geoinformation of the Environment, SPIE 9229, 11. Bellingham: SPIE. DOI: https://doi.org/10.1117/12.2069709