Skip to content

Creating the SoundBank in Wwise

DarthParametric edited this page Oct 16, 2024 · 6 revisions

Getting Started

If you are completely unfamiliar with Wwise, it is strongly advised that you make use of the official tutorials which cover the basics of the program's layout, conventions, and workflow. Have a look at the "Wwise-101" introductory tutorial series page on their website or its playlist on their Youtube channel.

A Wwise version that is compatible with the target game is required. These are as follows:

  • KM: 2016.2.x
  • Wrath: 2019.2.x
  • RT: 2022.1.x

Any of the minor sub-versions (e.g. for Wrath, 2019.2.15) should be suitable. Download the Audiokinetic launcher (requires creation of an account) and install Wwise. It's recommended to create and archive an offline installer (~500mb) for potential later use. Install these to separate folders, as the launcher has a habit of deleting existing offline installers it finds in the same folder.

N.B.: Keep in mind that the free version of Wwise has a limit of "200 media assets" per soundbank. While this notionally doesn't include duplicates, what characterises a duplicate is determined by the source folder/origin of the original media file. In other words, the same file imported from two separate locations would not be considered a duplicate. Therefore be cautious in how you arrange your source audio before importing. If you need to duplicate a sound, you can "copy and paste" it within Wwise and that will not count against the limit. That said, 200 files should be more than sufficient for a custom soundset. The vanilla PC soundsets only average around 125-130 audio files each for Wrath, for example. RT does have several more Events than KM and Wrath though.

Wwise Project Overview

In the Wwise project folder, double-click on the wproj file to open it in Wwise. You will find the project has a pre-generated set of Events matching your project name. These match the AkEvent names in your blueprint in the C# project. Additionally, all the necessary audio buses and game syncs have been created to match the settings used by Owlcat for the vanilla PC soundsets, along with the various containers that make use of these to house your audio.

Go to the Audio tab. In the Actor-Mixer Hierarchy, go to Default Work UnitVoices_Root. As the name suggests, this is the root container for your custom audio. Inside it are two sub-containers. The first, Asks, or more specifically it's child container <YourProjectName>, will hold the majority of your audio, all the sounds that will occur during actual gameplay. The second, Character_Creator_Sample, is purely for the preview sounds heard when clicking on the voice in the character creator. They are split this way because the preview sounds use a different audio bus from the in-game sounds. Note that the vanilla soundsets use a separate dedicated soundbank to hold all the PC voice preview sounds. Since our bank will always be loaded into memory we don't need to create a separate preview bank.

Go to the Events tab. You'll see that under the Voices_Asks_ENG work unit you have a PlayableCharacters folder, which has Demos and <YourProjectName> sub-folders. The former holds a single Event, the PreviewSound specified in your Asks blueprint. The latter holds all the Events for the individual Barks in your Asks blueprint. Note that you can reorganise the Events and their folder structure however you see fit. Their hierarchical arrangement doesn't matter, only their names and linked sounds. An Event name must be identical to the name of its corresponding AkEvent in the blueprint. They can be changed if you wish so long as they match. Note that when creating a new project from scratch you would need to link your sounds to an appropriate Event manually, but the template comes with the Events already pre-populated. You will only need to assign them to a soundbank.

Go to the SoundBanks tab. Right click on the Default Work Unit, and unfold it. You will see that the necessary soundbanks have already been created for you. The primary soundbank is <YourProjectName>_GVR_ENG, but if you wish to change it you can use any arbitrary bank name as long as you edit the name specified in the project's Ask blueprint to match.

Wrath and RT also have a second dedicated bank for the samples played in the character creator. Again, this can be named whatever you like, but by default it is <YourProjectName>_Test. As before, if you change this make sure to edit the project to match. Specifically, near the top of public static class Soundbanks:

const string PreviewName = "<YourProjectName>_Test";

Don't confuse this with the entry in the Asks blueprint, which is the Event name. If in doubt, it is recommended that you stick to the predefined names the template uses. Note that this doesn't apply to KM. It doesn't require a second bank since it automatically loads all player banks when the game starts. This is due to vanilla KM banks streaming external WEM files rather than bundling them as Wrath and RT (and our mod) do, thus not requiring a dedicated "demo" bank.

As we saw in the Overview of Character Barks, each Bark is an Event, or set of Events, with a chain of child containers that end with the actual audio files. There are three types of containers we'll be dealing with: the Actor-Mixer, the Switch Container, and the Random Container.

Assembling the Soundset

To begin, click on the Voices_Root container and go to the Conversion tab. The first setting you may wish to adjust is Loudness Normalization. This has been enabled in the project template, but you may wish to disable it depending on the nature of your source audio. Below that is the Make-Up Gain setting. This defaults to 0dB and typically should be left there. However, if you wish to universally adjust the gain of the audio in Wwise rather than editing the source audio files externally you can do so here. Note that alternatively you can adjust this in the equivalent settings of child containers. Lastly, at the top is the Conversion Settings drop-down, which is where you specify the output compression settings of your audio (i.e. the specific codec the WEMs use). Your two primary choices are Vorbis (used by the vanilla soundsets) and Opus. Wwise provides a summary of the available choices and a blog page on the pros and cons of each.

Vorbis is the easiest because there are a number of default presets for it. Click on the >> button and go to Factory Conversion Settings → Vorbis and either Vorbis Quality High or Vorbis Auto Detect High. Opus requires manual configuration. From the >> button, choose Default (Custom) and then click the Edit button on the right. Choose Opus from the Format drop-down. By default the other settings will preserve the values of the input audio, so it may require some experimentation to achieve the best balance of compression vs quality. Using one of the Vorbis presets is recommended.

The Character Creator Sample

In the Audio tab's Actor-Mixer Hierarchy go to the Character_Creator_Sample container. It has a single child, a Random Container named <YourProjectName>_Test. This container will hold all the audio files that will play when previewing the soundset in the character creator's Voice list. Note that the template has default Make Up Gain of -3dB set in the Conversion tab. You'll need to adjust this as necessary to have your samples match the volume of the vanilla soundsets in the character creator.

Right-click on <YourProjectName>_Test and choose Import Audio Files. Choose a small selection of audio files that you feel are representative of your soundset. The vanilla soundsets average 6-8 sample sounds each. Once imported, in the <YourProjectName>_Test's General Settings tab change the Avoid repeating last X played to half the number of your imported files (i.e. if you have 6 sample files, set the value to 3). This will help reduce the instances of repeated lines when continuously clicking on the soundset in the character creator.

In the SoundBanks tab, double click on your <YourProjectName>_Test soundbank, switch back to the Events tab and drag the <YourProjectName>_Test Event into Add tab of the SoundBank Editor window. For KM you only have a single bank as noted above, so drag the preview Event into your main bank instead. Note that you can also drag and drop the Event from the Event Viewer list in the bottom lefthand corner, depending on which editor layout you are using.

Your character creator sample set is now complete. With the event added to the bank, you can freely add or remove sounds from the random container and everything will be dynamically updated the next time you generate your soundbanks (i.e. export).

Barks: Simple Random

From our Asks blueprint overview, we saw that the Aggro Bark has three CombatStart Events. Because these Events only occur in active combat, they don't require any stealth checks, so they simply link directly to individual random containers. You'll see the three <YourProjectName>_CombatStart_01/02/03 containers in the top half of the <YourProjectName>'s children (Wwise sorts by type first, then alphabetically). Import appropriate audio files for these containers (if needed, you can copy and paste duplicates of individual sounds to other containers), then add their Events to your primary <YourProjectName>_GVR_ENG soundbank in the same manner as you did for the sample sounds Event.

The same principle holds true for the following Barks: CriticalHit (<YourProjectName>_CharCrit_0X), Order (<YourProjectName>_AttackOrder_0X), Pain (<YourProjectName>_Pain), Death (<YourProjectName>_Death), LowHealth (<YourProjectName>_LowHealth_0X), Unconscious (<YourProjectName>_Unconscious), Stealth (<YourProjectName>_StealthMode) and the AnimationBarks: AttackShort (<YourProjectName>_AttackShort) and CoupDeGrace (<YourProjectName>_CoupDeGrace). Import sounds for those and assign their matching Events to the primary soundbank.

Barks: Switches

The majority of the Barks are housed in switch containers in order to detect whether the unit is in stealth or not using the StealthAsks switch. They have two random container children, one for each state, which are chosen by the parent's switch according to the unit's current game state. This allows for different audio to play when a unit is stealthed. In the case of the vanilla audio these are whispered lines. Note that if your source audio doesn't have any suitable stealth/whispered lines then the best alternative is to select each RandomStealthOn container and lower the master Voice volume control. The amount will greatly depend on the initial volume of your source audio, but -10dB is likely to be as low as you would want to go. Because you're adjusting the volume of the container, not the audio itself, this won't affect duplicates of the audio in other containers.

As before, import suitable audio tracks into your containers and then assign the Event to your primary soundbank.

Barks: Fatigue, the Special Case

Fatigue has the most convoluted arrangement of any Bark, because it has to account for not only stealth but also whether or not the Event triggers on the world map or in an area map. On top of that, it also needs to be muted during dialogue and other events, for which a specific game state was created (FATIGUEBARKMUTE). The parent switch container determines whether the unit is on the world map via GameAudioState, and if so is assigned to a random container. The rest of the states are assigned to a typical StealthAsks switch container with two random container children, as used in the previous Barks. The audio in the World_Map container can be duplicates of the audio in the StealthOff container.

Once again, import suitable audio tracks into your containers and then assign the Event to your primary soundbank.

Barks: Casting Chants

Typically most soundsets will not require custom spell casting chants, so the Events for them can be left out of the soundbank. However, if you do plan on having custom chants then you can use the supplied container <ProjectName>_CastChant and its children, or create new ones as required. Note that the CastEmpty container is intended to be left empty (hence the name) to be added to any Events that don't require sounds. This is primarily for the Precast event, since having a sound for that and a sound for the actual cast can result in sound collisions. Since most people will likely not have casting sounds, these containers are not linked to any Event by default. You will have to manually link them if you wish to utilise custom casting sounds.

Refer to the Adding Extra Events page for further info.

A Note on Custom Settings

If you select the Voices_Root and switch to its Positioning tab, you'll see it has an Attenuation curve attached. You can open the editor for this by clicking on the Edit button. This is what controls the character sound attenuation as you pan the camera away from them. A custom curve was created to replace the vanilla Owlcat attenuation values after early testing with those produced incorrect results (the vanilla Owlcat curves are still available in ShareSets and can be switched to using the >> button). Depending on the results of your in-game testing, you may need to adjust or replace this curve. The currently applied curve (very) roughly approximates standard inverse-square falloff over the same 25m range the Owlcat values use. There's also a more physically accurate curve over 80m available in ShareSets.

One other change you may need to make is adding a custom CameraZoom gain curve if your in-game testing doesn't match the behaviour of the vanilla soundsets. The Owlcat curve is located on the audio bus in the vanilla Init.bnk and thus inherited by any custom bank. You will need to create a new curve and add it to one of your project containers. Select the <ProjectName> container, switch to its RTPC tab, click the >> Create button, select Make-up Gain, then click the second >> button and choose Game ParametersCameraZoom. The most common issue with custom banks appears to be overly high gain when zoomed in vs the vanilla banks. You may need to experiment with a suitable curve to counteract this.

If your audio has noticeable reverberation during in-game testing you may need to reduce the volume on the Auxiliary Audio Bus of one or both of the Asks or Character_Creator_Sample containers, depending on what part of the game the issue is occurring in. The starting values for both should be -27dB. Try lowering the relevant volume by 1 to 2 dB at a time until the reverberation is no longer discernible. The need for this seems to be variable depending on the nature of the source audio.

Pic: Aux Bus Volume Control

Generating the SoundBanks

Now that your soundset is assembled, confirm that all of the required Events are present in the primary soundbank and that none of them show up as [Missing] in the Event Viewer in the bottom left. The Missing notification means nothing has been assigned to that Event's default action. Note that spell casting chants being Missing/unassigned is fine if you aren't adding chants, since they aren't pre-linked to any sound containers as noted above.

Switch to the SoundBanks tab. Right click on the root SoundBanks folder and choose Generate Soundbank(s) for current platform. This will encode your audio and compile it into the defined BNKs in the GeneratedSoundBanks\Windows folder. Inside you'll find an Init.bnk, your custom banks, text files, and XML files. You don't need to do anything with these files directly. Visual Studio will automatically copy them when you build your mod.

With the soundbanks generated you can save your project and close Wwise. You can now move on to Building and Testing your mod.