Using FMOD Studio with Unity
Total Page:16
File Type:pdf, Size:1020Kb
David Abbott Using FMOD Studio with Unity Bachelor of Business Administration Autumn 2018 Tiivistelmä Tekijä: Abbott David Työn nimi: FMOD Studion käyttö Unityn kanssa Tutkintonimike: Tradenomi, Tietojenkäsittely Asiasanat: FMOD Studio, äänimoottori, väliohjelmisto, Unity, äänisuunnittelu Tämä opinnäytetyö käsittelee FMOD:n käyttöä yhdessä Unity pelimoottorin kanssa. Opinnäytetyössä annetaan ohjeet videopelien perusäänijärjestelmien sekä joidenkin enemmän kehittyneiden järjestelmien luomiseen kuten äänijärjestelmä askeläänille. Tälle opinnäytetyölle ei ole ulkopuolista tilaajaa. Opinnäytetyön lähteet koostuvat FMOD-käyttöoppaasta sekä muista aiheeseen liittyvistä verkkosivuista. Tässä työssä on käsitelty FMOD Studion ja FMOD Studio API:n tärkeimpiä ominaisuuksia käyttämällä lähdemateriaalia ja kokemustani useista projekteista, joissa olen käyttänyt FMOD Studio ohjelmistoa. Opinnäytetyön teoreettinen osa sisältää lyhyen katsauksen FMOD:n ominaisuuksista, lisenssoinnista ja miten se tukee eri alustoja, tiedostomuotoja ja pelimoottoreja. Empiirisessä osassa on esimerkkejä useimmista FMOD Studio -ominaisuuksista ja siitä, miten niitä voidaan käyttää yhdessä Unity-pelimoottorin kanssa. Ensimmäisessä kappaleessa esitetään opinnäytetyön tavoitteet ja viimeisessä kappaleessa esitetään opinnäytetyön johtopäätökset, jossa myös mainitaan eräitä aiheita, jotka jätettiin pois opinnäytetyön aihealueen rajoittamisen vuoksi. Abstract Author: Abbott David Title of the Publication: Using FMOD Studio with Unity Degree Title: Bachelor’s Degree in Business Information Technology Keywords: FMOD, audio engine, middleware, Unity, sound design This thesis covers the use of FMOD Studio in conjunction with the Unity game engine to create the basic audio systems most needed in a typical video game, as well as some of the more ad- vanced systems that might be needed such as a footstep audio system. This thesis was not commissioned by an outside party. The sources of the thesis consist of the FMOD user guide, as well as various other websites related to the topic. Using the source material and my experience working with FMOD Studio on multiple project, the most important features of FMOD Studio and the FMOD Studio API have been covered in this thesis. The theoretical section of this thesis contains a brief overview of FMOD, what its features are, the licensing terms under which it can be used and the support for different platforms, file formats and game engines it provides. The empirical section contains in-depth explanations and exam- ples of most of the features of FMOD Studio and how they can be used in conjunction with the Unity game engine. The first chapter contains the objectives and goals of this thesis while the last chapter contains the conclusions of the thesis including certain topics that were left out due to limiting the scope of the thesis. Contents 1 Introduction .................................................................................................................. 1 2 What is FMOD? ........................................................................................................... 2 2.1 General overview ........................................................................................... 2 2.2 Features ......................................................................................................... 2 2.3 Licensing ........................................................................................................ 3 2.4 Support .......................................................................................................... 3 2.4.1 Platforms .......................................................................................... 3 2.4.2 File formats ...................................................................................... 4 2.4.3 Game engines .................................................................................. 4 3 Setup ........................................................................................................................... 5 3.1 Downloading the necessary files and installing FMOD Studio ........................ 5 3.2 Setting up our Unity project ............................................................................ 5 3.2.1 Integrating FMOD with Unity ............................................................. 5 3.3 Creating an empty FMOD Studio project and setting the project path within Unity..................................................................................................................... 6 4 The basics ................................................................................................................... 7 4.1 Platform and audio quality settings ................................................................. 7 4.2 Creating events .............................................................................................. 7 4.3 Editing events............................................................................................... 10 4.3.1 Instruments .................................................................................... 10 4.3.2 Modulation ...................................................................................... 13 4.3.3 Parameters ..................................................................................... 15 4.3.4 Trigger behaviour settings .............................................................. 17 4.4 Event playback ............................................................................................. 18 4.4.1 Method 1: Studio Event Emitter ...................................................... 18 4.4.2 Method 2: The FMOD API .............................................................. 19 4.4.3 Oneshot event ................................................................................ 19 4.4.4 Instanced event .............................................................................. 20 5 The FMOD Studio Mixer ............................................................................................ 21 5.1 Group buses ................................................................................................ 21 5.2 Return buses ................................................................................................ 21 5.3 FX ................................................................................................................ 22 5.4 VCAs ............................................................................................................ 22 5.5 Master bus ................................................................................................... 22 5.6 Snapshots .................................................................................................... 23 5.6.1 Reverb snapshots .......................................................................... 23 5.6.2 Pause snapshot.............................................................................. 24 6 Profiling & Live Update ............................................................................................... 27 6.1 Profiling process ........................................................................................... 27 6.2 Using Live Update ........................................................................................ 28 7 Object length issue..................................................................................................... 29 7.1 What issue? ................................................................................................. 29 7.2 Preparation in Unity ...................................................................................... 29 7.3 Scripting ....................................................................................................... 30 8 Music ......................................................................................................................... 33 8.1 Logic markers............................................................................................... 33 8.2 Adaptive music ............................................................................................. 38 8.2.1 Creating the FMOD event ............................................................... 38 8.2.2 Scripting ......................................................................................... 40 9 Footstep system ......................................................................................................... 42 9.1 What is this? ................................................................................................ 42 9.2 Preparation in Unity ...................................................................................... 42 9.3 Creating the FMOD event............................................................................. 42 9.4 Scripting ....................................................................................................... 43 9.5 Character setup ............................................................................................ 47 10 Conclusions ............................................................................................................. 48 List of references .......................................................................................................... 49 List of Symbols API – A software intermediary that allows two applications to communicate with each other. The acronym stands for “Application programming interface”. Bus – A channel that collects together multiple