Jump to content
Sign in to follow this  
Balschoiw

3 way sounds for weapons

Recommended Posts

I was wondering if it would be possible to implement some kind of 3 -way sound system in OFP 2.

Right now we have one unique gunsound for every weapon.

No matter if you´re shooting in an urban scenario, in houses or in the wide open you have the same sound.

In reality it´s different.

You get a weapon sound with lot´s of reverb when in wide open areas.

You get a dull weapon sound when in urban scenarios as the sound is reflected very diffuse by walls, objects, etc.

Within houses or buildings in general you get a sound that is very fat. As walls are close the reflection of sound is much greater than in open areas. Reverb delay is much shorter than in urban areas so that the sound itself looses little of it´s strength and frequencies.

I guess the differences in sounds could be implemented in the new engine.

Either those sound is calculated in real time which will unfortunally put load on the engine, or you go with 3 predefined weapon sounds for every pistol or rifle.

By creating zones on the map the engine could determine which weapon sound should be used.

To illustrate the concept I uploaded a G36 weapon sound with all 3 setups.

Ambient G36 gunsounds

Share this post


Link to post
Share on other sites

Also, in urban areas the reflected gunshot sometimes sounds like it was fired was from a different direction. That`s a pretty important sound illusion on a battlefield, but I think it needs to be done in real time...

Maybe they could do the whole `real time sound engine` stuff, with the ability (for slower pc`s) to choose the non-dynamic sounds (with those sound samples connected to the particular environment/sorroundings). Just like with this dynamic destructable buildings system.

Share this post


Link to post
Share on other sites
Quote[/b] ]but I think it needs to be done in real time...

I think this will not work well as the calculations that need to be done to actually reflect the current environment are very heavy. This would include a tracing option of soundwaves and reflection calculalations depending on the material that is the sound reflector. Most of the times you will end up with an indefinately long string of objects that are part of the live sound creation process.

In my opinion this is very stressy to cpu and I don´t think BIS will be able to incorporate real time sound calculations based on a real reflection system.

Therefore I suggested the use of predefined weapon sounds that change if the player is in the appropriate surrounding. I know that solution is nowhere near perfection but it´s an approach that would pay tribute to different surroundings without putting stress on engine or cpu. The only stress is bigger soundfiles for the guns and the determination by the engine which sound to use.

Quote[/b] ]Dont forget the long distance "popcorn effect"

As OFP already had a sound travelling system I guess this will be certainly included.

Share this post


Link to post
Share on other sites

I think now about something which could reduce to the minimum the effect of those zones...You`re in one, than suddenly you`re in another....

The sound isn`t allways the same in every part of the particular zone, but it can`t be done fully in real time. What about one clean soundfile and disortion setting for each zone, so that the sound is being disorted dynamically within those particular zones. Particular zone has it`s own effect for ex: the outdoor zone adds the echo effect.... Nevertheless the problem of changing those zones stays...

Got it! If it`s not gonna be real time at all, It`s not going to be affected by objects like units,vehicles,aircrafts and so on... Imagine something like that: each point on the map have its own disortion value...how to explain that...

You know, like isotherms or something like that...I`ll have to make a sketch...

map1.jpg

A - is the urbanized area (in A there are `indoor zones`)

B - is a forest

I`m not an expert when it comes to the physics of sound waves but if someone could transform this kind of map into `how would be the sound disorted` thing, and change the meaning of the colours into a different disortion effects, so that the colors could fluently fade from one into another you would have a look at what I have in mind.

Each color is a different value for the disortion effect(s), so that every place on the island has it`s own disortion value...

The things which are changing, are just numbers, you need only one, basic sound file to do that...  

Now, I completelly don`t know if it can be done or not... huh.gif

edit: Of course colors meaning sound disortion wouldn`t `fit` to those meaning different heights, besides there are objects like buildings, placed on a different heights so...It`s obvious...

Share this post


Link to post
Share on other sites

It´s not about distortion, it´s about selective reflections and altering the sound itself.

You have to imagine sound spread like the spread of light. If you take a raytracing process in mind you get the basic principle.

Basically sound travels like directed rays from an emitter. It´s reflected and altered by structures it hits and the atmosphere itself. The sound changes over distances aswell as the frequencies that a sound consists of have a different "lifetime". While LFO´s travel over big distances HFO´s and MFO´s are somehow "eaten" up by the surrounding.

The middle spectrum of the sound will be almost lost over big distances.

As the sound travelling is indeed much more sophisticated than calculating light emissions a close-to-reality-system is highly unlikely.

A realitme calculation of light traces is complicated and hardware consuming, but a real-time sound calculation is even more sophisticated as light looses visible rays on material reflection, while sound just alters it´s spectrum. While we can not see ultraviolet light reflections as the eye is not able to, we can hear altered sound reflections as the ear is capable to do so.

It´s not just distortion. Listen to the samples again, there is much more difference within those sounds than a realtime engine today could handle.

For the transition zones between the sound-definition zones I mentioned in the first post there is quite some easy solution.

For houses, no big deal. Just make an extension in the object that tells the engine that within houses the house-sound is used. I guess noone would really complain if he shoots from a window and the house sound is on. Same goes for doorways, etc. Step out of the house and you set your foot on an area that has to be marked within the map by the map creators. You don´t have to exclude the houses or structures here as the objects extension will tell the engine that if a player is within a building it shall use the indoor sound.

The only real transition I see is the area around a village or town. Create some kind of buffer-zone around them and add a sound that is right between the open terrain setup and urban setup. Less reverb and echo and more solid frequencies in the middle range and there you go.

As long as a realtime processing with acceptable CPU load and results is not achievable a workaround has to be done.

Of course we do not know if the magic programmers at BIS are working on something that could be groundbreaking but from the things I´ve read on the subject it looks like a complicated thing to me.

A workaround with acceptable results that actually reflects the surrounding you´re operating in would be awesome imo.

I play a lot of FDF and while I do like the mod very much there is a flaw that really disturbs me all the time. They have bolt action rifle samples that reflect the sound of the rifle being shot in the wide, wide open. It just does not sound right when you´re operating in urban scenarios. The brain tells you that the sound cannot be right. The sound of course sounds great, but not in unsuitable environments and therefore I thought about a workaround that can satisfy me and the rest of the gang.

As I said, maybe BIS come up with something really groundbreaking, but if not they could at least have a thought about that "workaround" welcome.gif

Share this post


Link to post
Share on other sites
It´s not about distortion, it´s about selective reflections and altering the sound itself.

You have to imagine sound spread like the spread of light. If you take a raytracing process in mind you get the basic principle.

Basically sound travels like directed rays from an emitter. It´s reflected and altered by structures it hits and the atmosphere itself.

Well, you misunderstood me, that`s the part of `physics of sound` I already know, I just wanted someone better than me to do the map job...

I think adding different disorion effets like echo, and manipulating the frequencies could be done at the same time.

Map would have those different sound effects placed everywhere, so the sound engine would only recognize players possition on the map and add a particular effect to the sample, no matter what effect that would be. Of course that would need a lot of extra work with the map, but it would solve the problem of real-time sound traveling. You got the illusion of dynamic sound, there`s only one sample (not 1000 of them), and almost every pixel has it`s own `sound dissortion*` value.

*By sound dissortion I mean all the necessary effects like reverbs, echoes and the frequencies changes...

Still don`t know if it`s doable...

Share this post


Link to post
Share on other sites

The calculations that need to be done using your idea will not work in realtime, I´m afraid. You set up the effect parameters but the sound needs to be calculated over and over again as it is calculated in realtime. Won´t work I´m afraid. If you keep in mind that the player is not alone on the map and calculations have to be conducted for any unit on the map you can imagine that this will just blow your comp out of the window.

Quote[/b] ] but it would solve the problem of real-time sound traveling

Imo there is no problem with it. Current OFP engine already does support something like that. It doesn´t matter which sound you use, the distance effects are not very demanding, neither for hardware, nor for the engine.

Quote[/b] ]Still don`t know if it`s doable...

I don´t think so.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×