BEYOND HBIM: SERIOUS GAMES AND PROCEDURAL MODELLING FOR HERITAGE DISSEMINATION

In the study of built heritage, the potential offered by the BIM methodology finds effective application in the knowledge and dissemination process. Today, the HBIM methodology often develops from 3D scanning point clouds with the so-called Scan-to-BIM processes. The complexity that often characterizes the architectural elements of the historical heritage and the lack of information on construction details and geometries, constitute a critical factor that sometimes affects the effectiveness of the application of the BIM methodology. Procedural methods define an approach that can help us when it is necessary to use external modelling tools for the local modelling of complex elements. Algorithmic modelling potentially could significantly reduce the investment normally required in digital content modelling operations, also in terms of time consuming. Furthermore, in procedural modelling, the definition of the detail can be calibrated a priori according to the objectives of the workflow. The research addresses the difficult management of point clouds in workflows aimed at the realization of the so-called serious games, tools that have proved invaluable in educational and teaching processes, as well as in the dissemination and promotion of heritage. Involving a remarkable variety of digital instruments for representation, serious games define a research topic in which the different needs related to the representation of the complexity of the objects can be investigated. Aimed at defining an effective development process for serious games, the paper proposes an HBIM workflow for reconstruction of 3D environments of historic buildings starting from laser scanning surveying approach.


INTRODUCTION
Information and Communication Technologies (ICT) allow us to articulate the dissemination of the built heritage in various areas of research, allowing us to address different target users. HBIM is nowadays a proven methodology for managing all aspects of studies on built heritage, from survey to analysis, up to preservation and management. HBIM find its practical expression through Scan-to-BIM processes: starting from 3D point clouds is possible to extract profiles and geometrical data for the modelling processes. The data and information encompassed in the 3D point clouds, normally implemented in a BIM environment, can prove useful not only on the topic of the survey and conservation project but also in a communication process addressed to a wide audience of people (Pybus et al., 2019). The immense amount of data made available to us by 3D laser scanning systems often contrasts with the representation needs normally connected to digital content modelling operations. Scan-to-BIM workflows may have some limitations when dealing with complex shape artifacts (Andriasyan et al., 2020). This criticality, strictly connected to the use of standard modelling tools natives within BIM environments, today represents one of the research topics in the study of built heritage. To address these limitations, the algorithmic modelling approach offers a way that defines new insights for knowledge and heritage analysis. Establishing the level of detail necessary for the representation of complex architectural elements is one of the fundamental steps in developing and optimizing procedural methods. These levels of detail are strictly related to the work context and its specific purposes: defining the goals of the workflow become fundamental as well for effective and efficient modelling. An interesting area of research is related to the application of digital technologies to communicate and promote * Corresponding author cultural heritage, a theme highlighted even more in the COVID-19 crisis during which the cultural and educational sectors have been among the most affected. Serious games, designed for specific communication and didactical purposes, are increasingly being used with interesting outcomes and applications in cultural heritage (Mortara & Catalano, 2018), involving a vast variety of digital instruments for representation. Although its large attractiveness, there is still no widespread use of procedural methods in architectural knowledge processes. Among other things, procedural modelling certainly allows the creation of virtual environments often used in movies, games, and simulations (Smelik et al., 2014). Procedural methods lend themselves effectively to generate features of virtual worlds, making a considerable contribution, as in our case, to the processes of knowledge and communication of historical architecture. Potentially procedural modelling could significantly reduce the investment normally required in digital content modelling operations. The effectiveness of the procedural method is fully manifested when dealing with elements attributable to the same category, as typically occurs in architecture. Nonetheless, this potential often does not translate into a large increase in productivity and therefore does not generally represent a useful alternative to manual modelling processes. In the case of historical architecture, this limitation is largely due to the scarce flexibility of the provided models, especially in the case of complex architectural elements. In the absence of precompiled libraries, rather than resorting to procedural generative processes, professionals often choose to resort to manual modelling processes. The use of procedural modelling in the creation of virtual environments proves to be particularly useful in architecture in the simulations of existing environments for serious games in support of knowledge, educational and informative paths.

AN EDUCATIONAL APPROACH
Actually, play is an intrinsic component of human behaviour, which also belongs to other animal species. Huizinga wrote "Homo Ludens" in 1938 to examine the elements of play in society and its importance and implications for cultures. Even though games are a fundamental aspect of life, the discipline of Game Studies was institutionalized only in 1990, and since then the field as growth year by year, encompassing many other disciplines. The way in which people play has changed significantly in the last 40 years, especially with the advent of computer first, then consoles and internet. According to Raessens (2014), in this century we have witnessed at a "ludic turn" in our societies, referring in particular to Western culture. This specific "turn", whose core is playful experiences, has many faces and one of which is the "ludification of culture": "a strategic concept for understanding and making sense of current changes in contemporary culture" (Fuchs et al., 2014). The "ludification of culture" has many aspects and applications, one of which is Serious Games. There are several definitions of Serious Games (Crookall, 2010;Stone, 2008), but we have decided to adopt the Ritterfeld one (2009): "[…] we define serious games as any form of interactive computer-based game software for one or multiple players to be used on any platform and that has been developed with the intention to be more than entertainment". Specifically, we look at Serious Games for cultural heritage. There are a lot of examples of digital games made for this purpose, mostly realized by institutions to promote the territory, a historical population, or an artistic movement, but also by museums to promote the cultural heritage (Anderson et al., 2010;Liarokapis et al., 2017;Mortara et al., 2014;Paliokas & Sylaiou, 2016).

STATE OF THE ART
The Scan-to-BIM processes are now consolidated as a practical application of the HBIM methodology, thanks to the possibilities offered in terms of collection of information and their transposition into BIM objects (Badenko et al., 2019). However, these processes are not without problems, first of all the management of geometrically complex elements; in historical architecture, in fact, it is frequent to come across objects that are not natively present in BIM environments, due to their obsolescence in contemporary architecture. When these elements have relatively simple geometries, it is possible to recreate them by means of the local modelling tools normally present in BIM software (Fig. 1a); as their geometric complexity increases, however, these tools become insufficient or not very convenient from the point of view of the time required (Rocha et al., 2020). One of the most common solutions is therefore the recourse to modelling tools external to BIM (Fig. 1b), which however leads to a model difficult to modify if not through a re-execution of the generative process. In these cases, a type of approach that is attracting considerable interest is that of procedural modelling (Fig. 2). This modelling methodology is widely used in architectural production, thanks to the possibility of automating the regeneration of three-dimensional elements, through the definition of relatively complex rules (Tedeschi, 2014). In particular, the use of Visual Programming Languages (VPL) tools, has proven to be particularly effective in overcoming the limitations imposed by standard modelling tools when applied to complex historical elements that are not native to BIM, such as gothic vaulted systems (Argiolas et al., 2019). This is due to the close relationship that these elements have with the geometric rules at the base of their genesis; researchers such as Willis (Willis, 1842), in fact, have demonstrated how it is possible to trace the complete shape of the vault once the curvatures of the ribs have been identified, according to precise geometric proportional rules. Development environments such as Grasshopper for Rhinoceros or Dynamo for Revit, allow a digital rewriting of the rules proposed by the historical treatise, remaining, thanks to their integration with Revit, entirely in a BIM environment. The algorithms thus developed become generators of forms and at the same time containers of information, establishing a "constructive" hierarchy of elements; this information, working with the historical heritage, is particularly important for communication purposes, as for example in the use of technologies such as augmented reality (Spallone & Palma, 2020). In fact, there are many cases in which BIM models find expression in areas that are apparently distant from the initial ones, such as visualization through game engines (Milkova et al., 2019;Osello et al., 2018). One of the factors leading to the choice of game engines as visualisation tools is undoubtedly the possibility of implementing interaction mechanisms between the user and the model, which are difficult to achieve with BIM environments alone. It should also be considered the possibility that game engines offer to manage not only the final models of the scan-to-bim process, but also the clouds of points or meshes at the base of the process (Ferdani et al., 2020).

METHODOLOGY
The starting point of the proposed process, shown in figure 4, is the collection of information about the architecture to be analysed. The intermediary of the historical data are mostly the indirect sources of public and private archives, while the spatial The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLVI-4/W4-2021 16th 3D GeoInfo Conference 2021, 11-14 October 2021, New York City, USA information instead derives from the direct source of the architectural and urban survey. In particular, in the Scan-to-BIM processes, this information is collected through the digital reconstruction of the elements through the generation of point clouds. They constitute the final product of the laser scanning and photogrammetry methodologies, techniques that can be considered in certain terms as alternatives but which, due to their peculiarities, can be applied as complementary. While the definition obtained by the two methods is often comparable, laser scanning offers unquestionable accuracy and relatively short capture times. On the other hand, photogrammetry is a method that costs significantly less, especially since the cameras built into today's smartphones or lighter drones often produce satisfactory results. In addition, the superior versatility of photogrammetric instruments is undeniable, allowing points of view to be reached that are unattainable with laser scanners.
In the workflow developed, it was decided to use laser scanning for the survey of interiors or, when necessary, for exteriors where they can be reached (Fig. 3); photogrammetry is instead envisaged for the survey of elements of limited dimensions and whose geometry requires particular attention, or in cases where laser scanning cannot be used, such as in elevated areas that cannot be reached. The point clouds, in order to be used effectively, must be cleaned and segmented so that the elements can be distinguished. Once the clouds, or the relative meshes, have been treated, the next step is the extraction of the profiles useful for modelling; the type and number of profiles is established according to the type of modelling to be carried out and, consequently, the type of element to be modelled. The modelling hypotheses foreseen for the workflow are mainly four: mesh/point clouds, local modelling, classical BIM parametric modelling and algorithmic modelling. We chose a "sculptural" approach by using mesh surfaces or, in particular cases, point clouds themselves, for elements with particularly complex geometries, which do not have standardised characteristics (Fig.  5); furniture elements and sculptures are two of the types that fall into this category. The architectural elements commonly present natively in BIM environments, such as floors and ceilings, walls, or stairs, are modelled with the parametric modelling tools typical of BIM, using standard families. If, on the other hand, there is a need to model unique elements, which cannot be standardised, but do not have particularly complicated geometries, and therefore do not require the use of meshes, the modelling will be local; this means that the model will be created within the BIM environment without the generation of a parametric family. Finally, for architectural elements with complex geometries but based on precise geometric rules, in the proposed workflow, the modelling is performed by generative algorithms; these algorithms are developed transposing geometrical rules from architectural historical treaties into a coded sequence of commands (Bianconi et al., 2018). Geometrical rules are not related to the single element, but to the "ideal model" of the specific reference category. We can develop a single algorithm able to generate several complex elements of the same typology just changing input parameters, automatizing many of the modelling steps. Following the BIM methodology, the algorithm become the standard reusable element, when the 3D model cannot be it. The geometrical rules of treaties are re-elaborated to be conforms to computer aided modelling and to real elements features, to allow the generation of more and more objects. Once the models are generated, they can be used directly inside BIM projects, or they can be exported in several different formats. For the modelling of BIM objects, the software Autodesk Revit was chosen; regarding both the algorithmic modelling process and the models exporting, this can be achieved through Dynamo, a Visual Programming Environment inside Revit. Dynamo in fact, allow us to develop generative algorithm, import and elaborate input data, such as point clouds, and menage the export operations. For the design of the game scenes, it was decided to use the FBX format; the FBX files reserve the hierarchy of the objects fixed by the algorithm in the modelling process, it is a widely used format as it is compatible with a broad selection of software and the size of the files generated is relatively small. Before starting with the design and development, it is essential to identify the target age group for the game (Ratan & Ritterfeld, 2009); this factor determines future decisions in terms of game mechanics, difficulty and content to be implemented. Contrary to the general trend that sees as main users those belonging to the age group between 18 and 34 years ("U.S. average age of video gamers 2019,"), Serious Games are generally intended for users under 18 years old, as it is possible to see from the classification of such games ("Serious Game Classification,"); this is due to the nature of the games, mostly identifiable as "edutainment", so this age group needs special attention designing a Serious Game.    Between the various opportunities of game engines available , for the software development Unity was chosen. The choice is determined by its versatility and the availability of native or additional functions that are particularly useful for our purposes, such as the possibility of loading and rendering point clouds in a relatively simple way (Fig. 6). In particular, the management of point cloud is possible through the package PCX by Keijiro Takahashi. In this first phase of the research, aimed at exploring the possibilities of using BIM models not expressly developed for use in game modes, the ability of the FBX format to preserve the hierarchies set in the BIM environment, together with the geometric-dimensional information, is sufficient. However, this does not exclude that in the future, thanks to the visual programming in Dynamo and the scripting in C# of Unity, a further flow of data exchange will be implemented, for example by placing alongside the 3D model in FBX further information formatted according to a precise standard, such as XML (Silva et al., 2018).

CASE STUDY
It was decided to apply the workflow to the case study of the Church of Nostra Signora della Speranza, known as the Aymerich chapel (Fig. 7). The church is located in the Castello district, one of the historical districts of the city of Cagliari, near the Cathedral. The name 'Aymerich chapel' derives from its function as the noble chapel of the Marquis of Laconi, the Aymerichs. Despite it is not easy to date, there are written traces of the church as early as 1494, the year in which a benefice was established there (Garau, 2011). The main façade, characterised by a flat crowning, has an architraved portal surmounted by an ogival arch; the noble coat of arms of the Aymerich family is aligned with the portal. The interior of the church consists of a single-bay nave, flanked by three chapels. The roof of the nave is unusual, consisting of a ribbed cross vault on a square base, flanked by two ribbed half-vaults whose bosses are partially embedded in the masonry. Similar solutions can also be found in the nearby Church of Santa Lucia, covering one of the side chapels, and inside the Cathedral in the Sacrestia dei Beneficiati (Schirru, 2013). The first phase of the workflow is, as seen, the survey of the building. In this specific case, a laser scanning survey of the exterior of the front elevation and of the interior was carried out; the scans were performed with a Leica HDS7000 phase-based scanner. The survey required 9 scans for a total of 1.75 billion points. The point clouds obtained were structured using Cyclone software and then cleaned and segmented using CloudCompare software. Once the cloud preparation phase was completed, the profiles useful for modelling were identified, considering the type of element to be modelled; as already mentioned, the modelling technique is established according to the type and geometric complexity of the element. All the modelling operations were carried out within Autodesk's BIM Revit environment. Elements belonging to the standard native BIM typologies, such as walls, floors and ceilings, were modelled in the same way as the normal procedures used for these elements; the overall dimensions and thicknesses are often sufficient to generate these objects. Elements such as the entrance portal, a unique non-standard object, have been reproduced through local modelling, using basic tools such as extrusion, revolution or sweep (GOG 1-8) (Banfi, 2017); these operations are based on profiles extracted from point clouds, appropriately identified in order to allow a definition of the objects when as precise as possible. Sculptural elements and furniture, characterised by particularly complex geometries and whose local modelling would be too time-consuming and resourceintensive, have been isolated as portions of point clouds or meshes; if meshes are particularly effective for the solid representation of objects, in our specific case point clouds, which can be directly used in the game engine, offer interesting ways of visualising, for example, elements that one wishes to keep "ethereal" (Fig. 8). The vaulted roofs, all of which belong to the ribbed cross vaults typology, deserve a separate discussion. These represent a typical case of complex elements, not natively present in BIM environments, but based on precise geometric rules, widely analysed in historical treatises. The vaulted systems are currently the object of a study within the Department of Civil Engineering and Architecture of Cagliari, where the potential of algorithmic modelling on these elements is being analysed. It was therefore decided to apply the algorithms developed for the digital transposition of some geometric constructions extrapolated from the treatise to this case study, as a further validation of their effectiveness. Our Serious Game has the dual purpose of verifying the effectiveness of the models obtained in areas outside the classical BIM ones and to produce with them a tool for the communication of heritage. The algorithms receive as input the point clouds, the perimeter of each vault and the profiles of the ribs and generate as output the three-dimensional models of the vaults, according to a constitutive hierarchy. The models obtained are then exported for use within Unity, on which the development of the prototype is carried out.  Before proceeding with the development, the target age group was identified as youngsters in the 10-15 range; the players represent the category of players who could benefit most from the proposed experience. In fact, it was considered that, for users below this threshold, the themes could be too specific; on the other hand, older users already have interpretative skills such as to profitably use more traditional informative materials. Finally, as we have seen, as the age increases, we get closer to the range of wider use of games for entertainment purposes. Once the target age group have been identified, the general characteristics of the game have been defined: the gameplay is based on the exploration of the interior of the church only, represented by removing almost completely the furniture and simplifying some architectural elements; at the beginning, the player is offered only few objects to interact with. These interactions provide the player with a series of historical and cultural information about the church or its context, useful to solve the puzzles proposed ( Fig.   0 1 2m The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLVI-4/W4-2021 16th 3D GeoInfo Conference 2021, 11-14 October 2021, New York City, USA 10); the resolution of the puzzles involves the unlocking of a further object to interact with, with the relative puzzle. Both information given to the player and unlocking mechanic take advantage of the preserved hierarchy of architectural elements; the possibility to deconstruct complex shaped objects helps the communication of geometric and architectural principles. The still locked objects are showed through a low-density point cloud, in order to obtain an ethereal volume. According to various studies in the literature (Bellotti et al., 2012;Schell, 2019), four types of puzzles were identified: multiple-choice quizzes, reordering of elements according to various factors, classic jigsaws and puzzles with rotating tiles (Figg. 9-10). The multiplechoice quizzes present the player with a series of questions with a variable number of possible answers is provided, of which only one is correct; the number of questions for each puzzle and the number of possible answers increase as the game progresses. The reordering puzzle presents the player with a series of scattered elements that must be ordered according to a certain criterion: size, chronological order and so on. The last two types require the re-composition of an image decomposed into tiles, in one case by moving the tiles in the right position while in the second by rotating the tiles already positioned in the game table. In both cases the number of tiles involved increases as the game progresses, thus increasing the difficulty. The final phase, the actual development of the game, does not present relevant details with respect to the normal processes of game creation, except for the use in the game environment of the BIM models, exported in FBX format, and of the point clouds, in PLY format, previously analysed. Figure 8. Three types of visualisation: neutral sparse cloud and dense cloud for lock-unlock puzzles, mesh for solved puzzles.

CONCLUSION
Exploring the potential of BIM models used outside the canonical fields, we can find frequent examples where game engines are used for the visualization of BIM models, as for the creation of virtual tours or for the enrichment of the information displayed through virtual or augmented reality. Less frequent are the uses for the design of digital games. In particular Serious Games, designed to go beyond entertainment, can take advantage of BIM models for educational or training purposes; the high degree of simulation that BIM models aim for provides an optimal basis for training in fields such as maintenance or emergency interventions. Regarding cultural heritage, features of H-BIM models such as the hierarchy of architectural components, as well as the ability to collect and manage information, are particularly interesting for Serious Games. In the specific case of the proposed prototype, the hierarchy of the elements and the information associated to them become an important support to the game mechanics, offering the player wider notions than the simple visualization. In particular, the use of algorithmically generated models makes it possible to transpose these characteristics also to geometrically complex elements; the vaulted systems present in the Church of Nostra Signora della Speranza, modelled with algorithms designed for purposes different from the one proposed, lend themselves well to becoming part of the virtual environment. Remaining faithful to the principle of shareability of the models among several actors and for a wide range of uses, typical of the BIM methodology, the research shows how wide is the versatility of such models, even when used in fields apparently distant from the standard ones. Figure 9. Each puzzle provides historical information to be solved, in this case a multiple-choice quiz is shown. Figure 10. Some examples of the puzzles in the game.