|
| 1 | ++++ |
| 2 | +title = "Scene Audio" |
| 3 | +weight = 30 |
| 4 | ++++ |
| 5 | + |
| 6 | +_Last updated: April 3, 2026_ |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## Adding Sound Entities |
| 11 | + |
| 12 | +In our proprietary game engine, placing sounds into a scene is straightforward. Start by creating an **empty entity** in the scene. |
| 13 | + |
| 14 | +Once the entity is added, select it in the scene hierarchy to open the **Inspector Window**. If the Inspector doesn't appear, enable it through **Window > Inspector Window**. |
| 15 | + |
| 16 | +In the Inspector, expand the **Scripts** dropdown and choose **Add New Script**. From the dialog, select **AmbientSoundEmitter** to attach a sound emitter script to the entity. |
| 17 | + |
| 18 | +The script exposes several options for controlling playback: |
| 19 | + |
| 20 | +| Property | Description | |
| 21 | +|---|---| |
| 22 | +| **Event Path** | The FMOD event path for the sound to be played in the scene | |
| 23 | +| **Play On Startup** | If enabled, the sound plays automatically when the scene loads. Useful for ambiences or persistent sounds | |
| 24 | +| **Is Static** | Marks the emitter as fixed in place. Static emitters are cheaper to process since the engine doesn't need to track their position dynamically | |
| 25 | +| **Override Sound** | Enables overrides for certain FMOD parameters specifically for 3D sound events | |
| 26 | +| **Override Volume Multiplier** | Adjusts playback volume by a multiplier. Use commas (`,`) instead of periods (`.`) for decimal values | |
| 27 | +| **Override Max Distance** | Sets a custom maximum audible distance for the event | |
| 28 | +| **Override Min Distance** | Sets a custom minimum audible distance for the event | |
| 29 | +| **Is Master Sound** | Tags the emitter as a master sound, used for global mix behaviors | |
| 30 | +| **Is Master Suppressor** | When active inside a trigger volume, ducks (reduces) any sounds tagged as master sound | |
| 31 | +| **Is Triggered** | Configures the emitter as a trigger volume, only playing when the listener enters the defined space | |
| 32 | +| **Trigger Shape** | Defines the shape of the trigger volume (box or sphere) | |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +## Reverb Zones |
| 37 | + |
| 38 | +The same process applies when adding reverb zones to a scene. In FMOD, reverbs are snapshot events that can be triggered through trigger volumes, just like standard sound events. |
| 39 | + |
| 40 | +To set one up: |
| 41 | + |
| 42 | +1. Create a new entity in the scene |
| 43 | +2. Attach an **AmbientSoundEmitter** script |
| 44 | +3. Enter the path to the reverb snapshot event |
| 45 | +4. Enable **Is Triggered** |
| 46 | +5. Select the appropriate trigger shape |
| 47 | +6. Resize the volume using the transform tools to cover the desired area |
| 48 | + |
| 49 | +The following snapshot event paths are available out of the box. You're also free to create and add your own snapshots and snapshot events. |
| 50 | + |
| 51 | +- `event:/mission/ambient/reverb/alley` |
| 52 | +- `event:/mission/ambient/reverb/caves` |
| 53 | +- `event:/mission/ambient/reverb/courtyard` |
| 54 | +- `event:/mission/ambient/reverb/dungeon` |
| 55 | +- `event:/mission/ambient/reverb/forest` |
| 56 | +- `event:/mission/ambient/reverb/gatehouse` |
| 57 | +- `event:/mission/ambient/reverb/keep` |
| 58 | +- `event:/mission/ambient/reverb/stone_corridor` |
| 59 | +- `event:/mission/ambient/reverb/stone_interior` |
| 60 | +- `event:/mission/ambient/reverb/valley` |
| 61 | +- `event:/mission/ambient/reverb/wood_interior` |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +## Paths |
| 66 | + |
| 67 | +Paths are routes you can place in a scene for entities to follow. This is useful when you want a sound emitter to move along a defined trajectory relative to the listener — for example, to simulate a river flowing past. |
| 68 | + |
| 69 | +### Creating a Path |
| 70 | + |
| 71 | +1. Click **Add New Path** on the taskbar |
| 72 | +2. Assign a name to the path |
| 73 | +3. Click **Add Component** |
| 74 | +4. Place path points in the scene — they will automatically be connected in order |
| 75 | + |
| 76 | +To attach a sound emitter to a path, select the sound emitter entity, go to the **Scripts** tab, click **Add New Script**, and add the **path_converger** script. This enables the entity to follow the defined path. |
| 77 | + |
| 78 | +The **path_converger** script exposes a few options: |
| 79 | + |
| 80 | +| Property | Description | |
| 81 | +|---|---| |
| 82 | +| **Path Name** | The name of the path the emitter should follow. Must exactly match the path you created | |
| 83 | +| **Rotate To Camera** | If enabled, the emitter rotates to face the listener's camera as it moves along the path | |
| 84 | +| **Apply Scale** | Determines whether the emitter inherits scaling transformations from the path | |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +## Modifying Emitter Transforms |
| 89 | + |
| 90 | +To see a sound emitter's trigger volume shape and its min/max distance spheres, you need to enable **Sound Entities** visibility. If the **Visibility** tab isn't visible, open it via **Window > Visibility Window**. |
| 91 | + |
| 92 | +In the **Visibility** tab, go to **Visibility Masks** and check the box next to **Sound Entities**. This enables display of sound-related components in the scene view. Once enabled, the trigger volume (a box or sphere wireframe) and two concentric distance spheres representing the min and max audible range become visible directly in the scene, making it much easier to position and resize emitters accurately. |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +## Adding Sound Events to Animation Clips |
| 97 | + |
| 98 | +To attach sounds to animation clips, open the **Resource Browser** via **Window > Show Resource Browser**. The Resource Browser lets you browse, filter, and search through project assets. |
| 99 | + |
| 100 | +You can filter by asset class to narrow down results. If you're not sure where an asset is, use the search bar — just make sure you're searching within the correct directory. Once you find the animation clip, select it to open the **Animation Clip Inspector**. |
| 101 | + |
| 102 | +In the **Animation Clip Inspector**, you can view and adjust all parameters linked to the selected clip. For audio, focus on the sound-related parameters: |
| 103 | + |
| 104 | +| Property | Description | |
| 105 | +|---|---| |
| 106 | +| **Step Points** | The X-axis value defines the timing offset within the clip. Set to `−1.00` by default if no sound is attached. Set to `0.00` or adjust to sync sound with animation | |
| 107 | +| **Sound Code** | The FMOD event path to attach. Entering a valid path ensures the sound plays at the correct point in the animation timeline | |
| 108 | +| **Voice Code** | Combat voice type to attach to the animation. See built-in types below, or add custom types as described in the [Voice System]({{< ref "audio-modding-systems.md#voice-system" >}}) section | |
| 109 | + |
| 110 | +**Built-in Voice Codes:** |
| 111 | + |
| 112 | +| Voice Code | |
| 113 | +|---| |
| 114 | +| Grunt | |
| 115 | +| Jump | |
| 116 | +| Yell | |
| 117 | +| Pain | |
| 118 | +| Death | |
| 119 | +| Stun | |
| 120 | +| Fear | |
| 121 | +| Climb | |
| 122 | +| Focus | |
| 123 | +| Debacle | |
| 124 | +| Victory | |
| 125 | +| HorseStop | |
| 126 | +| HorseRally | |
| 127 | +| Drown | |
| 128 | + |
| 129 | +**Animation sound flags:** |
| 130 | + |
| 131 | +| Flag | Description | |
| 132 | +|---|---| |
| 133 | +| `make_bodyfall_sound` | Triggers a body-fall sound at this animation point | |
| 134 | +| `make_walk_sound` | Triggers a footstep sound at this animation point | |
| 135 | +| `do_not_keep_track_of_sound` | Stops the engine from tracking the sound's playback state | |
| 136 | +| `attach_sound_to_agent` | Attaches the sound directly to the agent rather than the world position | |
| 137 | + |
| 138 | +--- |
| 139 | + |
| 140 | +## Adding Sound Events to Particles |
| 141 | + |
| 142 | +Just like animation clips, particle assets can be accessed through the **Resource Browser**. Filter the asset list to show only particles, or use the search bar to locate a specific particle within a directory. Once found, double-click it to open the **Inspector Window**. |
| 143 | + |
| 144 | +In the Inspector, you can view the particle's layers, LODs, and parameters. Before attaching audio, make sure you've selected the correct **layer** and **LOD** of the particle. |
| 145 | + |
| 146 | +> Keep in mind: if the effect isn't visually strong enough to justify rendering at a higher LOD, it isn't strong enough to justify a sound either. In those cases, keep audio only at **LOD 0**. |
| 147 | +
|
| 148 | +Once the correct layer and LOD are selected, open the **Sound** tab: |
| 149 | + |
| 150 | +| Property | Description | |
| 151 | +|---|---| |
| 152 | +| **Continuous sound** | Use for looping sounds. Enter the FMOD event path of the looped event | |
| 153 | +| **One shot sound** | Use for single-playback sounds. Enter the FMOD event path of the one-shot event | |
| 154 | +| **Size Parameter** | Applies a multiplier to override the size of a 3D sound event | |
| 155 | + |
| 156 | +--- |
| 157 | + |
| 158 | +## Quadraphonic Ambients {#quadraphonic-ambients} |
| 159 | + |
| 160 | +**Mount & Blade II: Bannerlord** is a performance-critical title. Adding hundreds of 3D sound emitters into scenes can quickly overwhelm CPU, memory, and disk I/O — especially during large-scale battles with thousands of active agents. To maintain immersion without sacrificing performance, we use **quadraphonic ambients**. |
| 161 | + |
| 162 | +Quadraphonic is a four-channel surround format that creates the illusion of being surrounded by many emitters while actually using only four channels. Rather than relying on FMOD's built-in quad system, we implemented our own approach. It's a bit more involved to set up, but once you understand it, it's more flexible than FMOD's internal solution. |
| 163 | + |
| 164 | +The system spawns **four 3D emitters** around the listener at fixed positions: **0°, 90°, 180°, and 270°** relative to the listener's facing direction. These emitters move with the listener's position, but their distance to the listener stays constant. As the listener turns, they continuously receive different signals from the surrounding emitters — creating the illusion of a dynamic, shifting environment without needing dozens of independent sources. |
| 165 | + |
| 166 | +### Setting Up Quad Ambients |
| 167 | + |
| 168 | +First, create a **stereo ambient event**. This is **not optional** — it acts as a fallback in case the quad setup fails or isn't found. Without it, ambience may be missing during gameplay. |
| 169 | + |
| 170 | +For example, create a 2D event called `plains`. |
| 171 | + |
| 172 | +Next, create a **folder with the same name** as the stereo event (`plains` in this example). This naming is critical — the system matches stereo events to their quad alternatives by name. Events inside this folder will be treated as the quad channels. |
| 173 | + |
| 174 | +Inside the folder, create four 3D events named exactly: |
| 175 | + |
| 176 | +- `north` |
| 177 | +- `east` |
| 178 | +- `south` |
| 179 | +- `west` |
| 180 | + |
| 181 | +> The names are **case-sensitive** and must be **lowercase**. Event order doesn't matter. |
| 182 | +
|
| 183 | +For each of the four quad events, open the **Spatializer** and **disable distance attenuation**. These emitters should radiate a consistent signal regardless of their distance from the listener. If attenuation is left on, volumes may be incorrectly reduced depending on distance settings. |
| 184 | + |
| 185 | +Finally, go back to the stereo event (`plains`) and set a **User Property**: |
| 186 | + |
| 187 | +| Property | Value | |
| 188 | +|---|---| |
| 189 | +| `isQuad` | `True` | |
| 190 | + |
| 191 | +This flag tells the system to look for a matching quad setup. If found, the quad version plays; if not, the stereo event plays as a fallback. |
0 commit comments