Volumentric SOUND/AUDIO

schkorpioschkorpio 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.

Comments

  • PlasmaPlasma Join Date: 2003-04-26 Member: 15855Members, Constellation, Squad Five Blue
    That would be pretty cool to help with immersion in the game.
  • ljcrabsljcrabs Join Date: 2007-11-15 Member: 62924Members
    Everyone knows NS2 is going to be awesome, but small things like this take it to the next level. Great idea.
  • SentrySteveSentrySteve .txt Join Date: 2002-03-09 Member: 290Members, Constellation
    <!--quoteo(post=1683213:date=Jul 13 2008, 01:39 AM:name=schkorpio)--><div class='quotetop'>QUOTE(schkorpio @ Jul 13 2008, 01:39 AM) <a href="index.php?act=findpost&pid=1683213"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->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.<!--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.
  • BuzzouBuzzou Join Date: 2006-12-14 Member: 59056Members, Constellation
    this reminds me of the way sound is done in day of defeat, here's a description from wikipedia:

    <!--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" />
  • spellman23spellman23 NS1 Theorycraft Expert Join Date: 2007-05-17 Member: 60920Members
    This sounds pretty awesome.

    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.
  • locallyunscenelocallyunscene Feeder of Trolls Join Date: 2002-12-25 Member: 11528Members, Constellation
    It would be a cool effect. I wonder if it would take similar processing power to dynamic lighting.
  • BacillusBacillus Join Date: 2006-11-02 Member: 58241Members
    What do you think about an echo? I mean gunshots and inhuman screams echoing through metal hallways is an essential part of scifi horror. I don't know how that works on the gameplay though.
  • invader Ziminvader Zim Join Date: 2007-09-20 Member: 62376Members
    this would be uber cool. many games developers havnt really done much with sound compaired with visuals in games. Such changes as these would have huge tactical implications for games. Ambushes and combat in other rooms would be totally different as well as the immersion value. I think its pretty lame in ns1 that a good comm can find the hive by having a good ear straight away (on the other hand it makes shotty rush possible). If this kind of thing could be programed in to ns2 i would very much appreciate it.
  • ChromeAngelChromeAngel Join Date: 2002-01-24 Member: 14Members, NS1 Playtester, Contributor
    Using vis portals for sound dissipation might provide a quick n dirty simulation of this.
  • matrim1985matrim1985 Join Date: 2008-07-05 Member: 64562Members
    Remember that some sound does reverberate though walls. This could be simulated by the game looking at the thickness of the wall and even have a line of code in the texture to say weather this will channel the sound, let it though, or absorb it.
  • Matt_BLahMatt_BLah Join Date: 2006-11-02 Member: 58269Members
    Good idea... I am sure you could add a parameter to materials to let through a percentage of sound (to go the easy way of not changing the pitch of the sound or anything) say a breakable glass wall would let through 50% volume, and bullet proof would let through 5%.

    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.
  • ljcrabsljcrabs Join Date: 2007-11-15 Member: 62924Members
    For practicalities sake, I would argue against adding echo/reverb. Since it looks like a lot of the action is going to be done in places where there would be a lot of reverb, it would probably get acoustically/aurally tiring pretty quickly.
  • spellman23spellman23 NS1 Theorycraft Expert Join Date: 2007-05-17 Member: 60920Members
    <!--quoteo(post=1683434:date=Jul 15 2008, 03:32 AM:name=Matt_BLah)--><div class='quotetop'>QUOTE(Matt_BLah @ Jul 15 2008, 03:32 AM) <a href="index.php?act=findpost&pid=1683434"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Good idea... I am sure you could add a parameter to materials to let through a percentage of sound (to go the easy way of not changing the pitch of the sound or anything) say a breakable glass wall would let through 50% volume, and bullet proof would let through 5%.

    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.
  • Matt_BLahMatt_BLah Join Date: 2006-11-02 Member: 58269Members
    Ya thought it might be hard with the changing or chopping of frequency. Also very CPU intensive when near large fire fights.

    But ya the volume change should be easy, light on the CPU side too.
  • aiusepsiaiusepsi Join Date: 2007-06-29 Member: 61412Members
    The feasibility of this doesn't look great to me.

    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.
  • ScytheScythe Join Date: 2002-01-25 Member: 46NS1 Playtester, Forum Moderators, Constellation, Reinforced - Silver
    Easy shortcut for kinda-realistic volumetic sound:

    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--
  • BacillusBacillus Join Date: 2006-11-02 Member: 58241Members
    <!--quoteo(post=1684120:date=Jul 21 2008, 07:00 AM:name=Scythe)--><div class='quotetop'>QUOTE(Scythe @ Jul 21 2008, 07:00 AM) <a href="index.php?act=findpost&pid=1684120"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Easy shortcut for kinda-realistic volumetic sound:

    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.
Sign In or Register to comment.