Sound Propagation Through Doors and Windows in Games
Modern video games simulate realistic acoustics by calculating how sound waves interact with physical architecture, using distinct propagation pipelines for openings like doorways compared to solid barriers like glass windows. Sound designers achieve this contrast through spatial audio middleware such as Audiokinetic Wwise or FMOD, combining geometric raycasting, acoustic portal systems, material-based transmission loss, and frequency filtering. While an open doorway prioritizes diffraction and seamless reverberation flow, a closed glass window relies on acoustic transmission loss, selective high-frequency damping, and isolation of reverb zones.
Spatial Audio Portals for Open Doorways
In game engines like Unreal Engine and Unity, interior spaces are divided into acoustic zones or "rooms" connected by "portals." An open doorway acts as an active portal:
- Diffraction Simulation: When a sound source is inside a room, an open doorway recalculates the origin of the sound so that it appears to bend around the frame to an outside listener. Game engines use edge-diffraction algorithms to calculate the angle between the listener, the portal edge, and the sound source, gradually attenuating higher frequencies as the listener moves further out of the direct line of sight.
- Point Source Conversion: When a player is far from the room, the doorway functions as a singular point source emitting the sum of that room’s internal sound and early reflections. As the player walks through, the sound seamlessly pans to a fully 3D spatialized field.
- Unfiltered Volume and Reverb Bleed: Open doorways allow high-frequency transients (like footsteps or gunfire) to pass through without material absorption, while allowing the originating room’s reverb tail to bleed naturally into the adjacent hallway or outdoor environment.
Material Transmission and Filtering for Closed Glass Windows
A closed window completely obstructs the open-air portal, forcing the audio engine to calculate sound transmission through a dense material rather than around an opening:
- Transmission Loss (Acoustic Occlusion): Unlike an open portal, glass acts as a direct barrier. Engines evaluate the physical material tags applied to the window mesh. Glass has a specific acoustic impedance value that reduces sound pressure levels (typically an attenuation of 15 to 30 dB, depending on thickness and single vs. double glazing).
- Low-Pass and Shelf Filtering: Sound designers route audio passing through glass through real-time Low-Pass Filters (LPFs). Solid walls absorb both mids and highs, leaving only low-end thuds; glass, however, lets specific mid-to-high frequencies through while cutting extreme bass and very high airiness. Designers often use a mild high-shelf cut alongside an LPF to mimic the brittle, thin resonance characteristic of glass.
- Reverberation Isolation: A closed window disconnects the reverb networks of the two spaces. Sound from inside the room remains trapped, generating wet reflections internally, while the listener on the outside receives almost entirely a dry, filtered direct signal.
Dynamic State Switching
Game designers make these systems interactive through real-time parameter controls (RTPCs):
- Opening and Closing States: A window or door often has a float value (from 0.0 for fully closed to 1.0 for fully open). As a door closes, the portal’s aperture shrinks, which increases the diffraction angle and introduces progressive low-pass filtering.
- Destruction Events: If a glass window is shot or shattered, the audio middleware dynamically kills the material transmission profile, turns the window frame into an active portal, and switches the propagation behavior instantly to an open aperture, allowing full-frequency audio and environmental reverb to spill across the threshold.