## 6 Data Transfer and the Creation of a 3D Model for VR and AR
### Optimising a 3D Model of a Large Object for Use in VR  
For this purpose, Unreal Engine 4.24, HTC Vive, Pro, and a PC with a GeForce RTX 2080 Ti graphics card, 32 GB RAM, and Intel i7 were available in late 2018. It was already clear from the first experiments that a complete detailed 3D model could not be easily converted to VR at full resolution. The first step was to decimate the resulting high quality mesh 3D model into a minimized number of triangles while preserving the quality of the structure and without deforming the object. The processed 3D model, created based on photogrammetry and TLS, was eventually reduced to 17,000,000 triangles from the proposed 63,000,000 triangles. The original model created, without any decimation or modification, had over 100 million polygons and was difficult to work with due to the hardware used at the time.  
The original 3D model was worked with for visualizations and especially for the virtual completion of missing parts (Figure 16) and the creation of plans for the reconstruction of the sanctuary, but it was too large for VR.  
In Unreal engine 4.24 (2019) and later version 4.25 (2020), it was not possible to work with the large number of triangles that the processed object had--even after decimation. After the first few attempts, the Unreal Engine and the computer crashed. The solution was to cut the 3D model into a total of six parts in Agisoft Metashape and process them sequentially (Figure 17).  
Figure 16: On the **left**—the state of the object; on the **right**—the virtual model supplemented with collapsed parts.  
Sub-parts (Figure 17, Table 10) of the model were also created for each project phase (2018a, 2018b, 2021). Each time for each phase, the base 3D model was reduced to approximately 17 million polygons. For each part of the model, diffuse textures were computed at a resolution of 8192 \(\times\) 8192. The calculation of the diffuse texture for the cut parts was done again in Agisoft Metashape, Version 1.4.3, build 6529 (21 July 2018) (Figure 18).  
The position of the parts was not allowed to change in any way to prevent them from shifting or deforming in the resulting 3D space. The individual parts of the model were successively loaded into the 3D space of Unreal Engine. Subsequently, all parts were combined and labelled as a single object to avoid their displacement. However, materials were created for each part, each containing its own diffuse and normal texture.  
Finally, model information was added to the virtual world in Unreal Engine. This was followed by the creation of an application that made the partially created 3D model accessible to anyone with VR goggles and sufficiently powerful hardware. The 3D models were created in this way in Phases 1 and 2 of the project.  
\begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt}} \hline \hline
**Parts** & **Polygons** \\ \hline
1 & 1,926,961 \\ \hline
2 & 3,535,798 \\ \hline
3 & 3,748,314 \\ \hline
4 & 2,004,938 \\ \hline
5 & 2,056,302 \\ \hline
6 & 3,727,686 \\ \hline \hline \end{tabular}
\end{table}
Table 10: Size of all six parts.  
Figure 17: Dividing the decimated 3D mesh model of the shrine on six parts.