Procedural sound propagation demo

I have recently developed a sound propagation system for my game which includes real-time diffraction around openings in walls, and occlusion of audios through rooms.

10 Likes

How did you achieve something like this?

My implementation is inspired by a document I read detailing one of the Hitman games’ sound systems.

The map is broken up into a network of portals and rooms, portals representing any opening into the rooms. Every 3D audio in the workspace is initialised upon joining the game, being given an equalizer sound effect and is assigned to the room the source of the sound is in.

The network of portals and rooms form a graph where every room is a node and every portal is an edge. A breadth-first search is performed on this network to calculate an occlusion value for the room based on a calculated angle between the normal vectors of the portals, or between the normal vector of a portal and the position of your character - or if the portal is closed, returns a maximum occlusion value. These occlusion values are summed as the search expands.

After the search, the equalizer effect under every audio is adjusted accordingly to the occlusion value
of the room calculated by the search.

The diffraction works by duplicating every audio onto an attachment point somewhere underground, and then positioning the attachment along a vector from the character’s position to the portal through which the sound should come out of.

I hope my explanation helps.

7 Likes

Would you ever open source something like this?

2 Likes

I would like to know this as well.