An Educational Tool based on Virtual Construction Site Visit Game

To enhance the engagement of Civil Engineering students and encourage active learning, a virtual construction site investigation game is developed in the present paper. 3D construction site environment is built based on BIM models and relevant objects common on construction sites are created to enhance the realistic. Navigation and Interactions are developed to enable the students to explore the virtual sites freely and get instant feedbacks. Different modules, such as Questions and Tasks, are developed to exam how well the students master the domain-related knowledge. Unity, a cross-platform game engine, is used as the development platform for this research project. The architecture, mechanism and the implementation are described in detail in this paper. A pedagogical methodology for improving the quality of learning is thus developed by transforming traditional instructional delivery techniques into technology-based active learning. Students’ engagement in the learning process is improved by establishing a contextual connection between ordinary textbook materials and technologies that students use in their daily routines. This new approach enables students to interact, and learn abstract topics in engineering design and construction method. The effectiveness of this active learning method is investigated by the feedback from two groups of students using a questionnaire. The potential benefits of the proposed research are: enhanced understanding of complicated structures; better accessibility to more construction site virtually; more convenient and flexible time for learning practices; and safer site visit with this pre-training tool.


Introduction
In the Department of Civil Engineering in a university, field trips to construction sites are usually arranged every semester.The purpose is to enhance the students' learning of different construction methods, identifying different types of structures, and getting familiar with engineering tasks, etc.It is important to gain practical experiences rather than learning knowledge from the textbooks only.However, finding suitable and convenient construction sites is not easy.Moreover, proper time of visiting construction site is also an extra constraint in terms of availability of the site being visited, and the readiness of proper knowledge engaged to the students.Usually, field trips are organized by the lecturer at the time that related knowledge has been introduced in the class.However, finding a construction site doing the similar construction tasks are not always available.The task schedules and time availability for the students do not match all the time.Moreover, not all the structures are available in the area of the university.A long-distance traveling may be impossible due to all kinds of constraints.
On the other hand, the new generation of students is technology savvy with high knowledge of and interest in social media, mobile technologies, and strategy games (Friedrich et al., 2009).Pan et al. (2006) discussed that using virtual learning applications may result in an efficient and effective learning.It has been indicated by Shirazi and Behzadan (2013) that it is almost impossible to separate students from their technology-enables devices or ask them to think and act differently than how they do outside the classroom.Rather, a more reasonable approach is to find ways to create a seamless transition between the outside world and the classroom environment.
Building Information Modeling (BIM) is a new approach to design, construction, and facilities management in which a digital representation of the building process is used to facilitate the exchange and interoperability of information in a digital format (Eastman et al., 2011).Compared with the traditional CAD technology, BIM is capable of restoring both geometric and rich semantic information of building models, as well as their relationships, to support lifecycle data sharing.BIM has been used to enhance course design and improve student learning outcomes in traditional coursework.For instance, Cory et al. (2010) described the evolution of a construction graphics course facilitated by the use of BIM at Purdue University.Sacks and Barak (2010) restructured their engineering graphics course with principles and applications of BIM in recognition of the fact that three-dimensional (3D) models will be the principal medium for expression and communication of design intent in the civil engineering profession.Barham et al. (2011) evaluated the effectiveness of BIM in enhancing student learning in a structural concrete design course.Hyatt (2011) demonstrated the convergence of lean construction, sustainability, and BIM in an undergraduate construction management scheduling course.
The aim of the present research is to develop a 3D virtual construction environment investigation game, which will enhance learning and teaching in the department of Civil Engineering.The objectives are: (1) to build virtual construction sites by using available resources from previous and current construction site visits; (2) to design a learning and teaching mechanism by providing a visual environment for active learning; and (3) to investigate the feasibility of providing an alternative assessment method for civil engineering students.

Methodology
The framework of the research methodology is shown in Figure 1.A 3D virtual environment is built based on BIM model of a building integrated with domain-related knowledge.Navigation and Interaction are developed to enable the students to explore the virtual sites freely and get instant feedbacks.Different modules are developed, which includes Identification, Questions, and Tasks.Identification module focuses on identification of construction equipment, structure, construction materials, and construction methods and so on.For example, for a steel structure, to identify the main beams, secondary beams of a portal frame; where are the welding, bolts connections.By that way, the students connect abstract concept or description with reality and get visual impression.Question module provides a traditional way to check how much the student mastered the knowledge.Questions with different level of difficulty are designed by summarizing knowledge from textbooks and experiences from the construction site.Task module assigns different tasks to students to accomplish, for example, to remove safety hazard on site and identify what kind of prevention measures should be applied.
Figure 1.Framework of a virtual construction site game design

Geometrical Information Extracted from BIM Model
BIM models are now popularly used in the built environment industry; which provide accurate geometrical information for the whole building.The interoperability aspect of BIM enhances data exchanges between different software packages and application.For example, Revit from Autodesk© is capable to export building information in various format, such as .ifc,.fbx,and other formats that can be directly read by other software packages.In this research, a BIM model of a commercial building is used to provide the basic geometric information to create the construction site.An .fbxfile is exported from Revit and imported to Unity environment, as shown in Figure 2.However, information of materials, texture coordinates and stair cases are missing after the importing; therefore, they are manually added to complete the 3D environment.In addition, other objects common for a construction site are added to make the environment more realistic, as shown in later sections.

Game Engine Architecture
A game engine is a piece of software for creating video games on different operation platforms.The architecture of a game engine is complicated and comprises of a bunch of tools for advanced shading and shadows system, a skeletal animation system, a post processing system such as anti-aliasing and human computer interaction (HCI).
Simulations of a real world can thus range from a vivid character, realistic lighting effects to an attractive scene.
The main components of a general game engine architecture include a rendering engine, a physics engine and a core engine bounding two engines together and handling interactions between them.Rendering engine is responsible for visual effects with high reality degree and physics engine can further improve the simulation of the real world by applying physical formulas on the environment to provide realistic feedbacks for users' behavior.Details are discussed as follows and the general architecture is shown in Figure 3.A rendering engine is one of the largest subsystems in the architecture, which is responsible for drawing images on the display.There are many different design philosophies of implementing a rendering engine and one of them is based upon layer design philosophy.The lowest layer of a rendering engine is a graphics device interface.Generally two graphics application programming interfaces (API) are in use, DirectX 3D for windows and OpenGL for all platforms.Additionally, there should be optimization algorithms for scene culling since a camera cannot 'see' all the objects outside of its frustum.Furthermore, a rendering engine should support a wide range of visual effects including advanced lighting and environment mapping, shadows and post processing.
(2) Physics Engine A physics engine is responsible for detecting collisions applying physics on objects.Without it, two solid objects would intersect with each other and the simulation of the world becomes odd.Nowadays, many game companies deploy 3rd party's physics engines which can either be used as stand-alone software or be integrated into a game engine via APIs.One of those commonly in user free physics engine is PhysX, which is provided by NVIDIA.It is integrated into many commercial game engines such as Unreal Engine 3/4 and Unity 5. Unity5 is used in the present paper as a standard kit of game development according to the development cycle and basic requirements of this project.

3) Core Engine
A core engine provides a collection of utilities and is the main entry of a game.For example, a game supplies a set of 3D geometrical data to a core engine.The core engine first calculates its position via the physics engine and then employs the rendering engine to render it on screen within the game loop.Additionally, it is responsible for memory management to ensure high speed memory allocations and avoid memory fragmentation.Furthermore, a core engine shall offer at least one math library to implement linear and affine algebras as well as calculus.

Implementation Using Unity 5
Unity, a cross-platform game engine, is the main development platform for our research project.Unity 5, the newest version released on March 3, 2015, added a large amount of advanced real time global illumination techniques based upon Geometrics Enlighten technique (Martin, 2011).Additionally, it added the features of physically based shaders (Harris et al., 2002), audio mixer, High dynamic range (HDR) reflection probes (Waese, 2009) and Physx3.3.
(1) Mechanism The mechanism is divided into two parts, the Question module and the Task module.The main structure is shown in Figure 4.The question module provides chances to answer questions during exploration to test students' academic knowledge.Signs are set up for spots where questions will pop up upon the user getting close to them.When a question is triggered, an answering panel interface will be displayed in the center of the screen.Optional choices will be shown for the students to choose.Hints are available to help the students answer the questions.The function of the task module is similar to the question module, but is conducted in a more vivid way.Instead of choosing options from a list, the students are required to use tools or trigger some emergency to solve problem that they encountered.Two major types of tasks are designed as follows: Dominant task: If students can choose appropriate tools and put them in correct location, it means that the task has been accomplished successfully, otherwise, emergency may happen such as the avatar will fall down or getting an electric shot, and game is over.
Recessive task: In some case, the user needs to trigger some action by themselves, for example, moving construction materials on site to designated locations.
(2) Game Development The development of the game mainly focuses on scene construction and GUI design.For the scene construction, partially-constructed site is created.As explained in Subsection 3.1, a BIM model of the building is imported from Revit to Unity in the form of discrete vertices.After that, physics effects are added to the raw models constructed from those vertices to avoid walking through the walls.Then textures and materials are defined for objects in the scene such as brick, cement, etc. because those data are missing after the importing.Moreover, to improve the reality, shading system is built and the camera is scripted so that objects and shadows can appear differently from various viewpoints.In this research, a third-person viewpoint is set as default to avoid losing focus during exploration.Users can also switch between third-person and first-person viewpoints.The model of an avatar along with the animation matrices is chosen from the embedded asset store of Unity, and C# scripts is used to develop the action management in the scene.Screenshots of the site are illustrated in Figure 5. Occlusion Query is a query of how many pixels would have been drawn on the texture after the end of graphics pipeline, the alpha test, the stencil test and the depth test.The query of visible pixels is implemented in extensions in OpenGL ( 2015) and incorporated into DirectX 9.The process of basic occlusion culling is intuitive, as shown below: 1. Render the object with color buffer and depth buffer writing disabled 2. Render the game object's bounding box with depth test enabled 3. Make Occlusion Query for the rendered bounding box 4. If the number of visible pixels is smaller than a threshold, do not render the actual game object

Otherwise, Render it
To make occlusion culling as fast as possible, opaque game objects are sorted from front to back according to the distance to the camera.Those objects closer to the camera would be considered as occluders while other objects would be treated as occludees.The occluders shall not be accounted for occlusion culling processes.One of the possible ways to sort game objects is Binary Space Partitioning (BSP) tree (Schumacker et al., 1969).BSP tree is also used as a scene graph managing the virtual world in OGRE, an open-source 3D graphics engine.Additionally, back in the early days where Z-buffer algorithm is not cooperated into the graphics pipeline, BSP tree is also used to implement the painter's algorithm, where the farthest 3D object is rendered first and then the second farthest one and so on.The construction of a BSP tree is a representation about a recursive division of n-dimensional complicated objects into smaller convex ones.Once, upon the finishes of the construction of BSP tree, rendering engine would effectively draw objects onto our screen by querying BSP tree with the current position of the player.If the camera is in front a node's partitioning plane, the node's front plane would be visited recursively until it is a leaf node.Then, all the polygons coplanar with this dividing plane would be rendered and finally the back node would be visited recursively.This traversal is similar if the camera is behind the partitioning plane.It usually cooperates with scanline approach to eliminate the 3D objects that are not visible to the camera.

Graphic User Interface
A menu is designed for better interaction (Figure 6(a)).At the beginning of the game, the users have the options to start a new game, resume a previous game, or quit the game.In addition, an Option button provides the users to change the setting of the game, which includes game setting, sound setting and graphic setting.Game setting could be used to change the features of game.For example, users could change the display of hints.All the features that are directly related to the game play could be found in this game setting menu.Sound setting helps players to adjust the volume of the background music, the effect sound and other sounds.In addition, it is also used to turn on or off the background music and other sounds.The graphic setting is mainly used to change the graphics quality.If the player's computer does support running the game with high graphic quality or they decided to sacrifice the graphic quality for a smoother game experience, they can switch to mid-quality or low-quality modes.A brief introduction is also given at the beginning at a new game to explain how to play this game.) is placed on the lower-right corner of the screen.Upon clicking, a window of inventory will be displayed to show the tools that can help the users accomplishing the tasks.A mini map (Figure 6(C)) is designed to navigate the users to avoid losing in the virtual environment.A camera is created for the mini map, through which players can see the game world in a bird's eye view.Moreover, the camera for the mini map keeps tracking of the player in most circumstances.It is worth to be mentioned that the projection for the camera of mini map is orthogonal since the mini map is a simplified 2D image of the game world.Unity renders the scene into a texture which is going to be displayed on the mini map GUI.In addition, locations of questions are marked in the mini map.By clicking the icons shown in the mini map, the users could immediately be brought to the place where a question is set.

Questions and Task Design
According to the different construction sites, different types of questions are design in terms of building structures, construction methods, construction safety management, etc.For instance, in concrete construction, most questions are designed according to the concrete material and relevant structure.The number of options of a question is decided by the level of difficulty of the questions.Figure 7 shows the question answering scheme.In order to help the students gain more information, the hints about the solution are given for every question.If the user chooses to skip, the medal of the question will turn to gray which means the question is not accessible again in the current round of answering.
If the correct answer is chosen, one medal will be given to the user and the question sign will turn to gray.The same question will become unavailable after two trails of answering.Figure 8 shows an example of answering a question.First of all, when the user approaches to a medal (Figure 8(a)), a question will pop up (Figure 8(b)).If the user needs some hint, by clicking the Tips button, detailed information is provided (Figure 8(c)).In addition, videos are embedded in the game to be watched by the users and questions are given based on the contents shown (Figure 9).The video can be re-watched for a better understanding of the questions.The procedure of accomplishing a task is shown in Figure 10.Initially, the user can choose different tasks that need to be accomplished at the beginning of the game.Figure 11 shows an example of a safety hazard on the construction site, where an opening is found on the floor without any safety protection measures.If the user continues walking, the avatar will fall into the opening and the game is over.In that case, the user needs to open the Tool Box and select appropriate tools, Fences, and put it around the opening.Therefore, the safety hazard is removed and there is no danger for the user any more.When the total number of correctly answered questions and accomplished tasks reaches the threshold, the user will be upgraded to the next level, which is going up to the higher floor in the building, as shown in Figure 13.The difficulty level of the questions is also increased.Tasks that have not been accomplished are taken into the next level as well.

Conclusions and Future Work
This paper proposes a pedagogical methodology for improving the quality of learning through transforming traditional instructional delivery techniques into technology-based learning.A 3D virtual construction environment investigation game is developed to enhance learning and teaching in the department of Civil Engineering.By answering questions and carrying on tasks, the students get instant feedback of how well they mastered the domain-related knowledge and will be encouraged to seek answers after finishing the play.By this way, students' engagement in the learning process will be improved by establishing a contextual connection between ordinary textbook materials and technologies that students use in their daily routines.
Students of different levels of Civil Engineering Department were invited to evaluate the game and give feedbacks using a questionnaire.Positive feedback were given showing that students are interested in such kind of games and encouraged to study more details and play the game again for better performance.
A complementary assessment method for civil engineering students can be provided based on this game.Game scenes and questions related to different civil engineering domains can be designed based on the characteristics of different modules.Our future work will be adding more questions and tasks to the game and all students from the built environment cluster will be invited to play the game and give feedbacks.Further statistical analysis can be applied to investigate the effectiveness of this proposed method Figure 2. Creating 3D construction site from Revit to Unity

Figure 3 .
Figure 3. General game engine architecture

Figure 5 .
Figure 5. Designed construction site scenes

Figure
Figure 6.GUI Design

Figure 9 .
Figure 9. Answering questions related to a video

Figure 12 .
Figure 12.Other safety hazard on a construction site

Figure
Figure 13.Level up