=Paper=
{{Paper
|id=Vol-2631/paper26
|storemode=property
|title=The Analysis of File Format Conversion Tools for Storing 3D Objects for the iOS Platform
|pdfUrl=https://ceur-ws.org/Vol-2631/paper26.pdf
|volume=Vol-2631
|authors=Dmytro Ostrovka,Vasyl Teslyuk
|dblpUrl=https://dblp.org/rec/conf/momlet/OstrovkaT20
}}
==The Analysis of File Format Conversion Tools for Storing 3D Objects for the iOS Platform==
The Analysis of File Format Conversion Tools for Storing 3D Objects for the iOS Platform Dmytro Ostrovka[0000-0003-4818-3822] and Vasyl Teslyuk[0000-0002-5974-9310] Lviv Polytechnic National University, 12 Bandera street, Lviv, Ukraine, 79013 ostrovdi@gmai.com Abstract. The development of augmented reality technologies has not by- passed mobile operating systems, in particular the iOS operating system. In turn, the three-dimensional file industry has a large number of ready-made solutions presented in various formats. However, not all of them are supported by mobile operating systems iOS, such as Obj or Fbx files. That's why the question of con- verting them to the supported by the operating system iOS formats, USDZ and Collada, is quite relevant. Accordingly, the paper analyzes the means of convert- ing file formats for storing three-dimensional objects under the iOS platform. The results of an experimental comparison of the quality of converted three- dimensional files make it possible to determine the optimal means for converting with minimizing deformations and losses. This, in turn, can help developers in choosing three-dimensional formats suitable for their tasks while working on an iOS product. Keywords: Augmented reality, USDZ, USDC USD, Converting, Fbx, Collada, Obj, Mobile Development, iOS, AR, Three-dimensional files, 3d Files. 1 The problem With each passing day means for displaying the augmented reality more and more ap- pear in different fields of human life [1–3]. This also applies to such an integral part of it as smartphones. Despite the high potential of this technology and a great perspective, there are many solutions on the market for storing and displaying 3D graphics - three dimensional files [4]. Because of this, sometimes developers have a situation when it is necessary to display the existing three-dimensional model on a smartphone. However, this is not always possible to do due to the incompatibility of three-dimensional files and operating systems. The solution to this problem can be found in the converters of three-dimensional formats, which allows converting some formats into other ones. The purpose of this paper is to analyze existing solutions for converting 3D formats to iOS mobile operating systems (hereinafter - iOS), as well as shortcomings of their use, such as collisions, lack of textures or animation. Copyright © 2020 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). 2 Approach An empirical research method was used to achieve the goal. To find out the tools for file format conversion, three-dimensional models into supported by iOS, theoretical analysis of software for working with three-dimensional graphics was performed. The quality of conversion of each selected format was analyzed using experimental meth- ods. 3 Presenting main material Since there are over a hundred different file formats for displaying 3D models, only the most common ones that were not supported by the iOS mobile platform were selected. That is, those file formats for which there are already many ready-made 3D models, however, which cannot be displayed on iOS using built-in methods. According to re- searches spent in this article [5] these are formats Fbx and Obj [6, 7]. Fbx - is a proprietary format that is owned by Autodesk. It is widely applied in the film industry and also in the industry of games, because of ability to keep animations and support of a wide set of programs for work with a 3D-graphics developed by com- pany Autodesk. Obj - an open format for storage of geometry of objects. This format can use textures or colours to display models. This format has received its popularity because of sim- plicity of creation and storage of models and also because of its openness. The formats for displaying 3D files that are supported at the iOS level are Collada [8] and USDZ [9]. Both formats support similar sets of technologies. However, USDZ is a relatively new format, which was announced by Apple in 2018, due to which it is able to optimize the construction of three-dimensional model. Among the programs that are used to convert 3D models were those that allow to convert Obj or Fbx formats to USDZ and Collada formats. Namely: Reality Converter - Apple's application for converting Object models to USDZ for- mat [10]. FbxConverterUI - an application from Autodesk to convert Obj and Collada formats to the Fbx format and vice versa [11]. Blender [12] - a software package for creating 3D graphics that also allows convert- ing Fbx, Collada, Obj and USDC files to each other [12]. It should be noted that all the above programs are free to download from official re- sources. To perform analysis there was developed a test mobile application [14 – 16] for the iOS operating system in the Swift programming language [17] that allows to display three-dimensional objects, via XCode IDE [19]. Also, for more detailed analysis, this application makes it possible: To hide the textures of the models leaving only its frame. Play the animation if it is present in the model. Change the model position and size. For testing were downloaded several 3D models from free3d.com resource [18]. The received results can be useful in the development of augmented reality systems [20, 21] health applications [22, 23], intelligent cities and smart home applications [24 – 26], etc. Obj file converting experiment At first the models of Obj type were considered. As "objects of this model do not con- tain animation". [5, pp. 326-327] so only the image quality of static files after conver- sion was evaluated. When converting to the USDZ format with the Reality Converter application, no collisions occurred and both models were displayed correctly, as can be seen in Fig. 1. It should be noted that this converter does not use a .mtl file that stores information about the color of objects, but allows overlaying textures. Fig. 1. Results of converting Object files to USDZ using Reality Converter Blender also allows you to convert files to a USD-like format, namely USDC. The USDZ format is an archive that consists of one USDC file and a set of textures. The result of the conversion with Blender is a USDC file that describes the geometry and colors of the model, but does not have the texture representation, that can be seen in Fig. 2 of the sewing machine model. Also, during the experiment, it was found that the final USDC file of Blender takes more memory than the USDC file inside the USDZ file, which is the result of the Re- ality Converter conversion. Fig. 2. Results of converting Obj files to USDC using Blender When converting Obj files to Collada files using Blender, no collisions were detected, as can be seen in Fig. 3, but the final size of the files has increased even more than the previous conversions, as can be seen in Table 1. According to the research in the article [5], this is due to the different way the data about the three-dimensional model is stored in formats. Fig. 3. Results of converting Obj files to Collada using Blender Table 1. File size before and after conversion from the Obj format Input weight of Reality Blender into Blender into File name Obj file Converter USDC Collada Iron Man 16.6 Mb 3.5 Mb 12.3 Mb 25.4 Mb Swing 328 Kb 110 Kb 232 Kb 610 Kb Machine As you can see from the table and figures above, there is no best solution for con- verting Obj files to iOS compatible formats at the moment. Because you have to choose between converting the colors or textures of a model, and considering the size of the final model. However, USDZ is a new format that Apple is actively developing and improving, as evidenced by the availability of a new Reality Converter (released by Apple in January 2020) and increasing support for the format by third-party software (such as Blender), so it is possible that existing shortcomings will be corrected soon. Fbx file converting experiment The Fbx format was discussed next. During the experiment, three different models were selected, two of which contained animation. To convert to USD-like formats, the Real- ity Converter and Blender programs mentioned earlier were used. During the experi- ment it was found that the latter (Blender) did not convert animation in the models and as a result USDС files did not contain animation. It should be noted that some files were displayed either after conversion in Blender or Reality Converter. In other words, only one of the listed programs was able to cor- rectly convert the model. This is due to the unique structure of each specific three- dimensional model. Since Autodesk updates its Fbx plugins every year, such conflicts may occur due to different versions of these plugins during model development by the designer and conversion during the experiment. The results of the models converted from Fbx to USD-like files are shown in Fig. 4. ─ The first model with animation - was correctly converted by both programs. As it was said above, the animation model that was converted by Blender did not contain any animation. ─ The second model was correctly converted by Reality Converter. ─ The third model was converted only by Blender (without animation). Fig. 4. Three-dimensional models converted from Fbx format to USDC (Z) format Blender and FbxConverterUI programs were used to convert to Collada format. Un- like the USD conversion result, the result of converting by Blender to the Collada for- mat contains animation. However, during the experiment, there were some collisions after formatting the model as shown in the first model in Fig. 5. As for the FbxConverterUI program, it often crashed. It is related to the outdated version of the given program (last release 2013) and as consequence absence of support of models on the basis of new versions of Fbx though it and official software from company Autodesk. Also, the convertible models of this program deformed the distance of the models from the center of the camera, so it was difficult to manipulate them. The conversion results are shown in Fig. 6. The model of the dragon could not be converted to the Collada format by any of the programs. Fig. 5. Three-dimensional models converted from Fbx to Collada format As with the conversion of Obj files, Reality Converter converts models with the highest compression. This is primarily due to the USZD format the program converts to. As researched in the article [5], this format structures data in the most optimal way. As for the conversion to the Collada format, as can be seen from Table 2, it is rather difficult to identify a favorite, but during the experiment Blender has never completed the work accidentally which cannot be said about FbxConverterUI. Table 2. Files size before and after conversion from Fbx format Solder Model Robot Model Dragon Model Fbx (input file) 677 Kb 6,3 Mb 23,8 Mb Reality Converter USDC 322 Kb Failed 16,7 Mb Blender USDC 3,3 Mb 3,7 Mb 20,1 Mb Blender Collada 3,3 Mb 13,4 Mb 101,2 Mb FbxConverterUI 1,5 Mb Failed 112,3 Mb Based on the experimental results, it can be concluded that the optimal format for converting from Fbx to one that is compatible with iOS today is the format USDZ. This can be done with Reality Converter or Blender. However, during the experiment, it was found that the last one (Blender) does not allow saving information about the animation of the model being converted. Therefore, it is appropriate to use it in cases where the models do not contain animations or they can be ignored. This program should also be used when it is necessary to convert 3D models to the Collada format, because the alternative program FbxConverterUI may cause conversion failures. 4 Conclusions Solutions that use 3D technologies to facilitate learning or to improve the quality of user interaction with the interface are appearing every day. Since smartphones are often the ones actively involved in the implementation of three-dimensional technologies, this paper examines the best solutions for porting three-dimensional models to the mo- bile OS iOS. Given that in the field of 3D graphics there are many available solutions that are not supported at the level of iOS, the actual means of converting them into formats supported by this OS. Common file formats for storing 3D objects, such as Obj and Fbx, have been chosen for this purpose. In order to analyze existing solutions, their problems and disadvantages for conversion of selected 3D formats into supported by iOS (USDC (Z) and Collada), several free programs were selected. These are: Reality Converter, Blender and FbxConverterUI. Using them, an experiment to convert formats on different models was conducted. During this experiment, a number of disadvantages and advantages of each program were revealed. According to the results, it was con- cluded that Reality Converter proved to be the most optimal program, as it allowed saving both animation and texture of models. However, it is also worth noting Blender for its ability to convert all types of comparable formats, although not always with the preservation of animation or textures of the model. The use of 3D graphics in people's lives is only gaining popularity, so the question of optimizing ready-made 3D solutions for integration into new operating systems will be relevant for a long time. The results of the experiments may be useful for developers of mobile applications in which it is necessary to use Obj or Fbx formats. Prospects for research in the field of mobile three-dimensional graphics are aimed at improving the interaction between users and objects, as well as on the quality of their reflection. References 1. Dávidekováa M., Mjartana M., Greguša M.: Utilization of Virtual Reality in Education of Employees in Slovakia. In: Procedia Computer Science 113, pp. 253–260 (2017). 2. Tsmots I., Teslyuk V., Khavalko V., Lukashchuk Y., Poniszewska-Maranda A.: Use of Aug- mented Reality Technology to Develop an Application for Smart Factory Workers. In: Pro- ceedings of the 1st International Workshop on Digital Content & Smart Multimedia (DCSMart 2019). CEUR Workshop Proceedings vol. 2533, pp. 23–34. Ukraine, Lviv (2019). 3. Schuemie, Martijn J., Peter van de Straaten, Merel Krijn, Charles A.P.G. van der Mast: Re- search on Presence in Virtual Reality: A Survey. Cyberpsychology and behavior: the impact of the Internet, multimedia and virtual reality on behavior and society 4, pp. 183–201 (2001). 4. Jaworski N., Farmaha I., Marikutsa U., Farmaha T., Savchyn V.: Implementation features of wounds visual comparison subsystem. XIV-th International Conference on Perspective Tech- nologies and Methods in MEMS Design (MEMSTECH), pp. 114-117. Ukraine, Lviv (2018). 5. Ostrovka D., Teslyuk T., Vesely P., Prots’ko I.: The Analysis and Comparsion of File Formats for Constructions of iOS Three-dimensional Objects for Augmented Reality Systems. CEUR Workshop Proceedings vol. 2533, pp. 325–334. Ukraine, Lviv (2019). 6. Obj File Documentation Homepage, https://www.fileformat.info/format/wavefron- tobj/egff.htm, last accessed 2019/09/15. 7. Fbx File Documentation Homepage, https://www.autodesk.com/products/Fbx/overview,last accessed 2019/09/17. 8. Collada File Documentation Homepage, https://www.khronos.org/collada/, last accessed 2019/09/18. 9. USDZ File Format Explanation Topic, https://medium.com/techinpieces/all-about-apples- new-usdz-file-format-simplified-12dff29f3fc0, last accessed 2019/09/21. 10. Reality Converter Homepage, https://developer.apple.com/news/?id=01132020a, last ac- cessed 2020/05/14. 11. FbxConverterUI Homapage, https://www.autodesk.com/developer-network/platform-tech- nologies/fbx-converter-archives, last accessed 2020/05/14. 12. Blender Homepage, https://www.blender.org, last accessed 2020/05/14. 13. USDC File Format Specification Homepage, https://graphics.pixar.com/usd/docs/Usdz-File- Format-Specification.html, last accessed 2020/05/14. 14. Batyuk A., Voityshyn V., Verhun V.: Software Architecture Design of the Real-Time Pro- cesses Monitoring Platform. In: Proceeding of the Second International Conference on Data Stream Mining & Processing (DSMP), pp. 98–10. Ukraine, Lviv (2018). 15. Sydor A. R., Teslyuk V. M., Denysyuk P. Y.: Recurrent expressions for reliability indicators of compound electropower systems. Technical Electrodynamics No. 4., 47 – 49 (2014). 16. Seniv M., Yakovyna V., Symets I.: Software for visualization of reliability block diagram and automated formulation of operability conditions of technical systems. In: Proceedings of the ХІV-th Intern. Conf., MEMSTECH’2018, pp. 191–195. Ukraine, Polyana (2018). 17. Swift Language Homepage, https://www.apple.com/ru/swift/, last accessed 2020/05/14. 18. Three-Dimensional Examples Webpage, https://free3d.com, last accessed 2019/10/11. 19. XCode Program Environment Homepage with Documentation, https://developer.ap- ple.com/xcode/, last accessed 2019/10/11. 20. Paiva P. V. F., Machado L. S., de Oliveira J. C.: Simulation and performance evaluation of a distributed haptic virtual environment supported by the cybermed framework. Virtual Reality (SVR), XIII Symposium on IEEE, pp. 188 - 196. IEEE, Uberlandia, Basil (2011). 21. Velev D., Zlateva P., Steshina L., Petukhov I.: Challenges of using drones and virtual/aug- mented reality for disaster risk managemen. The International Archives of the Photogramme- try, Remote Sensing and Spatial Information Sciences, Volume XLII-3/W8, pp. 437–440. Gi4DM 2019– GeoInformation for Disaster Management, 3–6 September, Prague, Czech Re- public (2019). 22. Berezsky O., Verbovyy S., Pitsun O.: Hybrid Intelligent information techology for biomedical image processing. Proceedings of the IEEE International Conference of Computer Science and Information Technologies, CSIT’2018, 420–423 (2018). 23. Berezsky, O., Pitsun, O., Verbovyy, S., Datsko, T., Bodnar, A.: Computer diagnostic tools based on biomedical image analysis. 14th International Conference The Experience of De- signing and Application of CAD Systems in Microelectronics, CADSM 2017, pp. 388 – 391 (2017). 24. Park Y., Rue S.: Analysis on Smart City service technology with IoT. Korea institute of in- formation Technology Review 13(2), 31–37 (2015). 25. Boreiko O. Y., Teslyuk V. M: Developing a controller for registering passenger flow of public transport for the "smart" city system. Eastern-European Journal of Enterprise Technologies Vol. 6, 3(84), 40–46 (2016). 26. Lytvyn, V., Vysotska, V., Mykhailyshyn, V., Peleshchak, I., Peleshchak, R., Kohut, I.: Intel- ligent system of a smart house. In: 3rd International Conference on Advanced Information and Communications Technologies, AICT, 282–287 (2019).