Keywords

1 Introduce

Building education for children is a common type of education. Most of the educational applications of VR are directly applied to architecture exhibitions or purely virtual world construction, lacking the process of hands-on practice, and the results have not been turned into reality. Based on relevant literature research results and user research, this paper introduces the logical framework of a VR building construction system and, on this basis, develops a set of VR building teaching application design frameworks and design strategies, which explores a path for the combination of virtual reality and children's architectural education in the future. Teaching for children aims to enhance the sense of experience, exercise practical ability, and enhance the understanding and interest in architectural knowledge. Explore a VR teaching system platform based on virtual reality technology to improve the diversity and sense of the experience of architectural education (Fig. 1).

Fig. 1.
figure 1

Application scenario screenshots

2 Background

2.1 Current Status of VR Education Development

At present, elementary school architecture popular science education mainly stays at the display level of traditional multimedia. Two-dimensional image and audio-video display cannot effectively enhance the interaction between teachers and students, students' sense of participation is not high, and the degree of knowledge absorption and other aspects of learning performance is not good. The pattern between teachers and students is that one teacher corresponds to many students, and problems can not be solved in time, as well as how to save the architectural design, construction, and assembly games. The application of virtual reality technology in a wide range of fields in China, but the penetration rate of application in education is still very low. First, because of the high cost of virtual reality technology equipment and manpower; Second, public awareness is not enough. [1] For teenagers, the lure of new technology is very strong. Touchstone Research, an online marketing research company, surveyed 500 teenagers between the ages of 10 and 17 and released statistics on the awareness of virtual reality technology: 79% of people have heard of virtual reality technology, 68% of people have gradually learned about it, and 47% of people have some or a deep understanding of virtual reality technology. Therefore, the prospect of virtual reality technology among teenagers is still extremely optimistic. Many teenagers aged 10–17 are very interested in virtual reality. “VR virtual reality devices have a far greater impact on minors than TV, computer and other products.” The way people perceive the world is being gradually changed by virtual reality technology, especially for students between the ages of 10 and 17; This technology has a disruptive impact [2].

2.2 Introduction of VR Teaching Mode

Virtual reality teaching is considered an emerging teaching method in the education curriculum, and multiple studies have shown that virtual reality technology has a positive impact on student's academic performance and motivation. Most of the applications of virtual reality technology (VR technology) in primary education have focused on describing and evaluating findings in terms of effectiveness, user experience, usability issues, and student learning performance in the process of primary instructional design [3].

Architecture is a subject that requires people to feel scale. In the process of learning, it is mainly necessary to observe and understand scale, colour, material, and proportion through the eyes. The world of virtual reality can also provide a real experience of scale, get rid of the limitations of the physical world, and present a rich world through a machine.

2.3 Feasibility Analysis of VR Education

  1. 1.

    Upgrade of virtual reality technology

Now virtual reality devices can operate independently, free from the constraints of cables, which also liberates the constraints of environmental sites and makes it possible to teach small classes.

  1. 2.

    Hardware price reduction and popularization

After the acquisition of Oculus, Meta launched the Oculus Qust2 device, which is priced at $299, enabling ordinary consumers to purchase experience. There is also Pico brand benchmarking in China, and VR devices are becoming increasingly lightweight, enabling more and more ordinary people to have access to this technology.

  1. 3.

    Application of multimedia technology in primary and secondary education

At present, many primary and secondary schools are promoting comprehensive quality education, so with the help of virtual reality technology, students can experience the process of various professions, lay a good foundation for relevant majors, and cultivate interest. And some science experiments with safety risks can bring immersive real experiences through virtual technology.

3 Methodology and the Main Procedure

Our approach focuses on the underlying building of applications and effective integration with VR devices. Consideration is convenient for people to learn and understand quickly.

Build the building application platform and realize the building function. This study combines the intersection of computer science, architecture, and education.

On the application development side, unity3d was selected as the main platform of the whole process operation, and C# language was selected as the programming development language. First of all, I built the module unit in rhino modelling software, exported the module into the unity platform in obj format, and then integrated the model building system module management, DXF file export and other functions on the unity platform.

After the model is built, obtain the generated cutting file and import it to the cutting device. Assemble the cut plates (Fig. 2).

Fig. 2.
figure 2

The main steps

3.1 Reality to the Virtual —VR Application Platform Design

3.1.1 Build the Bottom of the Building System

Firstly, a 2 m*2 m cell grid system is established. Grid cells are used to control where blocks are generated. In unity's GridManager, you can enter the desired build width and height. The BlockManager script can adjust the size of the module according to different input parameters, such as a Block 3 m high *2 m wide *0.2 m thick.

On the data structure of the GridSystem (Fig. 3), each grid is named GridX and GridZ, respectively, according to the x-axis and z-axis of unity's coordinate system. The grid data structure is divided into three layers, and the GridX of the same row is added to each row according to the row. As shown in the figure below, each GridX record has the column information and the corresponding position of the name, and then multiple rows are added to each layer. The GridX of each layer is then added to a collection called the three-tier list hierarchy. This allows the aspect to read the corresponding position in the program through the sequence.

Fig. 3.
figure 3

Data structure of the grid and the corresponding hierarchy diagram representation

In the step of placing the block model, the raycast (Fig.  5) method provided by unity3d was used to obtain the grid target hit by the laser ray issued by the VR controller, and the block was created under the object.

Next, the grid is generated based on blocks that can be built in the next layer. After a layer is built, a new layer of GridX and GridZ is generated based on the GridX and GridZ rows and columns of the first layer of blocks. This allows the building to gradually decline from the lower level, which is also in line with the logic of building in a gravity environment. At the same time, the GridCell class is created to record every row and column of GridX and GridZ. This is easy to find the corresponding position in the back. During construction, it will detect which grid raycast hits, and after confirming construction, the block will be generated under the grid object. Therefore, it only needs to find the grid with child objects to get the corresponding grid.

Then, rotation and determination of positive and negative rotation (Fig. 2), when each block is placed, there will be a difference between positive and negative, as well as a difference between length and width. Therefore, a record will be made for the direction of the grid and block when it is generated. When a block is generated in the grid, it will judge whether the direction is aligned with the long side so as to ensure that the long side is aligned with the long side. As shown in the figure below, the grid itself will have four directions when it is generated, and the block will also have directions when it is placed. (Fig. 4) matches it in the same direction.

Fig. 4.
figure 4

Schematic diagram of the orientation adjustment algorithm of the block enclosure

Fig. 5.
figure 5

Camera raycast gets the target grid and generate the block under the corresponding grid

Finally, in automatic cover determination, after building a floor, the last module returns to the starting position to form a closed ring to generate the floor cover of this floor, based on the range of blocks of this floor, through the GenerateNewFloor method in the GridSystem script. The principle is to detect the maximum and minimum values of blocks in the same column or row to generate the floor within this range. Also, In GridSystem ‘CreateStandFloor’ method also generates floor non-builds that can stand (Fig. 6).

Fig. 6.
figure 6

The grid diagram in the multi-layer process is built

3.1.2 Modular Unit Design

How to reduce cognitive difficulty, improve the richness and increase the fun of architecture from the perspective of children?

In the present architectural design, the modular building has developed to a certain mature stage. In children's toys, building blocks can also be considered modules, so in the early design, there was a choice between voxel unit blocks like Minecraft and modular boards like the SIMS [11].

In the process of module design, the module is also considered.3 m is the common base height. In terms of width, the final consideration is given to both efficiency and free openness. 2 m is selected so that there can be more designs for door and window modules, and rich buildings can be built through different combinations.

When designing the cutting file, based on the ordinary module unit, the jagged card slot is designed on the edge of the module to take into account the assembling problem of children. In this way, the building model can be assembled without glue and other additional tools so as to reduce the assembling difficulty of children (Fig. 7).

Fig. 7.
figure 7

Multiple block styles

3.2 Virtual to Reality—Export Cutting Processing Files

After completing the construction of the virtual model, the digital results are exported from the virtual world to the real world.

First, obtain the location information of the constructed module through unity3d, read a GridCell class mounted on each module, and record the row, col and level of the module. After each layer is built, the information of modules given a direction is recorded, and blocks corresponding to the direction are added to the array. In this way, when generating the DXF file, you only need to read the array of the corresponding direction, find the DXF file corresponding to the module name, use the netdxf library to insert each module separately as an insert block into the generated file, the starting point of the block has been the lower left corner as the origin coordinates. The corresponding three-dimensional model and DXF coordinate system data need to have a transformation formula, and transformation formula algorithm, as below.

$$ {\mathbf{x}} = {\text{a}}*{\text{col}},{\mathbf{z}} = {\text{height}}*{\text{Layer}},{\mathbf{y}} = {\text{b}}*{\text{row}} $$
(1)

where:

x, y, z: is the X-axis, Y-axis, and Z-axis coordinate position in the DXF file. a: is the constant of the unit length of the grid system. b: Is a constant of the unit width of the grid system. Col: indicates the number of columns of the block. Layer: number of layers of a block row: number of rows of a block.

figure a

A file is generated for each elevation orientation. The corresponding files are saved in the project directory. After the generation of the cutting file and then opening with the CAD file, according to the location of the block, can separate the different planes of the block. Using the Outside Border Stroke Tool, draw the cut line with another centre line (Fig. 8).

Fig. 8.
figure 8

Generated module unit line draft and assembly model

4 Conclusion and Discussion

The popularity of virtual reality technology has brought many possibilities to architectural education. Combined with the immersive feeling in virtual reality, it can increase the fun and authenticity in architecture and provide a more immersive experience environment. It breaks through the traditional teaching mode of staying in books and PPT and inputs related knowledge of architectural construction into a VR virtual environment, which will greatly improve teaching efficiency.

If TV and mobile phones are a medium to know the world, VR virtual technology is a platform for children to experience, which can provide a more free and imaginative world. This operating system will be separated from the original virtual reality and reality, through the design of the two links, in line with the children's science education process. This building system can customize the design template, give more freedom to children in the design, and ensure that the built results can have enough richness and completion. To promote children's interest in building construction and a general understanding of the construction process.

Future improvement direction: Multiple children will be sought for the experiment. By analyzing the data on children's construction, we can make statistics on children's cognition of architecture and analyze the effect of virtual reality architectural education, as well as their preference and satisfaction with construction from the perspective of children (Fig. 9).

Fig. 9.
figure 9

Schematic diagram of the process