2011 International Conference on Information and Intelligent Computing IPCSIT vol.18 (2011) © (2011) IACSIT Press, Singapore Application Research of Three-dimensional Model Optimization Technology in Virtual Drilling Training System FuHua Shang ,ShiJun Chu and HongTao Xie School of Computer & Information Technology Northeast Petroleum University Daqing, China E-mail: shangfh@163.com, chushijun007@163.com, xhtllq@126.com Abstract. Virtual drilling training is an important way to achieve standardized drilling training. While as drilling well site and operations are complex, the amount of three-dimensional models created and their scenes are large which seriously affects the speed of roaming and interacting in the scene. Be aimed at this problem, from simplifying model numbers and model sides to optimizing model texture were adopted in modeling process as well as other methods. And integrating with Virtools, this article realized the usage of LOD technology in the threedimensional scene, improved the efficiency of optimizing three-dimensional model, increased the speed of operation of the system and met the requirements of virtual drilling training. Keywords: Three-dimensional model; Model optimization; LOD; Drilling training 1. Introduction In oil drilling, non-standardized operations of staff bring great security risks for the drilling and is the main reason for accidents. According to statistics, 70% to 80% of incidents in the oil business are due to illegal operational behavior and human error [1] which caused huge economic loss and casualties which drilling workers and their families can not bear. Therefore, pre-service training for drilling workers and standardization of drilling operation are key factors to reduce accident [2] [3]. Using virtual reality technology to achieve drilling training is an important method of drilling training. In the process of virtual drilling training system, the establishment of three-dimensional models and scenes is the basis and key step for system implementation and the size of three-dimensional model and its scene directly determines the usefulness of the training system. With the increasing demand for real sense, complex and attractive three-dimensional models with color, texture, material and light can be created via using 3D MAX, however, due to the complexity of the model for achieving real effect, especially achieving photo displaying effect in virtual reality, the number of triangular facets to construct scenes is enormous [4] which can not meet the requirement of real-time three-dimensional scene rendering, therefore, model optimization through using software is crucial for storage, transmission, calculation and display. 2. The Creation of Three-Dimensional Model And Its Scenes Three-dimensional model for drilling is the basis of virtual drilling training system, and the quality of model will directly affect the operation of system and the fidelity of the scene. Therefore, the professional modeling software 3D MAX with powerful function and various modeling methods are adopted to create three-dimensional drilling models. 110 Modeling of the virtual drilling training system is mainly divided into five aspects: first, simple drilling equipment models are mainly created in the way of using standard primitives combination and vertex finetune; second, model complex drilling equipment, mainly use the combination between standard primitives and the model modifier combined with the corresponding model vertex operator geometric modeling, special models can be used the way of combining point, line, surface, body to model to build three-dimensional shape and characteristics of drilling equipment, Third, model drilling equipment with its physical properties, process texture, color, light of the model, make the appearance of the model to meet the design requirements, make it realistic; fourth, the model with a flexible movement, primarily through motion modeling approach to achieve simulating the movement of objects in the virtual environment, to improved the flexibility of the model motion in the overall environment, Fifth, the model for virtual characters, mainly use the way of combination bone modeling and skinning to model, to combine object behavior modeling to build the basic figure model action ,to achieve the realism of virtual characters motion. 3. Integrated Application of Three-Dimensional Model Optimization Techniques A real-drilling well site is complex and have numbers of equipments, therefore, virtual drilling well site created is a collection of very complex models, during the rendering process to generate a large number of polygons in real-time, Increase in overhead when the system is running, reduce the speed of system's real-time interaction, therefore, not only integrated use three-dimensional model optimization techniques in the process of modeling, but also use the effective optimization algorithm to optimize models in three-dimensional scene, optimization results have a direct impact on system efficiency and speed of display, a good optimization strategy can greatly reduce the capacity of the memory space occupied by model, make the system run more smoothly. 3.1. Optimization of three-dimensional model The optimization of three-dimensional model throughout the process of the model's creation mainly includes three aspects: reduce the total number of model, streamline the total number of model faces and streamline the total volume of the model maps [5]. • Reduce the total number of model Too many models directly affect the export of three-dimensional scene and the speed of opening scene in the virtual drilling scene. If the model number is too much in the current scene, the computer's calculation is too big, could not load some objects, result in the phenomenon of missing model; Even if all the models can be loaded, The speed of system operation will be very slow, therefore, need to add material for the model with the same material, adjust the mapping coordinates of the model, And then merged with the same material model in order to reduce the number of model. When combine models in the scene, there are two ways: Attach command to streamline model approach and collapse order to streamline model approach. When combine models with the same material in the scene, need to grasp the principle: The total number of model combined faces is less than 100,000; otherwise, the effect of optimization will not be obvious. • streamline the total number of model faces Use the appropriate number of segments for different models, can reduce the number of vertices and faces of model, avoid generating unnecessary point, line and surface, and reduce the space occupied by the model. According to modeling Methods used in the drilling equipment modeling process, mainly include streamlining of the Plane model face and the cylinder model face. Delete the overlap surface between the model and the bottom surface of the model, can effectively reduce the number of the model surface, first, convert the model to Poly or Mesh, Then switch to the Polygon level, and delete the overlapping surface of the model. Figure 1 removed overlapping faces, Figure 2 removed invisible surface. Two figures show: when added streamlined model Textures the effect is still very realistic. 111 Figure 1. Remove overlapping surface and texture of segregation manifold Figure 2. Remove the bottom and map of the reservoir model • The total amount of texture to streamline model The size of mapping has a great influence on the running speed of system. From the tidy mapping, we can guarantee the system effect; also we can reduce the size of the system to improve the efficiency. Under the premise condition of image quality, we could use texture compression techniques to do some necessary compression, reduce the size of the image files, and achieve the texture compression according the geometrical size of the image files. But the pixel of the texture image length and width must be 2 of integer power, or the texture distortion may occur. To do the texture mapping for the models, VV mapping should be used. Compare with other mapping patterns, it has a smaller capacity and shares one texture mapping in the similar color. So the VV mapping could reduce the size of the model files [6]. 3.2. the Using of the LOD Technology in drilling three-dimensional scene Optimization Using different methods to optimize the model of the drilling in three-dimensional scene could effectively reduce the size of the model, but there are also plenty of models in the scene of the virtual drilling. The realtime drawing of the complex three-dimensional scene will increase the system overhead, influence the system running efficiency. So it is necessary to use some techniques of optimizing scenario to reduce the system overhead, improve the system's running efficiency and achieve the authenticity of the scene and the real-time coordination. LOD (Level of Detail) technology is an effective way to control the scene complexity and speed the image drawing. As the human visual sense do not have a very high requirements in the long distant of the three-dimensional model, we can control the display of the three-dimensional objects in the system operation status using of the LOD technique. To a large extent it could reduce the complexity of the three-dimensional scene and increase the system's uptime fluency [7]. Since the optimizing of the three-dimensional scene using LOD techniques also brings the increasing of the system overhead, we do not use LOD technology in all models. It is just the more sophisticated models in the virtual drilling system, such as the derrick, pneumatic 112 winch, hydraulic clamp, shunt exchange. The LOD technology using in this paper is conducted with the support of Virtools software. The steps of realizing the LOD technology in the scene model: First, add the LOD properties for the fine parts and large-scale model; then set the parameters of LOD properties, including the using algorithms and LOD model's selection criteria. Based on area parameters, the selection criteria include Screen Mag, Screen Min, Faces Mag and Faces Min. If the proportion of three-dimensional objects in the projection screen in is over the size of Screen Mag, the grid simplification of the patches will stop. Then the number of objects on the surface will be determined by the Faces Mag. if the proportion of three-dimensional objects in the entire screen is less than the Screen Mag, the model will begin to patch the mesh simplification, until the proportion is less than the Screen Min, which is also the time that Faces M in determines the number of objects on the model's surface. At last, using the BB module of Virtools we can program to realize the on and off of the mess simplification of the grid. The modules used in the BB module mainly include Set Patch Mesh Steps, Parameter Selector, Op, Threshold. Figure 3 shows the drilling three-dimensional scene after using the LOD technology. Figure 3 .The drilling three-dimensional scene using LOD techniques 4. Conclusion Through the application of model optimization technology in the virtual drilling three-dimensional model and scene, we simplify 3DMax modeling and rendering, as well as improve three-dimensional virtual scene drilling roaming and interactive speed, what’s more, speed up the premise of three-dimensional model and scene processing speed without sacrificing visual effects. Thus, trainers can operate several of equipments in the virtual drilling scene conveniently to carry out the corresponding drilling simulation training, which greatly improved the effectiveness of training. 5. Acknowledgements This paper is supported by the National Natural Science Foundation of China (Grant NO. 61170132). 6. References [1] Zhao Gang. Oil companies cause of the accident analysis and countermeasures [J]. Technology Innovation Review, 2007, (31): 38 - 38. [2] single-Ming Jing, Zhang Yonghong, Wei Yingjie, etc. Oilfield common safety management problems and countermeasures [J]. Safety and Environmental Engineering, 2009,16 (1): 85 - 87. [3] Zhang Guozheng, Zhao Zhangbin. Progress Made in Drilling Workers Training Pattern [J]. China Oil & Gas, 1997, (2): 81 - 81. [4] Liang Hongbao, Cheng Qichao. Based on Virtools of the Optimization of Virtual Chemical Plant3D Model [J]. Computer & Digital Engineering, 2008, (11) :166-169. [5] Ren Weijian, Tengfei, etc. Research on Oil Drilling System Simulation Based on Virtual Reality Technology, Science Technology and Engineering, 2011,11 (13): 2981--2985. 113 [6] Li Ruimin.Study on Three-dimensional Drilling Virtual Environment Modeling based on Virtual Reality [D]. China University of Petroleum, 2010. [7] Li Xun Xiang, into Rao, Ding-Fang Chen. Virtools visual system based on optimization studies [J]. Wuhan University of Technology, 2008,32 (1): 101 - 102. 114