Skip to content

How Sound Finds Its Way Through Game Geometry

  • home
  • R&D
  • How Sound Finds Its Way Through Game Geometry

A gunshot behind a wall can be loud, detailed, and still give the player a misleading direction. If the strongest audible route is through a doorway to the right, filtering a sound at the weapon's position does not make it arrive from that doorway.

I built a runtime audio prototype in Unreal Engine 5.6 as an independent AK Audio R&D project to address that problem. It finds routes through openings and around obstacle edges, uses them to control the apparent direction and frequency response, and generates a room response from geometry and acoustic materials. When the level changes, the acoustic model can change with it.

video_system.mp400:33
00:33 · video_system.mp4
конец · смотреть ещё раз
00:00
00:00
00:33буферизация
7,5 мб

An available route matters

A direct obstruction check answers a useful question: is there a clear line between the source and the listener? When that line is blocked, attenuation and filtering can represent an obstructed contribution.

The next question is where the stronger contribution can reach the listener. An open doorway, a passage between rooms, or the edge of a barrier may provide a route that the direct line does not describe.

In my test layout, I want the dominant arrival to point towards the opening. A quieter contribution may still transmit through a wall; its strength depends on how the wall is modelled. The important distinction is between hearing that contribution and allowing it to define the main direction of the threat.

Schematic of a blocked direct line and an available sound route through a doorway. The arrival direction follows the final part of the route towards the listener.

Conceptual diagram of the routing problem. The highlighted arrival direction represents the final route segment; it is not an engine capture or a measured sound field.

Finding a connected path

The system starts with the source, the listener, and a representation of the current acoustic geometry. It checks the direct path first. For an obstructed source, it considers candidate routes through openings and around relevant edges.

The demonstration configuration uses deterministic best-first search. Promising candidates are examined first, their segments are checked against the geometry, and eligible paths are compared using estimated sound-energy loss. This makes path selection sensitive to the acoustic consequences of a route, rather than choosing an opening solely because it is nearby.

A candidate route is only useful if all of its segments connect. An exit may be open to the source while another wall blocks its connection to the listener; validation checks that part too.

The resulting path supplies information for rendering: its length, bends, and final direction towards the listener. These properties influence the apparent source and the processing applied to the sound.

Making the direction audible

The original sound source remains the weapon. Its apparent position is a rendering decision.

For the routed contribution, I use a virtual source aligned with the route's final approach to the listener. The player should hear the shot reaching them through the opening, even when the actual shooter is behind a wall.

This is particularly useful when the listener moves. A route that works at one position may become weaker or unavailable at another. Updating the apparent direction lets the audio describe that change instead of continuing to point through an obstacle.

The sharp, dry component of a gunshot matters here. “Dry” means the main shot without its reverberant tail. Moving an additional atmospheric layer towards a doorway can suggest space, while the dry transient can still dominate localization. My model applies routing to that main contribution as well.

Diffraction around edges

Finding an opening is only part of the problem. Near a corner, the sound's contribution and spectrum should evolve as the listener moves between exposed and obstructed positions.

The diffraction stage estimates loss across frequency bands from the route and its edge geometry. The renderer uses that information to shape the sound. A single obstruction flag would give much less information about the transition.

This is a game-audio approximation. I am not solving the full acoustic wave equation throughout the level. The aim is a useful relationship between geometry, audible direction, and spectral change.

A controlled test is to repeat the same movement around an edge with diffraction disabled and enabled, while keeping the recording and other settings fixed. That exposes the contribution of the component without hiding it inside a different mix.

diffraction.mp400:20
00:20 · diffraction.mp4
конец · смотреть ещё раз
00:00
00:00
00:20буферизация
2,9 мб

A room response from geometry and materials

One way to give a weapon a sense of space is to design prepared tails for different environments. I use these authored tails in a comparison mode; blending them gives direct artistic control over the result.

The geometry-driven system instead estimates a space's acoustic response from its geometry, openings, and material properties. It derives decay behaviour across frequency bands and passes those parameters to a reverb renderer, which synthesizes the tail at runtime.

The acoustic materials describe how the surfaces interact with sound. Those properties need to be assigned and tuned; the system does not infer them from a surface's visual appearance alone.

Connected spaces also matter. A shot in one room can feed a response in a neighbouring space through an opening. The dry arrival and room contributions can therefore have different directional roles. The current prototype manages a limited set of room responses rather than rendering every connected room independently.

This gives me a way to make the room character follow the level while preserving control over the weapon's source design.

Destruction changes the acoustic geometry

The strongest test uses a fixed source, a fixed listener, and the same gunshot recording before and after a barrier is breached.

The destruction event updates the affected acoustic geometry. Where the breach connects spaces, it can create a new opening for routing and room coupling. The path search can then find a different arrival route, and the room response can change with the new connection.

The meaningful result is the relationship between the changed geometry and the sound. A louder shot alone would not establish that a route had changed.

A continuous before-and-after capture keeps the source recording and positions comparable. A debug replay can then show the new opening and the path the system selected.

Working within a runtime budget

Geometry analysis and audio rendering operate on different schedules. The geometry does not need to be re-evaluated for every audio sample.

I reuse route information and room estimates while their dependencies remain unchanged, refresh affected data when the geometry changes, and limit the work scheduled for updates. Compact parameters carry the result into the audio renderer. This separates spatial reasoning from continuous signal processing.

Source and listener movement can also require route parameters to be refreshed, even when the room geometry has not changed.

The source playback and control logic use MetaSounds. Its ability to accept game data and control a DSP graph makes it a useful part of this workflow. Epic's MetaSounds overview describes those capabilities.

A budget also creates tradeoffs. Under load, some updates may be deferred, so responsiveness and the number of active sources need to be evaluated together. A small test scene cannot establish the cost of a full multiplayer battle. Hardware, geometry, source count, update settings, and renderer configuration all belong in a performance comparison.

Testing the system

The tests separate the sound design from the spatial system. Different processing modes use my designed gunshots and the same test scene. The prepared tails are also my content, so the comparison does not depend on changing the source assets.

Test Keep fixed Listen and inspect
Blocked source with an open doorway Source, listener, recording, shared settings Where the main shot appears to arrive from
Listener moving around a corner Movement, recording, other processing The contribution of diffraction
Prepared and generated room responses Input shot and chosen space The tail, material-dependent decay, and room contribution
Barrier before and after a breach Source, listener, source recording The changed arrival route and connected space

Clean listening comes before the debug explanation. Headphones help assess direction; speakers and mono playback provide additional checks. The route lines explain what the system calculated. The sound must establish what the listener can actually hear.

These tests examine specific mechanisms. Readability in a full combat mix still depends on priorities, source variation, attenuation, dynamics, and the relationship between weapons, footsteps, voices, and ambience.

About the project

This is a working Unreal Engine prototype focused on spatial readability and geometry that can change at runtime. The demonstration scene is assembled from Epic sample assets. I designed the gunshots from an AUG A3 recording library with multiple microphone perspectives and implemented the audio behaviour in my project.

My work includes two AAA vehicle-combat shooters and other shooters, including Standoff 2. I am interested in audio systems that connect sound design with information the player can use.

Discuss your project

If propagation, localization, or room transitions are a challenge in your game, contact AK Audio to discuss a technical review or implementation work. Include your engine, target platforms, and a short description of the behaviour you need. The prototype is a starting point for that discussion, not a claim of ready-made integration into every project.