Integrating Spatial Audio in Unity

Contenu sonore pour les jeux vidéo / Conception sonore / Audio spatialisée

Live integration in the Unity Sample - the Wwise Adventure Game, coming soon!

Two years have passed since we first set foot in the fertile lands of Allegro Kingdom. Back then, numerous aspiring sound enthusiasts jumped to the rescue and fought to cleanse the lands from the evil essence! Now it’s time to venture back into the terrifying dungeons, to once again put a stop to the infestation.

WwiseAdventureGame

My name is Mads. I’m one of the two developers who worked on the Wwise Adventure Game (WAG), and today I have the pleasure to talk about our plans at Audiokinetic towards integrating Spatial Audio into the Unity sample, the Wwise Adventure Game. I’m also really excited to share that we plan on doing this with you, by demoing it via multiple 'Wwise Up On Air | Hands-On' live stream sessions to come. But before venturing into the deep pockets of Spatial Audio, let's refresh our memory a bit and talk about the Wwise Adventure Game.

Subscribe

What is the Wwise Adventure Game (WAG)?
An open source Unity project using Wwise, downloadable from the Wwise Launcher.

WwiseAdventureGame2

Want to learn about setting up the hooks in Unity, or looking for inspiration on granularly loading area Soundbanks? Access any object, script, animation, image or other resource. Take a quick look here.

How it all started! 

For me, it started back as a Sound and Music Computing student at AAU in Copenhagen, Denmark. Together with Jacob Lynggaard Olsen, we were about to take on our final year of our masters, but we were ever so ready to get out of school and into working with game audio. Luckily for us, when presenting one of our student games at a conference, we met Thomas Bärtschi. He seemed quite interested in our audio experimental student game.

WwiseAdventureGame3

Seizing the opportunity, we showed off our best work along with various video tutorials we'd made and mentioned that we were looking for an internship. Some time after, we got on a skype call with Simon Ashby and Benoit Santerre from Audiokinetic. This time, we came better prepared with a presentation on how we could make a new game tailored for the Wwise Unity Integration and on the 1st of May 2016 we got the wonderful message from Simon, that Audiokinetic had greenlit our internship, hereby approving production of the Wwise Adventure Game.  Well aware that we were officially to start in september, we jumped into preparing whatever we could beforehand.

WwiseAdventureGame4

Look close and you might see some similarities to how WAG looks like today!

A 'Wwise Unity Integration' sample 

Beyond making a resourceful Unity project, we knew it had to be centered around the Wwise Unity Integration. That said, the complete suite of the integration is quite comprehensive and we didn't want to overwhelm the beginner. We decided to break things down to the most common and fundamental audio integration methods - like posting Events, Setting Game Syncs, Reverb Zones and Callbacks. In order to keep things simple, we did not include Spatial Audio in the initial integration, but made preparations for its inclusion in the future.

Audio integration is often based on the contents of your Wwise project, so how do we make sure we include the most relevant audio design methods? Fortunately, Damian Kastbauer had already created a diverse and solid Wwise project with a variety of audio design methods called, the Wwise Project Adventure, and it became the basis for our audio integration, along with its name.

Side-note for programmers

While WAG was developed specifically for sound designers, we also had a side goal to make every script and system open source and commonly reusable. Because, what programmer doesn't reuse their own code, or gets inspired by someone else's code? We wanted everyone to be able to jump in, look at the code we used for callbacks, copy the parts that they would need and be able to simply paste/modify within their own Unity projects.

 

Four months later the game design was done, but it had grown into its own product and besides the music, there were still many audio files with temporary beeps and boinks! We became completely speechless when Damian and Audiokinetic mentioned getting Bay Area Sound on board  for a rundown of most sound effects, and boy did that take the game to new heights! 

The Wwise Adventure Game was published just before GDC 2018, alongside the Wwise-251: Performance Optimization & Mobile Considerations certification, and followed by the Wwise-301: Wwise Unity Integration certification half a year later. The Wwise Adventure Game became the sample accompanying the Wwise-301 learning material, helping users learn how to use a variety of components (such as AkAmbient, AkState, AkBank) along with making custom scripts.

Naturally while creating authentic circumstances for using the Wwise Unity Integration components, we needed various systems that could either support the game experience, or accomodate audio integration. To mention a few of these systems, we built...


  • Additive Scene Loading
  • AI & State Machines
  • Camera Movement
  • Collectables
  • Combat Targeting
  • Developer / Editor Tools
  • Dialogue
  • Game Speed Handling
  • Image Effects
  • Input
  • Inventory
  • Level of Detail
  • Localization
  • Menu
  • Navigation
  • Player Attack
  • Player Interaction
  • Questing
  • Skybox
  • Spellcasting
  • Teleportation
  • Time of day
  • Various Mobile Substitute scripts

If you see anything that interests you, all of these systems are included in the Wwise Adventure Game in their full extent, allowing you to open any of them up to get inspired or experiment with.

Getting started with the Wwise Adventure Game

The game features all sorts of classic features like magic, various types of weapons, quests, collectable coins and various types of enemies. Once the game is downloaded from the Wwise Launcher, you can choose to play it directly, open it in Unity and play it there, or even export it to your Android or iOS device for a mobile experience. Controls will switch automatically from keyboard + mouse to touch controls based on the platform you prefer, and you can either jump and forth into your questline, teleport, or make yourself invisible and focus on the important part -> Audio ;)

 

Today, the Wwise Adventure Game is a free and open source Unity sample that can be downloaded directly from the Wwise Launcher. It's a requirement for the courses, but it's also frequently being used for game audio demos. I've even used it quite often in the One Minute Wwise series since it's an actual game allowing you to consider how the "added feature" works in context within a particular project.

That said, the Wwise Adventure Game wouldn't have become such a powerful resource without the support and contributions from the Audiokinetic team, Damian, Bay Area Sound and other collaborators throughout this journey. 

You are now up to speed with how the Wwise Adventure Game came to be, but if you want to read more about it, you can check out the release blog or our student blog post. Now, let's fast forward to 2020 and talk about the new addition to the game - Spatial Audio!

Integrating Spatial Audio with you!

In light of the new Spatial Audio updates with Wwise 2019.2, we wanted to get Spatial Audio into the Wwise Adventure Game as well.  An old friend, Damian Kastbauer jumped to the rescue and offered that we demonstrate the integeration live on Audiokinetic's Twitch show Wwise Up on Air | Hands On!

WwiseAdventureGame5

The Wwise Up on Air | Hands On is a series of live streams where the true Wwizard - Damian Kastbauer, invites a friend and demonstrates hands-on how something works in Wwise. It's a strong learning resource allowing its audience to learn by actually doing something rather than reading about it, and it's just a lot of fun. 

We plan on demonstrating a step-by-step integration of Spatial Audio in Unity, while engaging with viewers at every step. We may even ask you what object to add reflections to, or what sounds to test out the spatial audio with. You will be able to ask questions along the way or even request certain demonstrations. 

You may be thinking that this sounds advanced, and I won't lie, it's something you will need to wrap your head around - but we will do this together, and not only will we have Damian's teaching expertise leading the way, we also plan on starting off with baby steps anyone can follow, and learn incrementally. Let's talk about some of the things we will be covering during this live stream.

Live integration of Spatial Audio in Unity

We'll be looking at some excellent examples where spatial audio had been integrated. We'll discuss why it could be relevant to include spatial audio in your games, and what considerations you may have to take into account beforehand. From there, we'll get practical!

We'll grab Wwise and the Wwise Adventure Game and slowly take one piece at a time until we've completed our first steps with spatial audio. Now, Wwise Reflect is based on reflections onto the in-game geometry, so naturally we'll discuss how to use shapes as reflective surfaces and to what degree it will contribute to the acoustic impression. Once we've added Spatial Audio to the first room, we'll start gluing it up with portals and occlusion. We'll discuss both the sound design and technical properties of being able to listen to sounds from next door and how it can contribute to a more immersive experience. As icing on the cake, we'll look at concepts like diffraction and how to color your rooms with textures and room tones.

Maybe this sounds complex, maybe it doesn't, nevertheless we want you to be a close part of this process so you can let us know. Our plan is to stream at least 2 live sessions. From there we'll see how much content we can squeeze in and what kind of feedback we'll receive. 

Subscribe

Joining Damian Kastbauer on this journey from the Audiokinetic team is Thalie Keklikian, Software Developer, Benoit Santerre, Wwise Integrations Lead, and I, Mads Maretty Sønderup, Integrations Educator and Content Creator. We will alternate in assisting with the hands on integration while answering your questions. If you have already completed the Wwise-301 certification, these sessions will be the last piece of the 'Wwise Unity Integration' puzzle, where we take a look at some of the following components.

AkEmitterObstructionOcclusion

AkRoom-2

AkRoomAwareObject-3

unnamed-4

AkRoomPortalObstruction-5

AkSpatialAudioDebugDraw-6

AkSpatialAudioListener-7

unnamed-8

This is a great opportunity to get yourself up-to-speed with using these components, understanding when not to use them, and to ask those Spatial Audio integration questions that have been burning inside of you. 

Changes in Wwise Adventure Game

Following the live stream sessions, the Wwise Adventure Game will be updated, and no place seems more ideal to add Spatial Audio, than the dark Dungeon below the Allegro Kingdom!

WwiseAdventureGame6

The Audio menu will receive multiple new settings. Not only will you be able to experience the dungeon with Spatial Audio, you'll also get a variety of Early Reflection settings, including hotkeys and a placeable emitter (Radio).

WwiseAdventureGame7

I have so much more to tell you, but let's keep some of that suspense to the live stream sessions! Until then, here's a quick teaser.

Community driven every step of the way

While this is just the tip of the iceberg for both the Spatial Audio live streams and the Wwise Adventure Game, this is a collective project with you - the community. Maybe there's a scenario in the Wwise Adventure Game you'd like us to try out? Perhaps you'd like Damian to feature something or someone in particular on the Wwise Up on Air, or Wwise Up on Air | Hands-On show? Let us know! Reach out to us at openears@audiokinetic.com.

 

Mads Maretty Sønderup

Integrations Educator and Content Creator

Audiokinetic

Mads Maretty Sønderup

Integrations Educator and Content Creator

Audiokinetic

Wwise educator, experimentalist, and evangelist. Mads wrote the Wwise-251 & Wwise-301 courses, was one of the main developers of the Wwise Adventure Game and the creator of the One Minute Wwise series.

 @madsmaretty

Commentaires

Laisser une réponse

Votre adresse électronique ne sera pas publiée.

Plus d'articles

Loudness Processing Best Practices, Chapter 2 : Loudness, dynamics and how to process them.

Translator's Note This is the second chapter of the Loudness Processing Best Practice for Games...

26.9.2017 - Par Jie Yang (Digimonk)

Image Source Approach to Dynamic Early Reflections

In our previous blog, Simulating dynamic and geometry-informed early reflections with Wwise Reflect...

14.11.2017 - Par Thalie Keklikian

Blade Runner: Revelations

Blade Runner: Revelations, an interactive mobile VR game based on the iconic Blade Runner franchise...

19.6.2018 - Par Hexany Audio

How Sound Designers Use PureData + Heavy to Develop DSP Plug-ins - Part 2

In Part 1, I explained how to create a “blueprint” using the Patch file. Now let me show you how to...

15.10.2019 - Par Chenzhong Hou (侯晨钟)

Infusing The Sound of Distance into Mohawk Games’ Old World

Inception When AudioTank was first approached by Mohawk Games to create and implement the sound...

9.6.2020 - Par Stephen Frank

Getting Ahead of the Game Utilizing Music Design Templates in Wwise

Guy Whitmore, Composer and Audio Director at Foxface Rabbitfish dove deep into current industry...

18.9.2020 - Par Guy Whitmore

Plus d'articles

Loudness Processing Best Practices, Chapter 2 : Loudness, dynamics and how to process them.

Translator's Note This is the second chapter of the Loudness Processing Best Practice for Games...

Image Source Approach to Dynamic Early Reflections

In our previous blog, Simulating dynamic and geometry-informed early reflections with Wwise Reflect...

Blade Runner: Revelations

Blade Runner: Revelations, an interactive mobile VR game based on the iconic Blade Runner franchise...