Paper—Application of Virtual Reality Technique in the Construction of Modular Teaching Resources Application of Virtual Reality Technique in the Construction of Modular Teaching Resources

This paper attempts to apply the virtual reality (VR) technique into modular teaching. The modularization of the course Materials of Civil Engineering was taken as an example. The virtual simulation resources were constructed for two teaching modules of the said course on Quest3D. The constructed resources are visual, interactive, scalable, updateable, and optimizable. Based on these resources, the two modules were combined into a virtual simulation system, and applied successfully in actual engineering. The research results open a novel path to modular teaching, and provide a good reference for course teaching in architectural studies. Keywords—Task modules; virtual reality (VR); modular teaching; teaching resources


Introduction
The history of modern education is marked by the unceasing innovation of teaching/learning methods. Over the years, the mainstream learning method has changed from D-Learning based on radio and TV, E-Learning based on computer and the Internet, to M-Learning based on mobile phones. Currently, V-Learning, a novel learning method based on virtual reality (VR), is poised to revolutionize the education industry, giving birth to a promising teaching method called virtual teaching [1].
The VR technique has strong research significance. After years of development, this technique has been applied in many fields, ranging from analysis on energy and power engineering [2], processing of water resources [3], to simulation of military trainings [4]. In particular, educational training has become a hot field of VR application [5]. For example, virtual simulation has been widely implemented in civil engineering education [6], which greatly facilitates urban planning [7] and engineering experiments [8]. Nevertheless, there is no report on modular simulation resources of architectural engineering in mainstream journals.
Materials of Civil Engineering is an important course in the teaching system of architectural studies. However, the traditional teaching method of this course has several defects: the contents lack diversity, the capability of students is not well trained, the experiments are not coherent with the theories, and the theories are not fully applied to practice.
With task modules at its core, modular teaching provides an effective solution to the above defects. Taking the modularization of Materials of Civil Engineering as an example, this paper attempts to represent the course contents around core teaching tasks with real and dynamic 3D virtual images, creating an environment for immersive learning. Firstly, the demand for modular teaching of the course was fully analyzed. Next, the modular resources were designed carefully for two key teaching modules. On this basis, the authors developed a virtual simulation system, and implemented the system in actual engineering.
Our modular teaching method has many advantages. For instance, the virtual teaching resources break through the monolithic thinking mode of traditional teaching and transcend spatial limitations of cognition. Besides, students have intense sensual experience through immersive learning, and thus obtain the best learning results [9]. In addition, the virtual learning scenarios provide the students with a rich experience of engineering and construction [10], and personalized learning resources and space. Overall, our research fully integrates desktop/immersive virtual technology into modern classroom teaching and after-school experiments/practices, making up the defects of existing teaching media and methods.

Demand Analysis
According to the characteristics of this modular course Materials of Civil Engineering, the core tasks were completed by integrating classroom, experiment, practice and autonomous learning. Two task modules "Design and application of common Concrete mix ratio" and "Application design and effect analysis of decoration materials" were selected for this course. The construction of VR teaching resources can help to achieve the seamless integration of classroom, experiment, practice, and autonomous learning.

Resource construction of task module
In task module I, the mix ratio calculated in the theory class was adjusted in the virtual laboratory to obtain its virtual configuration, while slump experiments were conducted at the simulated construction site, and the construction process, the defects and the resulting engineering accident were simulated and displayed in a virtual manner, thus realizing the continuity between the theoretical courses and experimental practices.
This module aims to understand the changing environment in the concrete construction scene. In a three-dimensional space established by the VR system, the human being is the construction subject and feels various scenes in the virtual construction environment, while the VR system is required to have more immersion and better interaction between the human and the virtual environment considering the authenticity and flexibility [11]. This can be achieved in an already-built virtual simulation laboratory by wearing the helmet display, position tracker, data gloves, 3D mouse, and driving simulator etc., as an immersive experience.
The task flow of module Ⅰ was: preliminary design of concrete mix ratio, laboratory adjustment/construction mix ratio, mixture of mixing station, concreter mixing truck, on-site concrete construction maintenance, construction defects, and engineering accidents and prevention. The first two steps can be realized through programming and parameters input.
Based on demand design of system interaction function, the prior mix design procedures can be used to input the indicators such as the apparent density of cement, sand, stones, and admixtures etc. and presetting of the increase and decrease of the water-binder ratio in the adjustment process of mix, thereby obtaining the plastic or hard concrete with different water-binder ratios, corresponding to different construction conditions ( Table 1).
The scene roaming can be achieved in the site concrete construction. It can display the engineering accidents such as surface defects, internal defects and concrete cracks generated in the sub-scenes of concrete pouring, vibration compaction, concrete maintenance, and large-volume concrete construction and so on, and also the related consequences.
Different construction defects lead to different demonstrations of engineering accidents. For example, when cracks are caused by thermal expansion of large volumes of concrete, the expansion of cracks eventually disintegrate the engineering structure. This simulation process can produce a shocking visual impact and leave a deep impression. 2D video materials in conventional courseware are difficult to achieve such realistic effects, and even in the real labs, it's also unachievable. application of the materials in home decoration project; the main scene is the building materials market and residential interior decoration.
Module II is to achieve the cognition of the application of decorative materials, which only needs to show the 3D stereoscopic panorama of operating equipment or instruments [12]. One can observe the object at 360 degrees only by rotating the angle of the virtual object with the mouse. This does not require high immersion of the virtual reality system, since it can be realized using the desktop virtual reality system (or immersive in the virtual simulation laboratory). Meanwhile, it is also suitable for large-screen projection in classrooms for content teaching of decorative materials, or realizes desktop interaction and selecting materials. Especially for architecture major, it can expand the content of various green building materials. In addition, this module has high operability, because it can run independently on an ordinary computer or played by projection in the classroom, and be worn with or without VR glasses.
In each scene, the system not only shows a variety of dazzling products, but also provides good interactivity so that students can freely choose virtual scenes, freely select favorite decorative materials, and observe and compare actual application effects in all directions by roaming in a virtual scene. In this module, the realization of interactive functions is the core and highlight of the entire system.
For the interactive function, it can start from the different technical and economic performance of low-end and high-end materials, or different decorative design styles, and so on. Students select different technical performance indicators of materials in the material database, obtain different materials, and check the corresponding decorative effects. For example, the floor decoration materials used in the callable material library include solid wood flooring, laminate flooring, composite flooring, floor tiles, carpets, marble veneers, and floor leathers ( Figure 1). Main software: conventional 3D modeling software "3ds Max", and 3D engine software "Quest3D" to facilitate the use of third-party services.
Auxiliary software: Image processing software such as Fireworks and Photo shop, animation production software Flash, WEB development script language C # and Javascript, database MySQL, vector drawing software AutoCAD, 3D modeling software 3D Coat, professional modeling software Tekla Structures, and BIM technology of professional 3D modeling for buildings and structural components.
3ds Max is mainly used in the early 3D production of this system. This software can create 3D scenes and characters with game engines. In the field of education and teaching, it is generally applied to design 3D teaching animations and VR scenes.
Rich interactivity is regarded as the primary standard for VR development platforms [13]. Quest3D supports most virtual peripherals of VR and provides graphical module development functions; support multi-level textures and be capable of collecting all the textures of the project; possess the ability to render large-scale scenes and combine lighting textures to achieve detailed scene rendering effects; support efficient collision detection, which can accurately constrain objects; support GUI interface, and enriches interactive functions through visual design; support scene navigation, and skip to any position of the 3D scene through the link of the floor plan; be capable of achieving network publishing and convenient for multiplayer interaction online, experiences sharing, and resources sharing. These advantages of Quest3D were mainly applied in this system to realize technology development.

Design and Implementation of Virtual Simulation System
The main points of the system design and implementation are concentrated in the aspects of resource materials, scene content and scene switching, logic of implementing user interaction, and the real reflection of virtual scenes, reflecting the core content of this system [14].

4.1
Material preparation for digital model The first task of the system is to collect detailed materials, because the content that VR needs to show in this task is the reproduction of scenes or objects existing in the real world, but not those that do not exist in the real world. In view of this, the firsthand information should be collected as much as possible before performing 3D modeling. Usually, the materials to be collected include: design drawings or survey drawings, reference photos, texture photos, and video materials, etc.
For the construction site and the decoration market, the video or panoramic shooting, video clips or panorama stitching, and post-processing are performed in steps to output panoramic videos or panoramas.
Resource material database includes: textual materials such as current building regulations, technical standards, and engineering cases; audio and video materials and animation materials such as concrete construction techniques, maintenance modes and methods, and large-scale concrete construction measures; panoramic views of mixing stations and construction sites; panoramic and partial view of the warehouse building materials market; various decorative materials and their different color textures, etc.

Construction of virtual scenes
The task of constructing a virtual scene should be fulfilled in the following steps: design the layout of the entire scene; draw the modeling sketches and establish a preliminary model; attach materials and textures to the modeled objects; then integrate this part of the model to the scene of the main building; finally arrange the scene with lights [15]. Thus, the design of the entire scene is completed.

Data import and scene rendering
There are many kinds of decorative materials in module Ⅱ, but excessive varieties for VR scenes will directly affect the speed of exporting and opening the scene. In this system, the real-time rendering was used, that is, the results can be seen without any waiting time after changing the variety [16]. Therefore, only by setting the color, shape model, and keyboard model of the materials in advance, one can try different combination schemes as WYSIWYG, even if there are a large number of varieties. The main scene in Module II is the panorama of the large decorative market and the interior decoration of residential buildings (Figure 2). The main scene in Module I is the concrete mixing station and construction site (Figure 3).
The models created by CAD software and BIM were usually expressed by feature data. When exporting the format file, the models must be converted into .dae format files in order to better support Quest3D. Thus, model format conversion can be achieved through DE.
The most reliable way of data exchange is to import the 3D model of decorative materials made in 3ds Max into Quest3D, that is, the 3D model of decorative materials created in 3ds Max can be exported to the .X format file through a third-party plug-in and then imported into Quest3D.
In Quest3D, a real 3D scene needs three elements: camera, light and texture. The concrete construction is an outdoor scene, and the decorative effect design is an indoor scene [17], so the brightness of the light also needs to be defined at different angles; Photoshop is required to process the textures for better visual effect, because this system involves a large number of components such as tile and coatings that need to have good decorative effects through the textures.
The start component "Start Channel" of this virtual simulation system was set to Start3DScene and Channel Caller [18]. The Start 3D Scene channel is to initialize the 3D environment, set the screen resolution, background color, and close program buttons; Set New Start Channel is to implement the scene switching function.

Interactive control logic
Material expansion and update functions should be ensured. In order to support data expansion, a database is the best choice. The database management system is used to manage the pictures of various decoration materials in the material library, and to connect the virtual reality scene of the database for information query [19]. Quest3D can create a database connection through ODBC, which enriches the content of the decoration material library.
The material database query can be achieved. My SQL corresponds to the DB Driver My SQL module. After successful connection to the database connection, enter the query code in the property panel of the DB Query module. For example, the search code for the black marble floor tiles in the table of decorative materials is: SELECT stone FROM table1 WHERE name = marble AND color = black.
Considering the easy scalability, separating the view from the logical control is an important and necessary task in the development process. During the development process, the frequent changes of the requirements sometimes may lead to large-scale content deletion. At this time, developers can abstract and separate the content into modules with a single function, which can reduce the system coupling and improve the system flexibility.
The MVCS framework based on Strange Io C is used to modularize the project, thereby achieving the separation and communication of Model, View, Controller and Service. The framework is based on the Inversion of Control (IoC) principle [20], which extracts the dependencies between components outside the program, reduces the coupling of the entire system, and improves the system scalability.
For the sake of convenience, a hot update scheme was used for updating the resource library of construction and materials. There are two cases of local and remote update: local update is to package the resources that need to be updated and added into an Asset Bundle and place it in the installation directory; remote update is to package resources into Asset Bundle, save the MD5 generated by the resource, define the update version number, and then upload the Asset Bundle resource to the server. When the local client starts, check and compare the version numbers, download the corresponding resources, and update the local configuration file.
Through the use of the above-mentioned key technologies, the interaction requirements are basically realized in the system.

Path tracking during concrete construction
In module Ⅰ, the concrete has a process integrating the mixing, transportation, construction, defect, and accident. As for the engineering accident caused by the deviation of various parameters in the entire process, the demonstration mode can be set by a simple path tracking algorithm [21]. This algorithm is used in two cases: determination of the construction environment (path planning in known areas) and the occurrence of disturbance deviation (trajectory tracking through feedback controller). In this way, the different consequences of engineering accidents and prevention measures can be tracked by the classic path tracking algorithm, and the control trajectory path can be recalled at any time after storage, thereby intuitively reflecting the various consequences and the optimal path, that is, the perfect construction process composed of the correct procedures.
Let the starting point of the mapping path P be (x0, y0), it's traced to the next approximate point (x1, y1) through the tracking path, and then expressed as: The connection of construction scene is realized by clicking the button. One can also use public to declare a Button, and click to switch the scene.

Collision detection and translation rotation algorithm design
The key technology for interactive operation is collision detection. Quest 3D's built-in physics engine can efficiently and realistically simulate physical effects such as rigid body collision, gravity, and friction. In the virtual simulation system of the 3D enclosed interior decoration effect, Box Collider was used, which is the most efficient and suitable for the collision between the cube objects [22]; based on the OBB bound-ing box technology, the key is to determine the optimal direction and then establish the minimum bounding box size in that direction. The core algorithm used in this system is to calculate the covariance matrix Cmatrix (Equation 2) and feature vectors of the model, and then calculate the center position Ccenter (4-3) of the OBB bounding box. i,j [1,3] ( where, (p, q, r) are the coordinates of the vertices of the triangle, m is the centroid of the object model, and AH=∑ 2 =1/2(qi-pi)(ri-pi).
where, A (x, y, z) is the feature vector of the coordinate axis, u and w are the maximum and minimum values of the vertex coordinates.
In module II, the shift in interior decoration space requires the displacement matrix under the action of the keyboard to form translation and rotation actions [23]. The translation rotation matrix is a four-dimensional transformation matrix, which is implemented by matrix addition. Let the homogeneous coordinates of the model space be [x0, y0, z0, 1], the space coordinates after the coordinate translation transformation be [x1 ,y1, z1, 1], and the translation amounts of each coordinate axis be vx, vy, vz, the variable of the translation algorithm variable can be expressed as:

Development of scripting language function
Quest3D supports the function development of scripting languages such as C#, Ja-vaScript or Lua. The related requirements of this system were realized through pro-gramming, such as scene connection, construction process animation demonstration, material variety name display, and structural component mouse dragging. System Implementation

System integration and release in application phase
After passing the system debugging, the virtual simulation system needs to be packaged and released, and installed and used on the client, so that students can use the system for experimental training and autonomous learning. There are various forms of use, e.g., teachers can play the PPT format in the classroom or laboratory, or it can be played on the desktop in the computer room, or students can have immersive experience in the virtual simulation laboratory, or it can be downloaded to the mobile client later [24]. The virtual simulation system is published to the Windows platform, and embedded in the virtual simulation experiment center platform on the campus network. The effective link is http://www.hfuu.edu.cn/jgx/hnt.html.

Analysis for system implementation effect
This paper develops a novel construction idea of visual simulation teaching resources in the two aspects of civil engineering materials and construction. The developed teaching software of virtual simulation not only saves money (for the current similar commercial software, each module must cost tens of thousands of yuan, with only the experimental module), but also has a strong pertinence, flexibility, interaction and scalability.
This advanced virtual teaching resource can improve classroom teaching results. It can replace the teaching materials of traditional PPT courseware, transform the text descriptions on the textbook into a 3D construction environment, and provide multiple perceptual experiences [25], thereby enhancing the sense of participation and leaving a deep impression on the learning content. Traditional teaching methods are difficult to provide authentic and advanced practical teaching scenarios.
In the experimental practice, virtual simulation experiment resources effectively make up for the shortage of physical laboratories [26]. It can break through the restriction of the number of class hours and carry out the experimental practice more efficiently and concentratedly. The content and related experimental instruments involved in these virtual simulation experiments cannot be provided in the conventional experiment of civil engineering material. The next step is to make the developed simulation resources highly scalable, which is convenient for increasing the content and number of modules, and also connecting with subsequent courses such as Construction of Civil Engineering. Quest3D and 3ds