top of page
Writer's pictureDavid Flores

Learning Unreal: Audio

Updated: Aug 20, 2019

In today's Learning Unreal post, I'm showing off some of what I've learned in regards to adding audio to Unreal games. As always, if you want to follow along with the same tutorial that I'm using, you can find it here.

This section of the tutorial continues the adventure of our adorable cloud-hopping muffin friend, now giving the game several different types of audio to enhance our skyward journey.


The first thing you'll notice is that there's now some background piano music, which plays on a constant loop. Nice and simple.


The second audio clip shown off in the video above is the sound effect that plays every time the muffin takes a step. This effect was implemented by adding some Notifies to the muffin's walking animation so that it plays the step sound every time one of his feet touch the ground.


The third thing you'll hear are the popping SFX that plays at various pitches when the muffin jumps into a cloud. This was implemented using an Unreal Sound Cue, which let us pass a single audio clip through a Modulator, allowing the clip to be played at a random pitch within a given range each time it's played.


Another thing you might notice with the cloud popping is that the audio is actually Spatialized, which allows it to give the impression that the audio exists in 3D space. If you listen to the video closely while wearing headphones, you can actually hear the clouds popping from what sounds like different locations in space.


Spatialization is just one kind of audio Attenuation that can be performed in the Unreal Game Engine. Another kind is Falloff, which is used by the rain clouds. The rain sound clip is loudest when the muffin is right next to the raining clouds, and it fades off as you get farther away from the rain, until you can no longer hear it.


The last thing that is shown off in the video is controlling the volume of different parts of the audio using UI controls. The key trick to getting this to work is by separating each of the included audio tracks into separate Sound Classes. In this instance, we have a Music Class (which contains the background music) and an Effects Class (which contains all of the sound effects). Both UI Sliders are connected to a Sound Mix, which is another key component to this feature. When the value of the UI Sliders are changed, the value is passed to the Sound Mix, which then changes the volume level for all of the audio that is contained within the corresponding Sound Class, which you can hear in the video as the music and the footsteps get quieter and louder as the sliders are moved.

 

I created a new YouTube account just to share that video.

20 views0 comments

Comentarios


bottom of page