Framework for Development of 3D Temple Objects based on Photogrammetry Method

—Indonesia has a lot of cultural buildings that need to capture as digital objects for other purposes, especially for digital preservation. One of the methods of making 3D objects is using the photogrammetry method. The photogrammetry method makes 3D objects using many photos captured by the camera that will be integrated into the software and processed into 3D objects. In this research, the framework for modeling 3D objects of the cultural building is proposed based on the photogrammetry approach. This framework includes data capture, modeling and processing, and calibration. This framework was tested while making the 3D object of the Candi Badut temple and reported that the 3D model has significantly had similarities with the real object. The framework is useful for standard guidelines for making 3D modeling of historical relics efficiently.


I. INTRODUCTION
Indonesia has many cultures and ancient historical relics that need to be preserved. Digitization is one of the efforts that can be done to preserve historical buildings. One of the historical relics found in the Malang Regency is the Badut Temple. The Badut Temple is located in Karangbesuki, Dau District, Malang Regency, East Java Province, about 10 kilometers from Malang City. In Indonesia, the role of the temple is very important in the introduction of the cultural history of Indonesia [1]. Most of the temple has reliefs on its wall containing a series of important stories to capture and create lessons for the current generation.
By digitizing 3D objects, we can preserve the visual form of a historical object in more detail. The Building Information Modeling (BIM) method was often used in the construction sector to make the construction work process efficient. Along with the increase in conservation and preservation activities of historical buildings, the BIM method has also begun to be applied to historic buildings, so the term Historical BIM (HBIM) method has emerged [2].
Various studies and practical activities have proven the HBIM method's reliability in documenting and scanning all information on metadata-related historical building objects, such as historical data, conservation policies, and significance values [3], [4]. The accurate and representative 3D modeling supports efforts to develop a digital management system to preserve and preserve historic buildings. Realistic 3D building models benefit simulation purposes [5], [6]. A digital survey technique is needed to produce detailed 3D models that are attractive and useful for various purposes in cultural heritage [7]. Image-based virtual 3D modeling technology currently uses three approaches: sketch-based modeling, for example, SketchUp; procedural grammar-based modeling; and photogrammetric-based modeling [8].
The formation of three-dimensional media required expertise and skills in mastering special software. One method of forming 3D objects is by using the photogrammetry method. So many photos captured by the camera will have digital information, then put together into software and processed into 3D objects [9]. Making 3D objects with a high level of difficulty and detailed object shapes in the old way can take a long time, while the photogrammetry method can save time [10]. This method has an accurate result, an effective for wide-area using aerial photos and saving time and money. Implementation of modeling 3D objects using photogrammetry varies in many areas like Agricultural Land Modeling [11], Aerial mapping [12], and infrastructure site monitoring [13].
To help recognize the shape of the temple, modeling is carried out through 3D software by applying a workflow or photogrammetry method steps. Thus, it is necessary to create a standard workflow for making 3D models through the photogrammetry method because of the complexity of the process and workflow. So, this research aims to design the workflow for making the 3D object based on the photogrammetry approach into a formal modeling framework. This paper proposes a standard framework for developing 3D objects of historical relics based on photogrammetry methods. This framework can be used for making other 3D objects which are still a lot of historical objects in Indonesia. The framework, workflow, and the results of the case on the development of the Badut Temple 3D object from this study provide an important role as a model that can be applied to other cases efficiently and effectively. This research is also a part of making Indonesia's cultural heritage digital preservice database [14]. The framework is important as a standard guideline for creating many historical relics in Indonesia.

II. FRAMEWORK FOR HISTORICAL RELICS MODELLING
The method used for making a 3D model is the photogrammetry method. Based on the experience in developing 3D models using the photogrammetry method, we propose a workflow framework for making 3D models of historical relics, as shown in Fig. 1. This framework consists of four consecutive processes that must be carried out *Corresponding Author. www.ijacsa.thesai.org carefully and thoroughly. These steps are coded as follows: A) Preparation; B) Photo Capturing; C) Photo Processing & Modelling; D) Finalization.
The framework starts with the preparation phase by determining which object will be processed into a 3D model, then visiting the site to see the situation while preparing all the equipment. The types of equipment to be prepared are a high resolution of digital camera and an Unmanned Aerial Vehicle (UAV) or drone. The site visit is important to make sure that the process for taking object photos is permitted since the object is a cultural heritage. While visiting the location, it needs to take some initial photos to determine the photo capture flow in the stage of photo planning. A document template of object data is used for structuring the plan, process, and the results as shown in Fig. 2.
The photo capturing process should start by creating the photo capture flow, as shown in Fig. 3. Photo capture flow consists of the plan for the spot for taking photos circularly of the object. It consists of 2 stages of the photo plan, the first is around the object (yellow circle), and the second is circularly from the top of the object (blue circle). Then photos are taken using a digital camera from each position, including the drone's top position. To ensure that all photos are clear and bright enough, it is better to take them in the morning when the sunlight is clear enough. Since the number of digital photos is huge, it should be documented carefully.
After all of the photos have been captured, it is ready to proceed using special software that implements photogrammetry. Several softwares like Autodesk Recap, Regard3D, COLMAP, Meshroom, and RealityCapture can be candidates for this process. Table I shows the comparison between this software. RealityCapture is the best software but the most expensive, while Meshroom is good enough with a better price [15]. Meshroom software is chosen because it has excellent fidelity and can work better in low-light situations. So, all processes of making 3D models from a series of photos can be implemented. Meshroom will work according to the stages of modeling work.  There are four processes for creating 3D models. It starts with making the structure from motion, which is the stage for obtaining a point cloud. After the point cloud is obtained, create a depth map using the DepthMap function. The DepthMap stage connects the point clouds to form a field. After the DepthMap stage is complete, the work process continues to the Meshing stage. At this stage, the fields that have been obtained begin to be put together to form a 3D model. Then the last stage in Meshroom is the Texturing stage. At this stage, the 3D object forms a texture that matches the original object in terms of color, shape, and position.

A. Object Selection and Preparation Process
The first thing to do in 3D modeling of historical relics is select the objects in the real world to be photographed into 3D objects. In this study, we chose the Badut Temple as the object to be studied. Initial site visiting has to be done to get some information and site photos to make the photo capture plan. The following is a view from the front side of the Badut Temple in Fig. 3. All process was planned in a document template as shown in Fig. 2.

B. Photo Capture Flow Design
Before taking all the photographs of the temple, a photo capture flow has to be planned. The top view of the temple from Google Maps is used to draw the photo capture plan, as shown in Fig. 4

C. The Results of Taking Photos of the Badut Temple
All photos were taken at the Badut Temple location using a high-quality digital camera and drone. As defined before, taking photographs of the Badut Temple was done in a circle, as shown in Fig. 4. The results of the Badut Temple photoshoot were obtained from as many as 208 photos and stored in a folder, as shown in Fig. 5. The number of photos varies depending on the size of the object.

D. Photos Processing in Meshroom
After all of the photos are collected, we can proceed with the processing steps. Meshroom is used in this phase and consists of five processing steps: importing photos, structuring, creating a depth map, meshing, and texturing. 567 | P a g e www.ijacsa.thesai.org 1) Import stage of badut temple photos in meshroom: Drag and drop photos saved in a folder into Panels Images on Meshroom. After the photograph enters the Panel Images, the work file is saved first. Then click start to start the operation. Display the Images panel in Meshroom as shown in Fig. 6.
2) Stage structure from motion photo of badut temple in meshroom: After the photos are put into the software, Meshroom will process them to generate the point cloud. The point cloud will be shown from the photo processing results. In Fig. 7, the point cloud obtained from this stage is 191,374 point clouds. This number already gives an idea of how the 3D model of the Badut Temple will be.
3) Stage depthmap photo of badut temple in meshroom: At this stage, the point cloud process obtained from the previous stage is more focused on unifying the point cloud so that it is close to the similarity to the object. The process at this DepthMap stage takes a long time and is prone to failure.
Here's what the DepthMap stage looks as shown in Fig. 8.

4) Meshing stage badut temple photo in meshroom:
At this stage, 3D objects from the Badut Temple have begun to be seen along with other objects caught by the camera. The shape of the Badut Temple 3D mesh is shown in Fig. 9.

5) Texturing stage of badut temple photos in meshroom:
At this stage, the texturing process (shape and color) matches the texture of the real object of the Badut Temple. The 3D of the Badut Temple is shown in Fig. 10. This stage is the final stage of creating 3D objects in Meshroom software.    After the Texturing stage is complete, the 3D object results in the Meshroom software are in the form of files that can be used for digital assets later. The following is a 3D file of the Badut Temple from the processing results in the Meshroom, as shown in Fig. 10.
In Fig. 11, there are several types of files from the processing results in Meshroom, which have different functions. The PNG file type results from the texture on the Badut Temple object, which contains a 2D image representation of the surface mapping of the Badut Temple 3D object. The MTL file type is a file that contains material information for the 3D Badut Temple object. A file of type 3D Object is a file that contains the final 3D object obtained. Files with this type of 3D Object will be used later for further work; in this case, the work is continued in Blender 3D.

E. 3D Object Model Refinement
The file of type 3D Object from the Meshroom results is then imported into the Blender 3D software, as shown in Fig. 12. When taking photos, the temple object is always focused in the middle, so the result of importing the 3D model of the Badut Temple will make the temple object located in the middle, among objects caught on camera but unused. At this stage, the removal or deletion of unused objects around the temple is carried out. The unused object is highlighted, and the deletion process is carried out. Then the final result of the 3D model in Blender 3D is obtained, as shown in Fig. 13.

F. 3D Object Evaluation
To calculate the level of accuracy of the 3D model, the model size has to be compared with the temple's original size. A measuring tape was made to get the measurement results in the field. Meanwhile, to measure the size of 3D objects in Blender 3D software, use the measure function. Both results were then compared to ensure that the 3D model has a proportional size to the model of a real object in a small size. This is also for calibration purposes.

1) Field measurement results:
The results of measurements in the field are taken by measuring the parts of the temple. In this case, 15 samples were taken from each temple part using a measuring tape. For the sample of the front view of the temple, ten samples of the length dimensions D1 to D10 were taken, as shown in Fig. 14. For the left view sample of the temple, five samples of the length dimensions D11 to D15 were taken, as shown in Fig. 15. Then the measurement results are obtained as in Table II.  2) 3D Model measurement results: To measure the size of 3D objects in Blender 3D software, use the measure function. Measurements on the software, adjusted to the sample on measurements in the field. For the sample of the front view of the temple in 3D Blender, ten samples were taken with dimensions D1 to D10, as shown in Fig. 16. For the left view sample of the Temple in 3D Blender, five samples were taken with dimensions D11 to D15, as shown in Fig. 17. All the results are obtained in Table III. www.ijacsa.thesai.org   3) RMSE calculation results: After measuring the size of the real object and 3D model, the Root Mean Square Error (RMSE) formula is used to measure the differences between them using the equation (1).
The first thing to do is to calculate the sum of the squares of the differences between the data obtained from 3D models and the data of the real object, as shown in Table IV. The  summary obtained from Table IV is entered into the formula for calculating RMSE.

√
The accuracy of the 3D model of the Badut Temple obtained is 0.0734 meters, or equivalent to 7.34 cm. From the calculation results, the results obtained are smaller than 10 centimeters, so it can be said that the 3D Badut Temple model generated from the photogrammetry method is close to the shape of the Badut Temple in the field (original). Comparison of the Badut Temple photos and the processing of the Badut Temple in Meshroom and Blender 3D software as shown in Fig. 18 to 21.

4) 3D Object distribution:
The results obtained from Blender 3D are 3D objects in various files format, one of which is the Collada (.dae) file. The visualization of the Blender 3D results was obtained as shown in Fig. 22. The files obtained from Blender 3D can be used in other 3D processing software. The 3D model of the Badut Temple can be used as a digital asset for many purposes like digital preservation, video games, video animations, and others.

IV. CONCLUSION
This paper proposed a framework for digitizing historical relics using a photogrammetry approach. The process consists of 4 phases: Preparation, Photo capturing, Photo Processing & Modelling, and Finalization. All these processes can complete in just one week. Implementation of this framework in Badut Temple shows that the photogrammetry approach is efficient for creating a 3D model of historical relics.
In the photogrammetry approach, the series of circular views of the object photo is taken using a high-resolution camera and UAV drone. Then all the photos are processed carefully using Meshroom software in four steps: structuring, depth map, meshing and texturing. Special software for processing 3D objects like Blender is then used for refinement and finalization. The result of the accuracy of the 3D model of the Badut Temple is below 10 centimeters. It means that the model has a precise size compared to the real object. So, this approach is also effective for creating 3D models precisely while maintaining the detail of the reliefs.

V. FUTURE WORK
The 3D model of the Badut Temple can be used as a digital asset for many purposes like digital preservation, video games, virtual reality, and others. This model will then use as part of the digitalization and creation of the digital database of historical relics in Indonesia. Our research group of Media, Game, and Mobile (MGM) Technology at the Computer Science Faculty of Brawijaya University is researching Indonesia's digital heritage of historical buildings, starting from many of the relics in East Java, Indonesia. We develop a web portal and digital database of the model of historical buildings in Indonesia, especially the temple, as shown in Fig. 23. Since the temple wall has many reliefs that contain a visualization of a story, the 3D model created from this approach should be able to preserve it. Future work must be done to ensure that all the reliefs still exist. Digital restoration and refinement processes may proceed to make the reliefs exist like the original relics.