Thesis Template
Total Page:16
File Type:pdf, Size:1020Kb
Bachelor’s thesis Information and Communications Technology 2020 Aissa Nylund OPTIMIZATION OF ARCHVIZ PROJECTS FOR STANDALONE VR-DEVICES BACHELOR’S THESIS | ABSTRACT TURKU UNIVERSITY OF APPLIED SCIENCES Information and Communications Technology 2020 | 37 pages Aissa Nylund OPTIMIZATION OF ARCHVIZ PROJECTS FOR STANDALONE VR-DEVICES Architectural visualization, ArchViz for short, is the practice of modeling images and videos from architectural plans and blueprints. Its goal is to make to scale visualizations of buildings and spaces that can then be used for example as marketing material. The modern 3D-part of ArchViz focuses mainly on producing beautiful and often photorealistic images and videos, but not necessarily optimized lightweight solutions for virtual reality (VR) experiences. This thesis studies the use of game engines in ArchViz and its focus is on using them to create light but photorealistic applications that are suitable for VR. The thesis was carried out in two parts. The first part was more theoretical and consisted of gathering information on available technology and comparing these technologies to find out which ones are the most suitable for VR ArchViz projects. The practical part of the thesis was building an optimized Unreal Engine Level of the thesis commissioners Turku Game Lab’s renovated office space. Turku Game Lab is a game research department of Turku University of Applied Sciences. The finished project was analyzed to see which parts took the most graphical computation time and so were the most important to optimize. The research and practical work complemented each other with the researched optimization methods being tested at the Game Lab Level and the best methods being applied to the final design. As a result, the commissioner has an optimized part of the project to apply to a larger whole. KEYWORDS: Optimization, Virtual reality, Computer graphics, Videogame graphics, CAD OPINNÄYTETYÖ AMK | TIIVISTELMÄ TURUN AMMATTIKORKEAKOULU Tieto-ja viestintätekniikka 2020 | 37 sivua Aissa Nylund ARCHVIZ PROJEKTIEN OPTIMOINTI ITSENÄISILLE VR LAITTEILLE Arkkitehtoninen visualisointi, lyhyesti ArchViz, on arkkitehtuurisista piirroksista kuvien ja videoiden tuottamista. Sen tavoitteena on tuottaa mitoiltaan realistisia rakennusten ja tilojen visualisointeja, joita voidaan käyttää esimerkiksi markkinointimateriaalina. ArchVizin moderni 3D-osa keskittyy pääasiassa kauniiden ja usein fotorealististen kuvien ja videoiden tuottamiseen, mutta ei välttämättä virtuaalitodellisuuskokemuksiin (VR) sopiviin optimoituihin kevyisiin ratkaisuihin. Tässä opinnäytetyössä tutkitaan pelimoottorien käyttöä ArchVizissä ja keskitytään erityisesti kevyiden mutta fotorealististen applikaatioiden luomiseen, jotka sopivat VR-laitteille. Opinnäytetyö suoritettiin kahdessa osassa. Ensimmäinen osa oli teoreettista ja koostui tiedon keräämisestä käytettävissä olevasta teknologiasta ja näiden teknologioiden vertaamisesta jotta saataisiin selville, mitkä niistä ovat sopivimpia VR ArchViz -projekteihin. Opinnäytetyön käytännöllinen osa koostui optimoidun Unreal Engine -tason rakentamisesta opinnätetyön tilaajan Turku Game Labin uudistetuista toimitiloista. Turku Game Lab on Turun Ammattikorkeakoulun peliteknologiaa tutkiva osasto. Valmis projekti analysoitiin jotta pystyttiin havaita mitkä projektin osat käyttivät eniten graafista laskenta-aikaa ja täten tarvitsevat eniten optimointia. Tutkimus ja käytännön työ täydensivät toisiaan sillä tutkittuja optimointimenetelmiä testattiin Game Lab Unreal projektissa, ja parhaiten toimivat niistä otettiin käyttöön viimeisessä versiossa. Opinnäytetyön seurauksena opinnäytetyön tilaajalla on optimoitu projektin osa jonka voi lopulta liitää suurempaan kokonaisuuteen. ASIASANAT: Optimointi, Virtuaalitodellisuus, Tietokonegrafiikka, Peligrafiikka, CAD CONTENT LIST OF ABBREVIATIONS (OR) SYMBOLS 6 1 INTRODUCTION 1 2 THE TECHNOLOGY NOW 3 2.1 Basics of 3D graphics 3 2.2 Using CAD models in game engines 3 2.3 Game engines 4 2.4 Self-contained or standalone VR devices 8 2.5 CAD software 10 3 USING CAD MODELS IN GAME ENGINES 11 3.1 Optimization process 11 3.2 Keeping photorealism in mind 13 4 PLANNING THE WORK 15 4.1 Visualization of Turku Game Lab 15 4.2 Goals and requirements 15 4.3 Comparing testing methods 15 5 DEVELOPING THE OPTIMIZATION PROCESS 18 5.1 Optimization processes in Blender 18 5.2 The process of building an optimized Unreal Engine Level 19 5.3 Optimization with the GPU Visualizer 23 6 CONCLUSION 25 REFERENCES 27 PICTURES Picture 1 Startup templates for new projects in Unreal Engine 4 Picture 2 Startup templates for new projects in Unity 5 Picture 3 Combining multiple object’s textures together reduces draw calls from 22 to 1. (Jackson et al 2019) 11 Picture 4 Example of 3D model optimized from CAD to GLB (GL Transmission Format filetype) (Jackson et al 2020) 13 Picture 5 Example of Z-fighting in coplanar faces (Wikipedia 2020) 14 Picture 6 OVR Metrics Tool working in Performance HUD mode (Oculus 2020) 16 Picture 7 Unreal Engine GPU Visualizer visualizing a single Frame’s length (Zoomed in view of the relevant information in red square) 17 Picture 8 Top: the Game Lab model as is. Bottom: The optimized Game Lab model. 18 Picture 9 Top: Freshly imported .FBX in Unreal. Bottom: Removed unnecessary geometry. 19 Picture 10 Lightmap density view mode 20 Picture 11 Lightmap density optimized 20 Picture 12 Test lightbake and all the lighting components assigned. 21 Picture 13 Nav Mesh visualized 22 Picture 14 The first frame analysis of the project 23 Picture 15 Second frame analysis after post processing was fixed 24 TABLES Table 1 Comparisons between chosen game engines. 7 Table 2 Comparisons between chosen standalone VR devices (Wikipedia 2020, Lenovo 2020) 9 Table 3 Programs suitable for cleaning up and/or converting CAD files (Jackson, BryceHo, Manwaring, Dunham Kroes, ReneeW-CPub. 2020) 12 LIST OF ABBREVIATIONS (OR) SYMBOLS VR Virtual reality experienced through virtual reality devices called VR glasses/goggles/headsets. Standalone VR Virtual reality experienced with a standalone virtual reality device, meaning it doesn’t need external devices or cables. Self-contained VR Same as Standalone VR Mobile VR Like standalone VR, but uses a smartphone as the processor and screen. AR Augmented reality. Adding digital content into real life imagery in real time. ArchViz Architectural visualization. The practice of creating 2D and 3D images and models based on blueprints and plans of an architect. CAD Computer aided design. BIM Building information model. Polygon A primitive plane that has a finite number of edges. NURBS Non-Uniform Rational B-Splines. FPS Frames per second. A unit that shows how many frames per second the device is displaying on a screen. Often used in performance testing. Ray tracing Rendering technique that calculates the path light would take from its source to the viewers eye. The different bounces the simulated light ray takes create reflections, shadows and refractions. (Nvidia 2020) Raster rendering The conventional way of rendering 3D objects into 2D screens. (Nvidia 2020) Real time lighting Lighting simulated in real time by ray tracing. Baked lighting Lighting simulated by creating lightmap textures for objects. The textures need to be generated only once, but cannot be edited in runtime. Plugin An extra addition to software, that can be from an outside source. Adds more functionality or modifies existing functionality of the parent software. Topology Topology is the mathematical study of the properties of 3D models that are preserved through deformations like twistings, and stretchings of objects. (Weisstein 2020) UV map A way to present a 3D object’s surface on a 2D plane, used in wrapping textures onto a 3D model’s surface. The U and V are used as coordinates for the 2D plane to avoid confusion, since 3D space already uses X and Y. (Denham 2020) Level In this thesis, capitalized Level refers to Unreal Engines component that is a collection of Static Meshes, Volumes, Lights and Blueprints 1 INTRODUCTION Architectural visualization (ArchViz) is the practice of creating appealing images and videos from architectural plans and blueprints. A common ArchViz project consists of creating the concept images of buildings, building renovations, floor plans, and interior decoration. As with any concept work, it is crucial to have a fast workflow and easily modifiable projects, this is why ArchViz has moved to digital 3D software. When working in 3D, especially with Computer- aided design (CAD) software, creating, lighting, and texturing models is fast and efficient. Still, CAD software isn’t made for creating so-called game-ready assets, meaning the models created with CAD software are usually too heavy, and full of redundant information, for real- time applications like games. Virtual reality (VR) has become a popular tool for visualizing concepts and spaces as it is a powerful way of displaying a project from all angles and on a real-life scale. Because of this ArchViz companies have started to research VR solutions. However, VR requires real-time graphics, which must be quite optimized to run on devices that are comfortable and easy to demonstrate concepts on for clients. Rendering the single images of videos doesn’t have the optimization problem, as all the work has to be done once, and the project can be left to render even outside working times. An easy middle-ground for lightweight VR solutions is to render a 360-degree image of the project and show that through a VR device. This