HOW-TO: Implement sounds and use Wwise

Wwise is an audio tool which REDkit uses for almost all audio-related tasks.

Here you can find the basics of starting the app, using it and also find tutorials on implementing sounds into your mod for different purposes such as weather, scenes, animations and more.


Starting Wwise

WWISE can be downloaded from audiokinetic’s website. To use it for projects with more than 250 sound files transferred into the game, you will need to get a license for it. Here’s how you can do that: HOW-TO: Get a Wwise license

After all that is done, you can start the program. A pop-up window will appear, where you can open and select projects or create a new one. Once a project has been opened/created, it will be added to the list in the window itself, and will not disappear unless the project’s file is deleted.

image-20240405-085405.png
Project launcher window

To open a project, click “Open Other” and select the file from your library. Upon first-time setup, you should open the game’s project from your library. It should be in REDkit’s map structure, right here, under assets and w3_audio:

wwiseproject_location.png
Game’s WWISE project location

 

All WWISE project files' types extensions are .wproj.

If you’d like to begin an entirely new project, you should click “New” in the Project launcher window. A new popup should appear.

You need to name your project, set a location and a folder for your project. You could get some presets, if you’d like to, but don’t have to.


Wwise structure and hierarchy

This is what it should look like once you have opened Wwise.

The window layout is clear, and all the sub-windows are named appropriately. If you’re just adding extra sounds into the game, these two windows are the ones you’re going to work the most in: Project Explorer and Property Editor.

Project Explorer window has tabs: Audio, Events and SoundBanks are (almost) mirror images of each other, but all 3 tabs do different things.

  • The Audio tab contains all the sounds added to the game, you can even edit the selected sounds themselves in the property editor.

  • Events can be referenced in REDkit to create soundEvents - also known as: put the sounds into the mod.

  • SoundBanks are a list of sounds and their events that can be loaded into the game/mod. SoundBanks are by themselves not sounds, only a list pointing to the sounds' groups and their events' groups.

The hierarchy of these is mostly self-explanatory.

Groups starting/ending in “bob” are sounds made for DLCs.

“Generic” has some specialties:

  • armour” does not only contain sounds for armor, but clothes too,

  • handing” contains sounds made when touching different materials.

  • foliage” group contains sounds of the player going through different foliage.

The voiceovers are generally not stored here (that would take up a lot of space), but externally, and that external source is used in Wwise.

  • GUI” stands for Game User Interface: sounds that different menus, panels make in the game/mod.

  • “Music emitters” are the musicians' songs and sounds in the game.

  • “Test_junk” is not used in the game - as the name might suggest.

  • “Cutscenes” contains all the sounds used in cutscenes. Most of the time 1 track plays per cutscene or cutscene section.

Make sure to get familiar with the hierarchies, because you might want to use some of the sounds in it or alter them.

Make sure you are adding the new sounds into the “_Mod” SoundBank, because that’s what gets automatically published. You could also add new SoundBanks, and choose them when publishing.


Adding new SoundBanks into REDkit

Here’s how to add a new SoundBank into REDkit.

  1. Create a SoundBank in WWISE.

    1. Go to the SoundBanks tab.

    2. Right Click SoundBanks groupnew childwork unit

  1. Name your new work unit.

  2. Right Click on the new work unitnew childsoundbank

  1. Name your new SoundBank.

  2. Do the steps above in the Events tab, except for the second to last thing: it shouldn’t be a SoundBank, but an event.

  3. Go to the Audio tab.

  4. R.Click Actor-Mixer Hierarchynew childwork unit

  5. Name your new work unit.

  6. R.Click on the new work unitimport audio files

  1. Select the sounds you want to have in your SoundBank from your library.

  2. When you have all you need, click “import”.

  3. Go back to the Events tab.

  4. Select the Event you created.

  5. Right Click in the Event Property Editornew actionbrowse object

  1. Select the imported audio.

  2. Go to SoundBanks tab and double click the SoundBank you created.

  3. SoundBank editor window popped up. In that, go to “add tab”.

  4. Drag and drop your event and your Audio tab’s work unit into the window.

  5. Remove the “Event” check mark from the Audio work unit’s line, and “Media” from the event’s line.

  1. Close the SoundBank Editor window.

  2. Right Click on the work unit in Soundbanks tab→click Generate Soundbank(s) for current platform and wait.

  1. Load your SoundBank in REDkit:

    1. Open REDkit.

    2. Go to: ToolsSoundReload soundbanks

    3. A new window should pop-up. Select your new soundbank and click OK.

  2. Create a sound emitting entity:

    1. Go to Asset Browser.

    2. Select the folder of the world you’d like the sound to be in.

    3. Right Click on a free space→ createentity template.

    4. Name and open it.

    5. R.Click on the dark grey part of your window (set on the main tab)→Select ComponentCSoundEmitterComponent

    6. Select your new component, and go to Effects.

    7. Click the plus button and name the new effect.

    8. With it selected, click “Edit effect”.

    9. Within the new tab (named “Effect [name of your effect]”), R.Click the column on the left sideinsert track group

    10. Name the new track group.

    11. Append track and name it.

    12. R.Click on the timelineadd track itemCFXTrackItemSoundEvent

    13. In this event’s properties, set the soundEventName to your WWISE event name.


Implementing a sound into your mod

Ambiance

Ambient sounds are implemented into the level itself. Because of this, you’re going to need a new layer in the world itself.

  1. Open the level you’d like your sound to be in

  2. Load needed layers (usually layers around the camera)- to see where you are, and where you need to go.

  3. In the ambiance folder, find the place you’d like to add a sound in (if you want to add a new sound in an existing world - if not, then create a folder hierarchy you’re comfortable with)

  4. Add a new layer (Build tag: audio, Type: autostatic), or activate the layer you’d like to add a new sound to (active layers are in bold)

Ambient sounds can be played 2 different ways: by an emitter, or by an area. Emitters are more point-like sounds, whereas areas are - well, area-like. Think of it as music box versus a river.
If you’d like to add an emitter, then follow the steps below:

  1. R.Click where you want your emitter → Sound Add Sound Ambient Emitter

  2. In the properties tab of the emitter: loopStart → select the AudioEvent from WWise

    1. If you just want it in a loop, then don’t add loopStop.

  3. Specify maxDistance.

eventOnAttach, eventOnDetach, switchesOnAttach and rtpcsOnAttach were inherited from Sound Area’s properties but cannot be used here.

Occlusion can be applied.

If you want an area, then the following steps are for you:

  1. Right Click where you want your area to be→ Sound Add Sound Ambient Area

  1. Scale and move it until it is to your liking using the buttons on REDkit’s left-side with the same name, and/or by using the Vertex Edit tool (in the tool tab, second to last button - if you can’t see the tool tab, then you can turn it on by View→panel→tools→visible (it’s turned on when it has a tick next to it)

    1. You can add a new vertex by alt+L.Click - can create complicated shapes, but only on the horizontal plane, not the vertical - may break the area

  1. Set all you need for your specific sound in properties:

    1. Set soundEvents - only one event per area

    2. You can specify the reverb for the area: select a reverb, and set enabled to true

    3. customEventOnEnter: not specified

    4. soundEventOnEnter: plays when you enter the area

    5. soundEventOnExit: plays when you exit the area

    6. maxDistance: starts playing the soundEvent, without stepping into the area → soundEventOnEnter does not play (same goes for maxDistanceVertical, only on the vertical plane)

    7. banksDependency: which sound will be loaded when near the area, and unloaded when you move away - how near/far is decided by maxDistance → there’s a bit of buffering

    8. Occlusion can be set

    9. outerListenerReverbRatio: there are multiple reverbs, at least 2 (when outside an area): one on the listener, and the source sound (anything within the area that has different reverb specified)

    10. priorityParameterMusic: not used

    11. isGate: not used

    12. useListenerDistance: not used

    13. getawayRotation: not used

    14. isWalla: any trigger can be used for crowd sounds, can count the number of NPCs within the area, and then RTPC can be used to play proper sound for that crowd: one NPC - one person talking ←→10 NPCs - group sound can be played

      1. If turned on, you can add wallaSoundEvents

        1. The more events, the more emitters are added (but on screen, it will show up as one, collective emitter) - the emitters only follow the player, they do not rotate with the player

      2. wallaEmitterSpread: how far the emitters are from the player 

      3. wallaRotation: used to rotate the emitters in relation to the world

      4. wallaOmnifactor: adds a number of “ghost” NPCs to the total number of NPCs counted in the area → useful when exiting the sound area, as it makes it less noticable

      5. wallaMinDistance: how near to the player the RTPC starts counting NPCs within the area (0 is the default)

      6. wallaMaxDistance: how far to the player the RTPC stops counting NPCs within the area (30 is default)

      7. wallaBoxExtension: allows NPCs outside the box to be counted up to the number put here (meters)

      8. wallaAfraidRetriggerTime: when the player does something to frighten the crowd, a different crowd sound will be played. The value put here will delay the playing of this sound → if the player is moving, this is useful in not hearing the distressed sounds of citizens over and over again. Afraid NPCs will not be counted into the total inside of the area - they’re taken out from usual ambiance of the sound

      9. wallaAfraidDecreaseRate: not specified

    15. fitWaterShore: helps in automatically creating water ambient sound area when set to true - creates too many walls, has to be manually redone

    16. fitFoliage: helps in automatically creating foliage ambient sound area when set to true - creates too many walls, has to be manually redone

Areas often overlap, so priority has to be set: triggerPriority (in properties) (smaller the number, lower the priority: external areas are usually between 0-4, interior is 5+). Numbers above 10 or 15 were rarely used, but they can be.

The area itself has a property named Parameters, and it defines whether the area is interior or exterior, and what number between 1 and 0 it is (e.g. 0.85 → the external world is not entirely muted, some can still be heard, but quietly). For this reason, this is set for bards too - can be heard from outside of the tavern, for example. As many parameters can be added as needed. Fading in and fading out can be set too: parameterEnteringTime (seconds), parameterEnteringCurve, parameterExitingTime (seconds), parameterExitingCurve.
Parameter needs to be applied to the sound too, if you want to differentiate it. For that, a curve (Attenuation curve) needs to be set: In the Sound Property Editor, go to the RTPC tab, R.Click the arrows, and select: Voice Low-pass Filter. Then another set of arrows should appear in the line. R.click → Game Parameters → ambient RTPC → global → amb_interior

A blue line (the Attenuation curve) should appear in the lower panel. For 0 (x axis), it should be at -200 (y axis), and at 1 (x axis) it needs to be at 0 (y axis), which means that the sound is playing at full volume - exterior is the opposite. Area’s value can be set between 1 and 0 too: then the sounds are mixed together (like when you’re in a bar’s bathroom).

Global sounds (weather)

If you’d like to set global sounds, you need to go to the World tab and find soundEventOnAttach & soundEventOnDetach. The former activates when you load the world, and the latter when you unload it. soundBankDependency specifies which sounds you’d like the mod to load when the world itself loads.

Scenes and cutscenes

A scene means a dialog, but does not mean cutscene.
To add a sound into a scene/cutscene, follow these steps:

  1. Open your scene/cutscene from the Asset Browser.

  2. Add a new track for sounds

    1. R.Click on the track’s timelineAdd misc eventsound

    2. In properties, specify the sound event (from WWise) you want to be played, and specify the actor from whom you’d like the sound to be played from (you can specify the bone too, but you don’t have to), and set the volume (if you want to).

  1. In the graph tab of scene editor, R.Click→Add Scripting Block→go to its properties→ set functionName to SoundEventScene→ go back to the graph tab and connect the Scripting Block into the graph→in properties, paste the WWISE event’s name into the eventName line.

If you want a sound to be played throughout the cutscene:

  1. Go to the Template tabburnedAudioTrackName

  2. Sounds played in the cutscene need to be in the SoundBanks that are loaded with the world the cutscene is in, and you can set it to streaming.

    1. alternative: soundbankDependency can also be set, so that it’s loaded at the beginning of the cutscene, but you don’t have to

Animations

Sounds can be put into the timelines of individual animations. To do that, follow these next steps:

  1. Go to propertiesextAnimEvents

  1. Attach a file containing all the files which will be used in the animation: you can work only on these files, not the animset file itself

    1. These sound files are in: soundscharacters/animals/monsters→ in their respective folders in Asset Browser, based on the overall theme of the animation (combat/movement/community/etc.) .

      1. Opening it for the first time, a pop-up window asks you to select a set of animations for editing, and it needs to be manually selected. This window pops up in the REDkit window, so make sure to have that in front of you.

      2. After opening it, you need a character to play the animation on: so you know what’s happening when and put the correct sounds in the correct places. For that, you need to find a character in the Asset Browser, and select it. Then, next to preview entity, press “Use selected”.

      3. Add new trackadd sound eventselect the sound event in properties: soundEventName

        1. maxDistance: the furthest point from the animation that the sound can be heard

        2. Bone: can be specified, not vital. From which bone you’d like the sound to be played

        3. switcherToUpdate & parametersToUpdate: needed when one character plays a certain sound, another plays another - for this to work, you have to specify the switch you’d like to update.

        4. useDistanceParameter: if you’d like to use distance as a parameter for anything other than the Attenuation curve, this needs to be set to true→ if so, then the global distance parameter will be updated for the sound that is playing in the animation - you can use it for anything.

      4. Footstep event:

        1. A sound event, but uses the material info to decide what sound needs to be played.

          1. These files can be found (in WWise) in generic→movement→footsteps and then there are a lot of sub-branches, but all end the same way: same kind of footstep on different materials.

          2. In properties, soundEventName needs to be specified, but not a definite file, but a small group that has no more groups in it, files only differing in the materials it is done on→ the animation detects what type of material is under the character’s feet and choose the file accordingly.

Debugging sounds

To debug sounds, open WWISE→press “Connect to Remote Platform”→select local host/ any computer you’d like to connect to→double click

If you press f6, a window pops up: profiler → you get a log from the game, what sounds are playing currently

You can also change parameters on the fly - mess around in WWise while REDkit is also open, and it updates in real time!

______________________________________
The Witcher 3: Wild Hunt Complete Edition © 2024 CD PROJEKT S.A. Published by CD PROJEKT S.A. Developed by CD PROJEKT RED. CD PROJEKT®, The Witcher®, REDengine® are registered trademarks of CD PROJEKT Capital Group. All rights reserved. The Witcher game is set in the universe created by Andrzej Sapkowski in his series of books. All rights reserved.