Report article RSS Feed Interstellar Marines: Audio Occlusion - First Prototype

Do you know what Audio Occlusion is? No?... OK then, do you know what reality is?... No?... Well then let me try to explain a bit about both and how they relate to each other!

Posted by ZPSKenneth on May 18th, 2011

Audio Occlusion

So what is Audio Occlusion really about. Well, to say it in a popular way: it's about how you hear sounds "on the other side of a wall". In most games this is solved by turning down the volume a bit and also turn down the high frequencies (or treble if you like), so it sounds "muffled".

Normally this is solved by checking if there is a clear line-of-sight from the player character to the audio-source. If the line is blocked by an item (wall/crate/person/etc.), you turn down the volume and the treble in various degrees depending of how thick the blocking item is, what material it's made of etc. And when there is a clear line-of-sight with no blocking items you hear the sound loud and clear. (Reverb is usually also tweaked a bit)

I can give you a basic example here (Sorry for the simple look, but I've just watched Tron):

Standard Audio Occlusion Example
image
You might have experienced this in games before - this example might be a bit exaggerated to prove my point.

I've made a similar system for Running Man, and you can read more about it here if you are interested.

Doorway Audio Occlusion

Allright, maybe it's a silly name, and I haven't really given that part much thought - maybe it should something like "Displaced Sound Propagation Model" or similar... I hope I can come up with a cool name in the future... Please feel free to suggest a name if you have any ideas. :-)

Anyway - My idea is to get a bit closer to how things work in real life. If you take the example above it wouldn't work like that "out here" among us non-digital living entities. No, instead you would of course hear the sounds from the other room through the doorway... So why don't we do just that?

Ok - let's do it then:

Doorway Audio Occlusion Prototype image
The sounds in the other room is heard through the doorway - more realistic than though the wall

This might not sound like a revolution to you (or maybe it does - I don't know), but if you think about how it would affect the gameplay (besides the immersive aspect), then it could actually mean quite a bit.

Imagine that you are playing Deadlock and you are in a room with multiple doorways. With the standard "line-of-sight" occlusion model you would hear your opponent(s) through the walls, and are able to pinpoint their exact location... well through the wall like you have "x-ray-ears" or something.The sounds would be muffled, but you would still be able to hear them though the wall.

But with 'my' simple model you will instead only be able to hear through which door your opponent would enter, and maybe also how far he is from the door, but not his exact position - just like in real life.

Of course there are exceptions to this model, and it's far from perfect yet, but this small prototype has provided me with enough proof-of-concept to continue down this path.

Cheers,
Kenneth

Click here to go to the original article

Post comment Comments
Overlai
Overlai May 19 2011, 4:33am says:

Sounds pretty cool!

+2 votes     reply to comment
JibbSmart
JibbSmart May 19 2011, 4:09pm says:

Very cool. Do you use a pathfinding algorithm, or something? I was thinking about this about a year ago -- a loud enough sound should be able to steer you through a maze, if it is at the finish.

+2 votes     reply to comment
Fib
Fib May 20 2011, 9:56am says:

So I read your second article on this (the one with the prototype with 4 rooms) and you mentioned that you use a pathfinding algorithm.

Can you give an estimate on what the code complexity is for a system like this? I don't need big-oh or anything but just tell me is it feasible to have 10, 20, 50 sounds all going off within seconds of each other in a medium sized map?

This just seems like it would take a lot of processing time, plus with all the various amounts of enemies in the level with their own pathfinding. I guess it depends on how efficient your pathfinding algorithm is.

I'm just curious because I'm kind of a noob game programmer and have never thought about implementing something so complex for sound before.

+2 votes     reply to comment
ZPSKenneth Author
ZPSKenneth May 20 2011, 6:39pm says:

@JibbSmart & Fib: for this simple prototype I've just made it hardcoded, but in my current prototype I'm using an A-star pathfinding algorithm. As for how much processing it will take, only time will tell. I'm still just trying to figure out how to solve this "puzzle". But tune in on interstellarmarines.com and follow my progress. I'll also post my blogs here on indiedb.com, but a bit delayed though...

Oh, and I consider myself a noob coder as well - just with an extensive knowledge within sound design :-)

+2 votes   reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

News
Browse
News
Report Abuse
Report article
Related Games
Interstellar Marines
Interstellar Marines Single & Multiplayer First Person Shooter
Related Engines
Unity
Unity Commercial Released May 30, 2005
Related Groups
Unity devs
Unity devs Hobbies & Interests group with 1,240 members
Zero Point Software
Zero Point Software Developer & Publisher with 3 members