#### Archived

This topic is now archived and is closed to further replies.

# Theory: Using math to camaflouge 2D Sound as 3D Sound

This topic is 5397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I came up with an idea that I''m surprised no one ever tried. 3D sound effects aren''t nothing special. They are just like 2D sound but the only difference is that the volume of a 3D sound effect is influence by the distance between the player and the location of the sound(the source). I was thinking maybe when making a 3D game, you wouldn''t have to bother with real 3D sound. Just use 2D sound and some mathematical equations that would calculate the volume of the sound. PlayerPosition - SoundSource= resultDistance; volume2D= resultDistance * (whatever you want). It really depends on the sound library you''re using. If you were using a sound library where the volume is on a 1 - 10 scale(10 for highest; 1 for lowest; 0 for mute) then you would multiple ''resultDistance'' by a number that would bring you a product that would fit the volume scale. Example: if( resultDistance == 60 ) volume2D= resultDistance * 0.1; -------- "Do you believe in Ghost?"

##### Share on other sites
Games have been doing this sort of scaling for years. But 3D sound is not only based on the distance between the sound source and the listener. It is positional. Read up on HRTFs as well as 5.1 surround sound.

"Sneftel is correct, if rather vulgar." --Flarelocke

[edited by - sneftel on January 12, 2004 5:13:28 PM]

##### Share on other sites
I know but can''t 3D sound(or surround sound) bloat up your game because I''ve heard 3D sound contains excessive data and memory crap. My mathematic theory is a cheap way of using 2D sound as 3D. Also, what do you mean by ''positional''?

--------
"Do you believe in Ghost?"

##### Share on other sites
With 3D sound the volume of the sound changes relative to the players position but also the sound volume for each speaker changes in relation to the players position to the sound - if you we''re standing to the left of the sound source then you would mainly hear the sound through your right-side speaker and vice-versa

My 2D game engine

##### Share on other sites
To make it more realistic you would also need to consider panning, otherwise you aren''t really modelling the sound in 3D, but 2D(disregarding stereo as being 2D, because if it is a stereo sample, then the sound may always be offset from the listener to some degree. I suppose your system is sort of a 2.5D system). To do this it simply means using the angle to the source as the parameter for the speaker panning. This is simple if you create the vector to the sound source in polar form. And it is scalable to multiple speakers should the need arise.

James

##### Share on other sites
the sound data does not change. Only the processing. There isn''t like, 5 times the sound for 5.1 surround. It''s one sound, and some maths are performed to compute the volume on each speakers.

for stereo, for example, you need to consider the orientation of the listener in respect to the sound, to calculate the volume on the left and right speaker.

##### Share on other sites
quote:
Original post by Leiarchy9
I know but can''t 3D sound(or surround sound) bloat up your game because I''ve heard 3D sound contains excessive data and memory crap.

It sounds like you haven''t really done your homework on this topic. Do some reading first, and then consider what improvements may be made.

"Sneftel is correct, if rather vulgar." --Flarelocke

##### Share on other sites
I would STRONGLY recommend you actually do some research into sound engineering.

Your "brilliant idea" is called amplitude scaling and the idea is decades old. It''s also rather simplistic, as distance doesn''t just reduce the sound''s volume, it also filters the signal.

And it''s also been used in countless games from at least the days of the PS1, if not earlier.

"3-D sound" doesn''t just reduce the volume based on distance, it also routes the signal to the appropriate speakers based on the sound''s location. Depending on the implemention, it also filters the sound to take into consideration room acoustics.

Primitive (i.e. stereo) versions of this have existed since the days of the Super Nintendo.

##### Share on other sites
WELCOME TO 15 YEARS AGO*

*rough estimate

[edited by - Nypyren on January 13, 2004 1:25:24 AM]

##### Share on other sites
I heard a few sound demo''s on my buddie''s audigy2 and that thing handles 3D sound like pie! 2 speakers and a sub (cheap computer mart deal speakers), filled the entire computer lounge room with sounds of a jungle. when positioned properly you couldn''t tell where sounds were coming from. It definatly didn''t sound like the speakers. The audigy2 must have some "math equations" going on that filters sound so that the speakers can throw it to another part of the room. Ventriliquists have been able to throw their voices for centuries. I guess just now the techniques are being developed into computer soundchips

1. 1
Rutin
47
2. 2
3. 3
4. 4
5. 5

• 13
• 10
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632992
• Total Posts
3009755
• ### Who's Online (See full list)

There are no registered users currently online

×