(SCIENCES BUILDING of TUC) USING GAME ENGINE by Stefan P
Total Page:16
File Type:pdf, Size:1020Kb
DEVELOPMENT OF A LARGE SCALE, SMART, MULTI-PURPOSE VIRTUAL ENVIRONMENT (SCIENCES BUILDING OF TUC) USING GAME ENGINE By Stefan Petrovski Submitted to the Department of Electronics and Computer Engineering Technical University of Crete Examining Committee Dr Aikaterini Mania, Advisor Dr Aggelos Bletsas Dr Antonios Deligiannakis 1 Table of Contents 1 Introduction ................................................................................................... 9 1.1 Thesis Outline ....................................................................................................................... 11 2 Technical Background ................................................................................... 13 2.1 Introduction .......................................................................................................................... 13 2.2 3D computer graphics .......................................................................................................... 13 2.2.1 Modeling ........................................................................................................................... 14 2.2.2 Layout and animation ....................................................................................................... 14 2.2.3 Rendering.......................................................................................................................... 14 2.3 3D Models ............................................................................................................................. 14 2.3.1 Modelling Process ............................................................................................................. 15 2.4 Texturing – Importance of texture maps ............................................................................. 16 2.5 Game Engines ....................................................................................................................... 20 2.5.1 Game Engine Components ............................................................................................... 21 2.6 Three Modern Game Engines ............................................................................................... 21 2.6.1 Unity 3D ............................................................................................................................ 22 2.6.2 Torque 3D ......................................................................................................................... 22 2.6.3 Unreal Development Kit (UDK) ......................................................................................... 22 3 Software Architecture and Development Framework .................................... 24 3.1 Unreal Development Kit ....................................................................................................... 24 3.1.1 Rendering Engine .............................................................................................................. 24 3.1.2 Sound Engine .................................................................................................................... 25 3.1.3 Physics Engine ................................................................................................................... 25 3.1.4 Unreal Editor ..................................................................................................................... 25 3.1.5 Unreal Kismet ................................................................................................................... 28 3.1.6 Material Editor .................................................................................................................. 29 3.1.7 Sound Editor ..................................................................................................................... 30 3.1.8 Unreal Matinee ................................................................................................................. 31 3.1.9 Unreal Lightmass .............................................................................................................. 31 3.2 UnrealScript .......................................................................................................................... 32 3.2.1 The Unreal Virtual Machine .............................................................................................. 33 3.2.2 Class Hierarchy.................................................................................................................. 34 3.2.3 Timers ............................................................................................................................... 35 2 3.2.4 States ................................................................................................................................ 36 3.2.5 Interfaces .......................................................................................................................... 36 3.2.6 UnrealScript Compiler....................................................................................................... 37 3.2.7 UnrealScript Programming Strategy ................................................................................. 37 3.2.8 Configuration Files ............................................................................................................ 38 3.2.9 DLL Files ............................................................................................................................ 39 3.2.10 Input Manager .............................................................................................................. 39 3.2.11 Materials in UDK ........................................................................................................... 40 3.3 Scaleform GFx ....................................................................................................................... 41 3.3.1 Flash Applications ............................................................................................................. 43 3.3.2 Authoring Environment for Interactive Content............................................................... 44 3.3.3 ActionScript 3.0................................................................................................................. 45 3.4 Connection of the Graphical User Interfaces (GUIs) with the Application ......................... 47 3.4.1 Connecting using Kismet:.................................................................................................. 48 3.4.2 Connecting using - Unrealscript: ....................................................................................... 48 3.5 Autodesk 3ds Max ................................................................................................................ 49 3.5.1 Predefined primitives ....................................................................................................... 50 3.6 Setting up the Environment ................................................................................................. 51 3.6.1 Setting up Scaleform GFx .................................................................................................. 51 3.6.2 Setting up Microsoft Visual Studio with nFringe .............................................................. 52 4 Virtual Environment Creation ....................................................................... 53 4.1 World Geometry ................................................................................................................... 53 4.1.1 BSP .................................................................................................................................... 57 4.1.2 Static Meshes .................................................................................................................... 58 4.1.3 Importing the Static Meshes ............................................................................................. 62 4.2 Materials ............................................................................................................................... 64 4.2.1 Textures Vs Materials ....................................................................................................... 64 4.2.2 Textures ............................................................................................................................ 64 4.2.3 Material Creation .............................................................................................................. 65 4.3 Doors ..................................................................................................................................... 67 5 Functionality Creation (Scripting) .................................................................. 70 5.1 The Three Fundamental Classes ........................................................................................... 70 5.2 Application Data ................................................................................................................... 74 5.3 Detecting Focused Actors ..................................................................................................... 77 3 5.4 Lifts ........................................................................................................................................ 79 5.5 Menu System ........................................................................................................................ 98 5.6 Heads-Up Display (HUD)....................................................................................................