Volumentric SOUND/AUDIO
schkorpio
I can mspaint Join Date: 2003-05-23 Member: 16635Members
<div class="IPBDescription">for the new engine</div>Sound in ns1/hl1 and pretty much every other game out there is very basic (apart from a few realtime environmental effects, reverb, echo, speed manipulation etc)
the way it happens now :-
TOP VIEW of a marine shooting a gun.
In the picture below a marine is shooting a gun, and sound spreads outwards in a radial pattern, getting softer as you get further away form it, however it can be heard through walls as if the walls weren't even there, and can be heard through several rooms.
<img src="http://img530.imageshack.us/img530/366/s2wc7.jpg" border="0" class="linked-image" />
In a much more realistic way as this picture shows, the sound is trapped by the walls, and cannot be heard in the other rooms. Apart from a bit of echoing throughout the hallway, the sound cannot be heard if you don't have line of sight.
<img src="http://img235.imageshack.us/img235/1123/s1bj6.jpg" border="0" class="linked-image" />
of course this is only very basic, you could do some really cool things like if a marine is shooting a gun inside a glass room, the sound cannot be heard for anyone outside of the room - UNTIL the glass is broken, letting through the sound.
Like imagine, an onos trying to bust through some glass, the first two or three hits, are muted, dulled "thud sounds" you can barely hear them, but once the glass breaks, you are hit with the full roar of the onos, the breaking glass, and all of the infestation and engine sounds that may have been on the other part of the room.
Also fog of war should mask sound, so the commander can't hear what can't be seen. (like finding out which hive is occupied at the start of the game)
I think having realistic directional / volumetric sound would really add to the stealth and tactics part of the game
- you could have skulks chuckling into one end of a vent, and the chuckling would carry through to the other openings.
- or if a vent entry panel is cracked open, the sound echo's through out
- marines wouldn't be able to hear whats behind walls for exampe, instantly shooting while comming around the corner.
you could too have walls which let sounds pass through - like grates , but perhaps in a distorted in some way
I dunno if you'd have to tie the sounds to the gfx or phys engine or something like that ? it would be kind of like collision detection i guess,but for sound.
the way it happens now :-
TOP VIEW of a marine shooting a gun.
In the picture below a marine is shooting a gun, and sound spreads outwards in a radial pattern, getting softer as you get further away form it, however it can be heard through walls as if the walls weren't even there, and can be heard through several rooms.
<img src="http://img530.imageshack.us/img530/366/s2wc7.jpg" border="0" class="linked-image" />
In a much more realistic way as this picture shows, the sound is trapped by the walls, and cannot be heard in the other rooms. Apart from a bit of echoing throughout the hallway, the sound cannot be heard if you don't have line of sight.
<img src="http://img235.imageshack.us/img235/1123/s1bj6.jpg" border="0" class="linked-image" />
of course this is only very basic, you could do some really cool things like if a marine is shooting a gun inside a glass room, the sound cannot be heard for anyone outside of the room - UNTIL the glass is broken, letting through the sound.
Like imagine, an onos trying to bust through some glass, the first two or three hits, are muted, dulled "thud sounds" you can barely hear them, but once the glass breaks, you are hit with the full roar of the onos, the breaking glass, and all of the infestation and engine sounds that may have been on the other part of the room.
Also fog of war should mask sound, so the commander can't hear what can't be seen. (like finding out which hive is occupied at the start of the game)
I think having realistic directional / volumetric sound would really add to the stealth and tactics part of the game
- you could have skulks chuckling into one end of a vent, and the chuckling would carry through to the other openings.
- or if a vent entry panel is cracked open, the sound echo's through out
- marines wouldn't be able to hear whats behind walls for exampe, instantly shooting while comming around the corner.
you could too have walls which let sounds pass through - like grates , but perhaps in a distorted in some way
I dunno if you'd have to tie the sounds to the gfx or phys engine or something like that ? it would be kind of like collision detection i guess,but for sound.
Comments
<img src="http://img235.imageshack.us/img235/1123/s1bj6.jpg" border="0" class="linked-image" />
of course this is only very basic, you could do some really cool things like if a marine is shooting a gun inside a glass room, the sound cannot be heard for anyone outside of the room - UNTIL the glass is broken, letting through the sound.<!--QuoteEnd--></div><!--QuoteEEnd-->
Cool idea, but I'm guessing that it would be a lot of work for something that may not be too special. For example, in the picture you show I would certainly hope that the marines in rooms 2 and 3 could hear the fire from room 1. This is an automatic weapon, laying down constant fire, and only a few walls (with doorways, even) separate them. The same with an Onos making noise behind glass -- if the glass is easily broken from attacks then it's not some kind of sound/bullet proof glass and sound should be able to pass through.
Maybe the reason why most games use non-volumetric sound is because it still gives a life-like display of sound without too much work.
<!--coloro:#48D1CC--><span style="color:#48D1CC"><!--/coloro-->Day of Defeat: Source introduced a dynamic audio system that was limited to non-player characters in Half-Life 2. The sound of each weapon firing in-game is attributed with distance and occlusion variables, which are processed and then fed back to the player. Sounds far from the player lack higher frequencies and thus sound more like they naturally would, allowing for the actions of other players on a map to make up the ambient sounds for the level.<!--colorc--></span><!--/colorc-->
i loved the sound of the MG-42 firing in the distance, then when you get closer it turns into a roar <img src="style_emoticons/<#EMO_DIR#>/asrifle.gif" style="vertical-align:middle" emoid="::asrifle::" border="0" alt="asrifle.gif" />
On word of warning is not to use binary systems for the audio. After all, some walls let sound through like paper, while other walls mute everything below a jackhammer. This dampening coefficient might be inherent to the material being used as well as the thickness of the walls. I mean, why not go all the way to a good sound model?
Even more fun would be multi-layered walls. (OMG!) Basically, perhaps the mapper wants a thin, but heavily damped wall, so the parts seen by the players is one material, but the mapper uses another material internally to increase sound dampening.
I'm assuming for this system that empty space is considered "air" for the purposes of sound between walls. One interesting side effect would be maps where all the spaces between hallways and such would now be filled with material, unless you want a space station made of a network of hallways.
Well thinking about it you could change pitch as well, with a plus and minus variable. Concrete would drop pitch by 2 octaves and glass would raise it 1 octave. Or only let it pass a certain frequency range...
I don't know much about programming but it seems simple... ish.
Well thinking about it you could change pitch as well, with a plus and minus variable. Concrete would drop pitch by 2 octaves and glass would raise it 1 octave. Or only let it pass a certain frequency range...
I don't know much about programming but it seems simple... ish.<!--QuoteEnd--></div><!--QuoteEEnd-->
Now you're talking about on the fly Fourier Transforms of sound to mess with frequencies. Not a good idea on the coding side.
A simple percentage system might work. Just bind the wall to an entity with the values, and then render.
But ya the volume change should be easy, light on the CPU side too.
It looks simple to do this kind of sound modelling, but if you think about it, what you essentially have to do is a do is essentially a raytrace for every possible path the sound could take from the originator to the listener to get the sound modifying properties of the materials and the directional component right.
Even if you make it only grossly approximate, it's going to be computationally intensive enough that you need to compile it offline (like the RAD process, which is very analogous to this) but then you have a memory problem. With the RAD lighting problem, you just take all the lights in the map one by one, solve all their rays, and add that light to each volume. It's an additive process, so there's just one lighting number for each volume.
With the sound case, you don't know what the sound is going to be ahead of time, so you have to work out the effect to apply as a sound propagates from one given volume to another. This means that for each volume you need to compute this value for, you need to store a number of effects equal to the number of volumes. This means that memory usage and compile computation time is going to rapidly increase as the simulation quality is improved by reducing the size of the simulation volumes and increasing their number.
You really would have to quick and dirty something like this instead, maybe just a single trace from sound source to listener, damping more or less depending on intervening material, but it wouldn't really be much better than the current system.
Two factors: Distance and LoS. If you haven't got LoS to the sound source, you look at a different distance-to-volume scale. It's not perfect, but it's a cheap and easy means of arriving at a passable simile.
--Scythe--
Two factors: Distance and LoS. If you haven't got LoS to the sound source, you look at a different distance-to-volume scale. It's not perfect, but it's a cheap and easy means of arriving at a passable simile.
--Scythe--<!--QuoteEnd--></div><!--QuoteEEnd-->
I'm quite interested in how LoS actually works on first person games. It doesn't seem very accurate on NS when it comes to seeing hostile buildings and transmitting them to the comm view at least. It's probably more than accurate enough for the sounds, even on the HL1 anyway.