top of page
Malachi Gregory

Interstellar Integration | Unity

Project Overview

With this project, I took to designing and integrating the audio for a 3D Unity map. My goal was to define different zones of the map with unique sonic signatures while maintaining cohesion throughout the entire sonic environment. I purchased the spaceship map through the unity asset store, and it came equipped with a character controller. All my sounds were recorded and edited in Reaper.


Changing States

My first step was to define the different regions within the map. I opened the map and began to move around, taking note of the environment and distinguishing elements within different sectors. You spawn in a large hangar, and before you is a hallway that diverges to the left and right.


On the left are smaller rooms full of computers, and on the right are 3 more unique areas. Heading down a flight of stairs leads you to a large windowed space. Going right and turning before the last door leads to a massive spaceship docking station. And lastly, continuing all the way to the right opens up to what seems to be a massive shaft, where an endless drop looms below.


These 3 areas became the focus of my design. I created an empty parent game object to organize my audio region prefabs. Each zone is a box collider set to be a trigger to respond to the player's entrance into the zone and change the audio state (Pic 1). To facilitate the state change, I wrote a script "SetState" (Pic 2).

Audio Region Locations


Region State Change Script


After gathering information from the map, I went to Wwise to begin the audio implementation. I decided to use a switch container to perform the ambience changes, and my end system blended switches and states as I relied on a state group to organize the regions. Overlapping elements were preserved between states to add a sense of unity between different rooms and keep the soundscape consistent with the setting.


Region Switch Container


Lastly, I added different reverbs to match the spacious-ness of rooms. "EmptyVRB" is for the Shaft, and varying amounts of "SpaceVRB" are applied to the windowed area and spaceship based on their proximity to the edge of the map/space zone. "MainVRB" simply is the default reverb for the space station.


Region-Specific Reverb


A live demonstration of the region changes can be heard below. My next step was further grounding the player in the environment through the addition of footsteps.


Space Station Regions Demo


Tracing Steps

Now that the regions were set up, I opened the map again and began to move around. This time, I paid particular attention to the player's movement speed, sprint speed, and terrain I was walking over. Most of the map consisted of the same material except for a few areas that were metal.


I went into Reaper and designed sounds for the two materials, and imported the files into Wwise. Low-pass, volume, and pitch randomization was used to add variation to the samples, in tandem with changing reverb amounts based on the room state.


Footstep Switch Container


The next step was implementation. My main challenges lied in there being no player model to sync post events with animation, and I had to work with a pre-existing code system. After researching methods of implementing footsteps in games, I learned of what seemed to be the gold standard ray-cast method. I decided this method was best over setting triggers for every floor object due to the sheer quantity of floor objects in the level - and massive overhead that would be required should I make any changes to the labelling system.


I began to examine the code and look for spots I could introduce my Wwise additions. My first course of action was to tag the metal objects (stairs, grates, etc.) as "Metal" in Unity and define strings and variables Wwise needed to play my sounds.


Ray-Cast Script Part 1


Setting up the ray-cast system began simply, but became more complicated as I needed to account for the two terrain types. I had a tough time getting the ray-cast to detect the metal objects at all. This was in fault due to the ray-cast sending from too high. By sending from halfway down the player, I found it much more reliable in detecting the material and responding to whether or not the player was airborne.


Ray-Cast Script Part 2


Looking over more of the code, the overall ground movement was tied to a vector that combined the float value based on the previously defined walk and run speed values. Since the movement was dependent on this constant evolving value, the best solution I found was to have them post on cooldown relative to the overall move speed. I achieved this by creating a float of "footstepsCooldown" that worked in tandem with a bool "canPlayFootsteps" (Pic 1).


The main purpose of the bool was to make sure too many footsteps samples did not trigger at once. The script relied on an IEnumerator coroutine which would wait a specific amount of time before allowing a second footstep sound to be triggered.


Ray-Cast Script Part 3


After lots of tweaking, research, and experimentation, I was successful in building my first ray-cast based footstep system. Below are the footsteps in action!


Footstep Terrain Types Demo


Opening Doors

Back to the rest of the map, littered throughout are sci-fi style doors. The opening is based on an animation over physics, and came with a pre-existing audio source. I simply disabled the Unity audio source and added a simple addition to the script that would post my sound at the beginning of the animation.


Altered Door Detection Script


The real meat of this portion of the design lied in Wwise. Originally I created 5 different sounds for the door opening and closing, aiming to have separate sources for each instance. But, there was only one animation made for the doors, the "door open" animation was just reversed when you were outside of trigger detection.


Door Random Container


Not wanting to lose half the sounds I designed, I made a snap adjustment. By creating a parent random container I was able to use all my door sounds without altering the events already created, demanding little alterations to be done in Unity. To better place the door sounds within the player's soundscape, the next step was adding attenuation curves to the actor mixer. I relied on volume, low pass, and spread curves to best simulate the sensation of spatialization and muffling when a sound is out of earshot.


Door Attenuation Curves


Below is a showcase of how the doors function within the space station.


Doors Live Demo


To The Stars

The final step of the project was adding unique sonic signatures to the remaining 2 regions. I began with the lower windowed area. When I would sit in this region, I'd imagine ship noises and creature-like ambiences that could resonate in the chamber. Sounds like these add a bit of intrigue to what would be a boring environment, pressing the imagination of the player.


Space Presence Emitter


Space Presence Container


I embedded the audio source slightly behind the window with a tighter attenuation curve to diegetically draw player attention to the window itself.


Space Presence Attenuation


Space Presence Emitter Live Demo


Lastly, I added my created sound for the spaceship. I wanted the ship to activate upon the player's entrance to the room, so I added a trigger to the audio prefab.



Spaceship Emitter Zone


In Wwise, I designed the spaceship sound within a sequence container, segueing from the ignition one shot to a looping hum of the ship's engine via crossfade.


Spaceship Sequence Container


And the final step was adding low pass, volume, and pitch attenuation curves to the engine source so the ship's sound naturally filled the hangar space.


Spaceship Attenuation Curve


Below is the final demonstration of the space ship, this was probably my favorite part of the map to design and implement.


Spaceship Live Demo


Postmortem

In this final retrospective, I am pleased with how the project turned out. In terms of potential improvements, I feel like the overall mix of the sound sources can use adjustment (in my opinion, footsteps and ambiences are a bit loud). If I had more time during development or revisited the file, I'd go to some of the computer rooms and implement the sounds I designed for them.



And originally, I conceptualized adding adaptive music to the scene. The theme would remain consistent harmonically, but change timbrally dependent on the. region you were in, to further distinguish the areas of the space station. Unfortunately, this was not in the project's scope within the time limit and had to be cut. Nonetheless, I am content with my work on this project, and the programming challenges I encountered improved my skills for future endeavors.



Comentários


bottom of page