PDA

View Full Version : Sound Velocity

Mave_FI
03-26-2004, 12:32 AM
Ok, time for a serious topic this time http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif

Would be nice to have sound velocity modelled in future-sims, don't know how hard it would be to implement it or how much cpu-time it would take to do it.

Example: If you fly in 50m height and drop 500kg bomb with 2.0s delay, you are flying 360km/h TAS, let's say that the bomb takes about 2.0s to drop, that would mean that you have 4.0s time to fly forward, which would mean that you get 400m away from the explosion (360km/h == 100m/s), the sound of the explosion will travel something like 340m/s, meaning it will take some time for the sound to travel to you, and during that time, you are also flying away, so after you see the explosion, it would take something like 2 seconds for you to hear the bang.

Also if you shoot bomber from 300m away flying 300km/h behind it, if you manage to explode the bomber, you would hear the bang about 0.5s later...

Lost the interest to calculate the exact times, but I think you got the point http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif

That would add some realism to the sim, but don't know if it's worth the performance-loss...

And if I'm correct, even the frequency of the explosion-sound should vary depending on your movement-direction relative to the soundwave, if you are flying towards the sound -> higher frequency, and if you are flying away from the sound -> lower frequency.

Wondering if any game today has that modelled, maybe Operation Flashpoint? Cannot remember...

Oleg: So here's something for you to think for the future-sims, don't hurry too much http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif

Mave
www.lufthunden.com (http://www.lufthunden.com)

Mave_FI
03-26-2004, 12:32 AM
Ok, time for a serious topic this time http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif

Would be nice to have sound velocity modelled in future-sims, don't know how hard it would be to implement it or how much cpu-time it would take to do it.

Example: If you fly in 50m height and drop 500kg bomb with 2.0s delay, you are flying 360km/h TAS, let's say that the bomb takes about 2.0s to drop, that would mean that you have 4.0s time to fly forward, which would mean that you get 400m away from the explosion (360km/h == 100m/s), the sound of the explosion will travel something like 340m/s, meaning it will take some time for the sound to travel to you, and during that time, you are also flying away, so after you see the explosion, it would take something like 2 seconds for you to hear the bang.

Also if you shoot bomber from 300m away flying 300km/h behind it, if you manage to explode the bomber, you would hear the bang about 0.5s later...

Lost the interest to calculate the exact times, but I think you got the point http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif

That would add some realism to the sim, but don't know if it's worth the performance-loss...

And if I'm correct, even the frequency of the explosion-sound should vary depending on your movement-direction relative to the soundwave, if you are flying towards the sound -&gt; higher frequency, and if you are flying away from the sound -&gt; lower frequency.

Wondering if any game today has that modelled, maybe Operation Flashpoint? Cannot remember...

Oleg: So here's something for you to think for the future-sims, don't hurry too much http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif

Mave
www.lufthunden.com (http://www.lufthunden.com)

Fennec_P
03-26-2004, 12:48 AM
Mechwarrior 2: Mercenaries had this feature. Distant weapons and explosion sounds would take a short time to get to you. It greatly enhanced the sense of distance and scale, giving it a kind of "3D" sound.

Given that MW2 was made in the late DOS days, there certainly aren't any performance issues associated with the feature.

A lot of games model doppler shift (as IL-2 and FB does), but I don't know of any recent games that model delayed sounds. Funny, as it really is a good feature.

Mave_FI
03-26-2004, 12:58 AM
Aah! Good old Mechwarrior... Nothing is like it used to be...

Ok, so the "Doppler Shift" is the thing, but does IL-2 only have it modelled so that planes sound different from different angles?

Hmm, if you are flying at the speed of sound in the soundwave of an explosion, what will you hear? http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif

Mave
www.lufthunden.com (http://www.lufthunden.com)

03-26-2004, 01:05 AM
Excellent idea for future sims.

Seeing a distant explosion and hearing it at the exact same time really kills the realism.

Leech_
03-26-2004, 01:55 AM
We need to separate the sound delay and the doppler effect.

I think FB does a good job modelling the doppler effect. Try it with guns blazing with the F3 flyby view. Works Ok.

Now the delay. Havent thought about this before, but i think there is none. This is a thing to check this evening: although dopplered ok, will you hear the gunnery from 500m instantly or with a delay.

Cheers,
Leech / Lufthunden
www.lufthunden.com (http://www.lufthunden.com)

Mave_FI
03-26-2004, 02:08 AM
Instantly...
That's why I started this topic http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif

Mave
www.lufthunden.com (http://www.lufthunden.com)

Leech_
03-26-2004, 02:17 AM
Yeah, I was just answering the 'frequency' parts of your inquiry. As for the delay, it would be a killer idea to implement!

Cheers,
Leech / Lufthunden
www.lufthunden.com (http://www.lufthunden.com)

WUAF_GenSwat
03-26-2004, 07:18 AM
Next thing U know thell want hiroshima and a nuclear bomb moddled lol joke

03-26-2004, 07:34 AM
Operashion Flashpoint nice man http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif. I am a big fan of this game and it have this sound velocity things (trying setting charges 700m and exploding them). And it would be great to have this fuature in IL-2 http://ubbxforums.ubi.com/images/smiley/16x16_smiley-wink.gif

VVS-Manuc
03-26-2004, 07:41 AM
tha sound of FB is crappy

lindyman
03-26-2004, 08:52 AM
I used to push for this, but since I'm not conviced you're at all able to hear the explosion through the engine noise, I'm not sure it's a good idea to spend CPU cycles on it. That is, if you're not unlucky enough to also have your engine shot out and you have to make a deadstick landing. Then you'd hear the explosion.
_
/Bjorn.

Mave_FI
03-26-2004, 09:05 AM
I bet you can hear the explosion of 500kg bomb even if you have your engine on, it's not any new years "firecracker" (atleast here in Finland) you know http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif

Mave
www.lufthunden.com (http://www.lufthunden.com)

Leech_
03-26-2004, 09:29 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> I'm not sure it's a good idea to spend CPU cycles on it.
<HR></BLOCKQUOTE>

I think it would be quite light on the processing department if done loosely. Like every object that produces sound, has coordinates already. From the sound starting time the circle begind to grow from these coords at the speed of sound. Since the dopplers are already made, they could be kept as a whole separate thing (yeah ugly, but theyre there and it would work quite nicely)

Cheers,
Leech / Lufthunden
www.lufthunden.com (http://www.lufthunden.com)

effte
03-26-2004, 01:37 PM
You'd simply need to calculate the time when the sound should be played back in each client each time a sound creating event occurs. t_playback=t_current + r/a, r being the distance and a being the speed of sound.

You will not see the effect of aircraft moving between the vent and the time the sound gets there, but it should be good enough.

Of course, you'd need to take into account that the speed of sound varies with temperature... http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif

Check out LOMAC. Mach cones... whoa!

Cheers,
Fred

airjunkie
03-26-2004, 04:26 PM
hey I agree next patch work on that static camera
sound

lindyman
03-27-2004, 01:49 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by effte:
You'd simply need to calculate the time when the sound should be played back in each client each time a sound creating event occurs.
<HR></BLOCKQUOTE>

True, but it becomes difficult when the sound is not a dirac pulse, but somewhat prolonged, and your distance varies over that time. This change in delay is the exact thing that causes the doppler effect. You then either end up doing also the doppler calculations this way (quite CPU consuming, I would expect, compared to just a freq. shift based on relative speeds) or having two sets of calculations that interfere with one another.

As for being able to hear it, I'm not conviced. You have one very loud sound source 1m or so away from you. You have another one, far louder for sure, 400m from you. Amplitude is inversly proportional to the distance squared, so for the two to appear about equal, the explosion would have to be 160000 times louder in the above example. It is not impossible, but I'm not conviced.
_
/Bjorn.

WWMaxGunz
03-27-2004, 02:41 AM
Sound at standard temperature and pressure is how fast? It says 340.29 m/s.

Drop that bomb at 50m and if the ground is at 0m then it will take over 2 seconds to hit in which time it is still pretty much beneath you unless it has a parachute or high drag fins! There's a reason not to drop real bombs of any decent size from that low, you'll not just hear the explosion! Anyway you won't be far enough for a 2 second delay at all.

Difference between light and sound like lighting flash and thunder boom is very close to 5 seconds per mile. A mile is over a kilometer and a half.

I'm sure it's possible to get the delay. It may even help with other issues such as sound volume dropoff where AA guns far away sound very close. but what would we lose in return? Maybe more than just some more framerate really. Size of code is important and only so many details and features fit in the box, be sure! Close to real is for future computers, we get a subset and hope for the elements that are best.

Neal

Dmitri9mm
03-27-2004, 05:18 AM
I have only one thing to say:
Do it, do it, do it, do it!

http://www.kenston.k12.oh.us/khs/tplookalike/dude.jpg
"...Nothing is f**ked man."
"Nothing is f**ked?!!!?! The godd**ned plane has crashed into the mountain!"

lindyman
03-27-2004, 10:48 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by WWMaxGunz:
Drop that bomb at 50m and if the ground is at 0m then it will take over 2 seconds to hit in which time it is still pretty much beneath you unless it has a parachute or high drag fins!
<HR></BLOCKQUOTE>

Yes. But if you're in an IL-2, travelling at 2m altitude, dropping your bomb with 2s delay just before a bunch of tanks, you'll be nearly 2s of travel away from the tanks when the bomb goes boom. http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif
_
/Bjorn.

Mave_FI
03-27-2004, 12:07 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Drop that bomb at 50m and if the ground is at 0m then it will take over 2 seconds to hit in which time it is still pretty much beneath you unless it has a parachute or high drag fins! There's a reason not to drop real bombs of any decent size from that low, you'll not just hear the explosion! Anyway you won't be far enough for a 2 second delay at all.<HR></BLOCKQUOTE>

Well, that wasn't actually my point here, it was just an example http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif
We have this saying in Finland... "Nussit Pilkkua"

Go figure out what it means, or maybe some Finn can translate it to you http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif

Mave
www.lufthunden.com (http://www.lufthunden.com)

WWMaxGunz
03-27-2004, 06:55 PM
And we have a saying you can translate yourself:

Don't be so touchy! Okay?

Neal

effte
03-28-2004, 05:53 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by lindyman:
True, but it becomes difficult when the sound is not a dirac pulse, but somewhat prolonged, and your distance varies over that time. This change in delay is the exact thing that causes the doppler effect.
<HR></BLOCKQUOTE>

"Be sure" that the algorithms for taking care of continuous sounds (with doppler frequency shifts) are already different from those taking care of sounds played once. For intermittent sounds, follow the algorithm described above and increase or decrease the frequency by the airspeed towards or away from the target.

You could even apply the same closure speed to get an even more approximation of a correct timing of the sound, without needing to continuously update your calculations in real time, as the previously suggested algorithm would have required.

Cheers,
Fred

Mave_FI
03-28-2004, 10:32 PM
Bump.

Mave_FI
04-01-2004, 08:07 AM
Bumb again so VIP sees this...

Nikodemus-LH
04-01-2004, 09:46 AM
Sounds Great!
Atleast Operation flashpoint has that sound effect .
And it dosent use that much CPU power.
One possible and easier way to make it would be that the sound engime calculates the distance of every plane at the moment of explosion.Its not necessary to calculate planes movement after that.
Even that way the effect would be much realistic.