Forum Thread
  Posts  
Sound Simulator in 3D environment. (Forums : Cosmos : Sound Simulator in 3D environment.) Locked
Thread Options
Apr 14 2009 Anchor

I had a thought that a program in which you could have some different objects assigning mass and material to them. Simulate some colliding and make a sound from it.

Lets say a rock is falling on a wooden floor and the simulation calculates the physics and tremors made from this collision. And from all the tremors a sound is created. Explosions could probably be simulated too. I doubt about sound from fire though!

This would help make the sounds you would otherwise record in real life. Of course this simulator wouldn't be meant as ingame feature... just a simulator! But then again making a complex sound such as gun firing would need many more attributes.

Is there a program like this or is it just too hard to make, or not worth the effort?

[edit] Ah! I though I wouldn't find anything through google! :)

Edited by: Pendrokar

Gibberstein
Gibberstein Generic Coder Type Thing
Apr 14 2009 Anchor

Such a program would be extremely complex - you're talking about the sort of thing that is done on supercomputers in research labs.

--

"lets say Portal is a puzzle game, so its a rehash of Tetris"
- Wraiyth points out the craziness of stereotyping games by their genre

Apr 14 2009 Anchor

Supercomputer... why? Collisions could also be rendered. All you really need is the resulting sound.

The program would have simple graphics for real-time management. Putting objects like in 3Ds MAX.

IMO making AI is extremely complex! More complex than making a program like this!

Gibberstein
Gibberstein Generic Coder Type Thing
Apr 14 2009 Anchor

Fine, if you know more than me about how you'd run a physical simulation with a fine-grained enough fidelity to usefully model the production of soundwaves, you'll have no problems building one.

If you're already so sure of the answer, why do you even ask the question?

--

"lets say Portal is a puzzle game, so its a rehash of Tetris"
- Wraiyth points out the craziness of stereotyping games by their genre

intensewar
intensewar Underground cockroach
Apr 14 2009 Anchor

You can render sounds.But then you will need alot of sounds files.Only if there is super computers then you could make perfect sound colision.

Assaultman67
Assaultman67 Needs a fuckin' title
Apr 14 2009 Anchor

Are you talking about some sort of computer program that could synthesize sounds based on material collisions ... because ... that would be EXTREMELY complex :P ...

But i don't want to say that only a super computer could do it ... i dunno ... it would depend on how much your system is generalized ...

In the end it would just be so different to anything ive ever heard of ... the end results would be like a bat's version of a 3D videogame :P ...

Would take years of different versions untill a decent audio engine would come out ...

--

My links:|Xfire|Mars Wars 3|Steam|
My Mod/Game Watches: |Lift Mod|Overgrowth|Airborn|Warm Gun|

Apr 14 2009 Anchor

Gibberstein wrote: If you're already so sure of the answer, why do you even ask the question?

Because collision of objects would be simple to make in that program. Problem comes to more complex objects. Such as a gun firing. You'd be making a realistic gun that needs all internal physics correct. It is the amount of time taken for the preparation which would probably take longer than having someone shoot a gun in specific environment while recording the sound. That probably costs more cash though!

So i think a program which can simulate sounds for colliding objects is all that can be made useful for other people. Is it worth the effort?

Oh wait you wouldn't really need mass. All the object needs is density of the material and the material itself. Though I can't say if a sound sample wouldn't be required.

Gibberstein
Gibberstein Generic Coder Type Thing
Apr 14 2009 Anchor

Pendrokar wrote: Because collision of objects would be simple to make in that program.


To model a sound, you need to accurately model the microscopic deformations of the object generating the sound, and you need to update the simulation in timesteps of 1/48000th of a second. That's millions of times more accurate than a game physics simulation, and at that precision, even 'simple' objects are not simple.

I've done some rough estimates, and to model something accurately enough to synthesize a recognisable sound would require days or weeks of processing time on a home PC to produce a second of audio. This is definitely supercomputer territory.

--

"lets say Portal is a puzzle game, so its a rehash of Tetris"
- Wraiyth points out the craziness of stereotyping games by their genre

mSparks
mSparks Physcological Warrior
Apr 14 2009 Anchor

I dont know if its exactly what you are looking for, but I made an (LGPL) project along these lines a few years back. called q2a3d it was a sound engine plugin for Q2 in C/C++ where basically you created sound object in 3D space (so the sound was rendered properly in 3D with a surround sound hardware setup), openal handled stuff like Doppler for moving sounds and EAX for environmental effects like caves/hall etc, I guess all you're really missing is a wav synthesiser for texture+velocity.
game project is at www.cam-direct.co.uk/ltk/ msg me and I'll give you dev access, source isn't online afaik but was used in paintball 2 and q2evolved and I usually just refer people on to more up to date source code for any Q2 stuff, but I can fish out the code for q2a3d if you want, been toying with the idea of putting some time into LTKTBMv2 recently (especially given some of the progress I've been making with its master project LTBTBM) and even pulled together some of the resources I need for a release, hoping to get some time after my Masters exams next month but these days I'm so damn busy I don't like making any promises.

--

__
For you are the children of your father the devil, and you love to do the evil things he does. He was a murderer from the beginning. He has always hated the truth, because there is no truth in him. When he lies, it is consistent with his character; for he is a liar and the father of lies.
__
If you have nothing to lose you have nothing to hide:
If you have nothing to hide you have nothing to fear:
Theborgmatrix.com

Apr 15 2009 Anchor

Gibberstein wrote: That's millions of times more accurate than a game physics simulation

ahh... Then that will probably be possible 10 years later!

@mSparks
I know you're talking about sound sample behaving right in an environment not making new sounds!

Nsways
Nsways Audio Producer
Apr 15 2009 Anchor

Obviously it is a very complex process and there are many variables you would have to consider.
Frequency & Sound synthesis, Geometric simulation techniques, Distance Ambiance & Sound Rendition and for the computer to calculate and render
these variables (from scratch) and many many more it would seriously take an immense amount of processing power to create and render the correct frequencies. However mankind never ceases to amaze me, take a look at the mathematics formula of pie and how we can get more cuts from a single piece of pie then we could before just by being logical. It wouldn't surprise me if such a thing is being developed already by developers or scientists. In fact there's probably something out there on the net but on a much more simpler scale but for now I'd have to agree with Gibberstien. It would take an immense ammount of processing power to get such a thing running. Just keep your eyes open over the next few years.

mSparks
mSparks Physcological Warrior
Apr 15 2009 Anchor

"I know you're talking about sound sample behaving right in an environment not making new sounds! "

Well, all you'd need is a synthesizer, you only really have two types of sound, impact and oscillator. Oscillator would be fairly straight forward, just need size, mass and frequency and every object pretty much sounds the same, impact would be slightly harder, because you would need to specify an elasticity against a texture, and create an algorithm to generate the frequencies and magnitude (something using reverse FFT would probably suffice) of two oscillators given the two elasticities colliding and the velocity they impact, stuff like EAX and doppler would then filter those frequencies according to the environment, deal with things like echos etc.

A decent gaming soundcard (e.g. creatives live range) should be able to handle all that on board right now (no need for the CPU for anything other than the reverse FFT).

You might need to get technical with some kind of precalc, because the eye ear coordination is senstive to anything longer than a ms or more delay, no point in generating the sound if it doesn't play until >1ms after an event.

But in the end, whats the point, you'll get better results making small sound samples and using filters to modify them in realtime. and its a hullva lot less effort.

What Nsways is discussing is already mostly present in the EAX and openAL platforms from creative, and has been for many years.

Edited by: mSparks

Assaultman67
Assaultman67 Needs a fuckin' title
Apr 17 2009 Anchor

Gibberstein wrote: ... I've done some rough estimates, and to model something accurately enough to synthesize a recognisable sound would require days or weeks of processing time on a home PC to produce a second of audio. This is definitely supercomputer territory.


Show your work please :) ...

The idea of this has me curious ... and i honestly don't think it would be completely impossible ... I think you are just looking at some of the smaller details too much ... For 3D engines There are definitely alot of generalized visual details but the end results still look good (or good enough) ...

You don't think it would be possible at all to use some sort of generalizations for a "sound drawing" engine ... After a collision, a function could be made to pinpoint the exact location on each colliding object for a source, the mechanical energy transferred, and the resulting "wavetrace" would run of those initial conditions The wavetrace function would be a bit complex though i must admit due to you not being able to assume an instantaneous trace ...

to use a visual representation of whats going on ... it would be like every object in the scene being mirror-like yet semi translucent, with a refraction applied to it, and a diffusion map that corresponds to specific wavelengths that are allowed/absorbed ...

Im still not saying the first engine would be the most convincing ... (sort of like the "doom" of sound) ... but as the understanding of the properties of sound increase, the better the sound quality would get due to better generalizations ...

--

My links:|Xfire|Mars Wars 3|Steam|
My Mod/Game Watches: |Lift Mod|Overgrowth|Airborn|Warm Gun|

ambershee
ambershee Nimbusfish Rawks
Apr 17 2009 Anchor

Gibberstein wrote:

Pendrokar wrote: Because collision of objects would be simple to make in that program.


To model a sound, you need to accurately model the microscopic deformations of the object generating the sound, and you need to update the simulation in timesteps of 1/48000th of a second. That's millions of times more accurate than a game physics simulation, and at that precision, even 'simple' objects are not simple.

I've done some rough estimates, and to model something accurately enough to synthesize a recognisable sound would require days or weeks of processing time on a home PC to produce a second of audio. This is definitely supercomputer territory.


Time for cloud computing!

Arxae
Arxae Resident Stepmania Freak :D
Apr 17 2009 Anchor

ambershee wrote:

Gibberstein wrote:
Pendrokar wrote: Because collision of objects would be simple to make in that program.


To model a sound, you need to accurately model the microscopic deformations of the object generating the sound, and you need to update the simulation in timesteps of 1/48000th of a second. That's millions of times more accurate than a game physics simulation, and at that precision, even 'simple' objects are not simple.

I've done some rough estimates, and to model something accurately enough to synthesize a recognisable sound would require days or weeks of processing time on a home PC to produce a second of audio. This is definitely supercomputer territory.


Time for cloud computing!


onlive! :o >_>

--

°w°

Cryrid
Cryrid 3D Artist
Apr 17 2009 Anchor

Doesn't sound like it would be worth the effort (see what I did there? :P)
Companies already have massive sound libraries, audio engineers, and foley artists. Why pour money into R&D to fake sounds when they can just record them.

The existing way allows the audio to be more accurate, and also less accurate when needed for effect (hollywood effects like bullets whizzing past your head, for example).

Assaultman67
Assaultman67 Needs a fuckin' title
Apr 17 2009 Anchor

Cryrid wrote: Doesn't sound like it would be worth the effort (see what I did there? :P)
Companies already have massive sound libraries, audio engineers, and foley artists. Why pour money into R&D to fake sounds when they can just record them. ...


But we don't have massive sound libraries, audio engineers, and foley artists ... plus ... Its just sounds like a wicked cool thing to play with :P...

sure, the sounds would kinda suck in some situations ... but im sure people would find a good use for it despite that fact ...

... hypothetically that is if someone actually made it ...

ambershee wrote: ... Time for cloud computing!


Heh,

"YO DAWG I HERD YOU SYNTHETIC AUDIO SO I PUT 2000 MILES BETWEEN YOU AN DA SERVER SO YOU CAN LAG WHILE YOU LAG"

:P

Edited by: Assaultman67

mSparks
mSparks Physcological Warrior
Apr 17 2009 Anchor

There's an FFT demo here
Patrick.furon.free.fr
reverse FFT goes the other way.
just generate the frequencies amplitudes you want and you get the resultant time domain wavelet out the other side (one of my first audio programming projects was a 2048 band graphic equalizer using this kit, its as cool as algorithms come.
It would be worth it in the sense of you dont need to 'record' all the sounds, but you would need to record a few and run it through the alg to work out how the frequencies are generated. If you are interested in audio/DSP you are nothing without a decent understanding of this algorithm, even if its just what it does.

Edited by: mSparks

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.