Game Development Community

BIG Flaw: 3D Sound

by Robert Blanchet Jr. · in Torque Game Engine · 07/15/2002 (9:22 pm) · 21 replies

Ok, well I'm starting this thread in the hopes that it will become the central place for all the programmers here to talk about the current audio system in Torque. There is a major flaw/oversight in the current audio system regarding 3D sounds. They simply don't work. By 3D sounds I mean spacial sounds such as hearing a bullet zip past you or hearing an explosion off in the distance.

The simple fact of the matter is, these things aren't possible in Torque even though the interfaces for them are already completed. As it stands right now, all sounds have no spacial differences between them other than if they are to the right or left of you (read: there is no depth/spacial clarity). This means that all sounds appear the same even though one explosion maybe 50 to 100 yards away from another.

I don't mean to sound crude, but I think a lot of the focus of development should be shifted towards getting the sound system to work right. I've spent the last two days trying to figure out why the sound I created for a projectile(for the water projectile fix found on the task list) wasn't following the projectile path only to realize the audio system just isn't capable of doing it yet, even though the function interfaces allow for setting spacial sound coordinates already.

Now, I'm very willing to help get the 3D sound working, but I am by no means knowledgable in sound engineering with respect to programming spacial audio effects. This is why I'm creating this thread. I believe if we can pool each others knowledge on this particular subject then we can come to better grips with understanding the audio system and how exactly to go about impliment 3D Spacial Audio Effects.

To begin, I have a hunch, a rather un-educated one I might add, that the first step to producing rather primitive spacial audio effects would be finding the distance from the players position(the listening position) to the position of the sound source(the emitter). With this distance we can then use some magical math formula to to determine the linear relationship between the volume of that sound source and the distance from the player.

This seems rather crude though, when you realize that for every 3D sound you'll have to find the distance from the listening position and the emitter position. This could add up to a rather hefty performance hit IMO. So is there a better way?
Page «Previous 1 2
#1
03/30/2003 (6:55 am)
bump
#2
03/30/2003 (11:06 am)
So Rob Jr right?
Sounds a bit of an arse if he is...
#3
03/30/2003 (12:20 pm)
I too am very interested in the sound system. In my opinion sound, espically 3D positional sound, is very critical to any FPS game. I have done some research on EAX. The EAX SDK has some examples on 3D positional sound along with demos. The examples cover some of your thoughts Robert. Since ALX is a wrapper for EAX I think we can find some of the answers there. I have to do something because the sound system will play a critical roll in our project.

I will post anything I come across that might have an affect on the sound system so long as other members are willing to speak up and post their thoughts also. I have been a GG member for only about a month now and have posted a few questions only to have them basically ignored. I have been ALL over the GG web site every day since I bought the SDK last month. Out of all the membership I have heard about there are only a handfull of people that actually post. Most of these are new members trying get help. Some members seem to care and try and help others while the rest complain. I am sure this is expected because you are basically dealing with the public. I truly believe that GG is trying to do their best and their philosophy pertaining to their business model is admirable. I have been around a while and have invested alot more money than this on trying to get into this industry. In my oppinion, the 'Torque Engine' as it stands, and also having access to ALL the source code is by far the best deal anyone is going to find. (If some of the associates would return email):0)

Sorry for the long speach but I had to get it out!

Let's do it!!!
MJ....
#4
03/30/2003 (1:24 pm)
I wrote that almost a year ago.

Quote:
Ian Hardingham
So Rob Jr right?
Sounds a bit of an arse if he is...

Um, what the heck is that supposed to mean?
#5
03/30/2003 (1:27 pm)
Robert
I didn't notice the posting date on your post! Sorry.. Have you had any luck on any detail using the sound system?

Thanks.
MJ....
#6
03/30/2003 (1:34 pm)
No problem really. I just dont understand what Ian Hardingham is getting at. If I'm not mistaken it sounds like an insult...


Anway, I wrote that a year ago. I hate reading over stuff I wrote over a year ago. Some of the things I said just don't make any sense, heh.

To fix most of my audio problems I found an older version of the OpenAl dll which seems to work, sometimes. Most of the problems with the sounds in the engine stem from poor implementation and the lack of current driver development on the OpenAL library.

It is kind of sad that such a good audio library that is free is left to rot on the web. I, as I'm sure many indie developers can't afford a $4,000 to $12,000 license to the Miles Audio Library.
#7
03/30/2003 (1:58 pm)
Man, I here ya about the $$. The response from Ian, in a way, was what I was talking about in my post. Have you looked at the demos on the EAX SDK? They have a tutorial that explains, by example, how the different affects are implimented using ALX..Audio fall off due to distance, etc.... That is what I am trying to work on now. Melv, from GG, seemed to know alot so I emailed personally about a week ago. So far no response. I know some of my questions may seem simple to people like him but I am still learning. He is probally just to busy.

MJ....
#8
03/30/2003 (3:10 pm)
Jackie, youve got to remember, most of us have "day jobs" AND our own GG projects to work on.

I'd like to hear about any new sound libs, I've got a feeling that openal is basically dead since the main developer went to epic.

I'll probaqbly just find a windows only drop-in library for now, and find another solution for other platforms as needed.

Phil.
#9
03/30/2003 (3:48 pm)
Rob, I think Ian's comment was that not having functioning positional sound was an ar*e not you ;)

Depending on your project something like Fmod is actually very cheap in the right situation, and is very capable (and probably most importantly cross platform). If you're with windows, DirectSound is actually very simple to work with, the largest problem i've actually had is translating my spatial data to the correct sizes. There's a whole heap of open source systems, but none seem particulary mature yet.

I've only recently become a convert of 3D sound, since i'd lived with a soundblaster live 1024 for a long time (which they'd touted as a good 3d card) and was very un impressed. I recently upgraded it to a Audigy 2 and i'm stunned at the difference. I found myself dodging energy bolts in Unreal 2 as close as I could just to hear them go past me!

It's a shame imho that sound hardware isn't standardised enough at this level or i'd be making it intergral to gameplay. I recently tried a test case with a friend by placing a sound based puzzle in a test level, and it he couldn't solve it. Not because it wasn't obvious, but because he didn't expect a sound based puzzle.
#10
03/31/2003 (1:42 am)
Sorry if that came across wrong, what I meant was (as Gareth says) that not having 3d positional audio is not a very good thing.

Ian
#11
03/31/2003 (12:08 pm)
@Phil, Please don't get me wrong. I am cerainly NOT complaining. I have a full time job also. I just have the opertunity to be able to work on our projects during the day also. I'll keep everyone posted on what I find out on modifying the sound system. I know it can be done because I have seen done using OpenAL!

MJ....
#12
04/02/2003 (6:33 pm)
Robert, sorry my bump made you read old info. Our project is just getting started, it's an fps so correct 3d sound is important for asthetic and gameplay issues. With OpenAL in the gutter I guess I'll be looking for another solution. Like Phil would be interested to hear more about other alternatives.
#13
03/12/2006 (2:10 pm)
Has any progress been made in the direction of getting 3D sounds working? Are there ANY examples of 3D sounds working with OpenAL in torque?

My current project is hurting because we just can't find a way to make them function.

I would also like to note that on the TGE product (www.garagegames.com/products/31) page it still says "3D sound support"...is that true?
#14
03/12/2006 (3:20 pm)
3D sounds work fine on my system in stock 1.4
#15
03/12/2006 (3:33 pm)
I believe the most common mistake is to use stereo audio files when mono versions are actually needed.
#16
03/12/2006 (3:36 pm)
Works terribly on my audigy el-cheapo soundcard. With hardware acceleration on (in windows control panel) sounds are almost inaudible unless directly above or below the player. With it off, all sounds seem to play at full volume regardless of their distance from the player.
#17
03/12/2006 (7:03 pm)
Does 3D sound work in 1.3.5... we have a project almost finished and we don't have time to upgrade...
#18
03/12/2006 (7:11 pm)
"3D sounds work fine on my system in stock 1.4"

Is there any way to port back what has been done to fix 3d sounds in 1.4 to 1.3? We are almost done with our project, and moving to 1.4 now is something we don't have time for.

I'll try Midhir's method as well though.
#19
03/12/2006 (9:16 pm)
The only way I can think of doing that is a line-by-line comparison of the files and alot of trial-and-error.
#20
03/13/2006 (4:40 am)
Before btiching about the sound system, look at the checklist to see if you're doing something wrong:

- Always use mono sounds for positional audio (3D), and stereo sounds for global audio (2D, non-positional), otherwise you'll get apparent random issues (sounds not reacting to positioning, or sounds that seem to not play at all, or play too low).

- Check the referenceDistance and the maxDistance in your 3D audioProfiles: referenceDistance determinates the distance up to which the sound will be played at 100% volume, and maxDistance the distance at which the sound will reach 0% volume. The sound volume will be interpolated between referenceDistance and maxDistance.

- The "type" in the AudioProfiles is actually the sound channel. Be carefull when assinging channels to different sound "types".
Page «Previous 1 2