| Sound News | Press Releases | Archives | Week In Review | Editorials | Articles |
| Reviews | Benchmarks | Interviews | FAQs |Files & Drivers |
| Early Impressions | Game Guide | Search | Links | Forum | Contacts | ADS |



title_3dss.gif (30276 bytes)
dot_yellowish.gif (35 bytes)

Mikael Hagén's Gamer's Guide to DS3D and A3D 1.x.

dot_yellowish.gif (35 bytes)

Please support 3DsoundSurge by visiting our sponsors
dot_yellowish.gif (35 bytes)
dot_yellowish.gif (35 bytes)

3dss_article.gif (5804 bytes)

A Gamer's Guide to Direct Sound 3D and A3D 1.x

Mikael Hagén - Last revised on: March 15, 2001

 

What does it mean that a game uses DS3D and/or A3D?

I've seen a lot of confusion in newsgroups about what DS3D does especially compared to A3D, so I decided to write this short article to try to explain what DS3D does and doesn't do and in what ways it differs from A3D. The article was originally written when DirectX6 was the latest versions. At the end of the article you will find a short update what's new in DirectX7 and DirectX8.

Introduction to DS3D and 3D sound hardware

Microsoft provides DirectSound3D (DS3D from now on) as one of the components in the DirectX family, just like the more famous D3D which is used for 3D graphics. One thing that DS3D allows that D3D doesn't, is extensions such as Creative's EAX. The lack of extensions is one major reason why some developers prefer OpenGL over D3D.

DS3D is basically a bunch of commands (API) that help game developers define where the sound should be placed in the 3D space and how loud it should be. The location where each sound should be placed is then passed on to your DS3D capable soundcard which uses some clever algorithms to place the sound in 3D space.

How well you will be able to locate the sound depends on the algorithms your soundcard uses, if you use headphones, 2 or 4 speakers and yourself. That is, how well it works is very subjective.

If you don't have a DS3D capable soundcard, MS has provided a rather simple software 3D sound engine that is both CPU hungry, and not very good on placing the sound (that is, you will have problems trying determine where the sound is coming from). Because of these limitations, the programmer usually mixes to stereo or some other software 3D engine like Intel's RSX or QSound's QMixer if you don't have a 3D sound card.

If the soundcard supports DS3D it doesn't necessarily mean it will not use your CPU for the 3D processing, but it will use the 3D algorithms your soundcard maker either developed or licensed (usually from Aureal, CRL or QSound). These algorithms are usually both better at placing the 3D sound correctly and less CPU hungry.

What complicates the picture is that most soundcards can't accelerate more than a fixed number of 3D streams, after which it falls back on to using the MS 3D sound engine or non-3D sound. To stop this from happening, the developer tries to only use 3D sound for the most important sound sources like monsters and not for background sounds. Playing new games like Unreal which uses 16 3D voices, an original Monstersound card that only supports 8 3D voices can cause the sound from your gun to suddenly change. What happens is the sound isn't using Aureal's 3D sound algorithms anymore.

Positions, speed and Doppler effects

The developer must at least set the position (in the 3D room) for each sound source (e.g. monsters, rockets, bullets, insects) and the position and direction of the listener, that is you. They usually also choose the speed of the sound sources and the listener. That speed is only used to calculate the Doppler effect and doesn't need to be the real speed of the listener and sound sources. The developer can also choose the Doppler factor from anything between 0-10, where 0 means no Doppler effect will be calculated and 1 will result in a realistic Doppler effect. Anything above that will cause an unrealistic but maybe more exciting Doppler effect.

Volume and how DS3D determines the distance

A sound source must also have a volume. In the real world the sound source will be louder as it gets closer, but that isn't possible to do in a game and neither is it desirable. If you take an aircraft, you want it to be loud at about 3000 feet away and very loud 300 feet away but you can't (nor want to) produce the realistic loudness of the aircraft only 10 feet away, if that would happen in a game. Another difference in a game is that all sounds are recorded at about the same volume because of the limitation of 16-bit audio. That is, 16-bit audio doesn't have enough room to contain such different volume levels.

In DS3D, developers choose for each sound source a minimum distance where you play the sound at the maximum volume, if the sound source moves closer the volume will stay the same. For an insect the minimum distance could be 1 inch while the aircraft could have a minimum distance of 300 feet. How fast the volume is reduced (attenuation of the volume) depends on the roll off factor (which is the same for all sound sources) but usually the sound is half the maximum volume at twice the distance. In the case of the insect that would mean that already 4 inches away it's only 1/10 of the maximum volume and would almost be silent.

For each sound source, the developer also specifies a maximum distance. The developer can choose if the sound source should be either quiet when they are further away than the maximum distance or stay at the same volume level, that is if they had 10% of maximum volume at the maximum distance they will continue to have that volume further away. If the developer chooses a maximum distance for a sound source where you still can hear it easily, the sound source will either stop abruptly when it reaches the maximum distance away from you, or you'll hear it through the entire level.

Sound cones

The above example of volume for sound sources treated them like a point source (that is they spread the sound equally in all directions) but it's possible to give the sound a direction. To do that, the developer specifies an inside and outside cone for the sound source. Within the inside cone, the sound is at the maximum volume (at that distance). Outside the outside cone, the volume is whatever the developer choose (or rather how much you should reduce the volume further than DS3D already done because of the distance from the listener) and between the cones the volume changes gradually.

Sound cones can be used to just enhance the realism of the audio or more usually to do cool effects like this example from the DS3D documentation:

"Designing sound cones properly can add dramatic effects to your application. For example, you could position the sound source in the center of a room, setting its orientation toward a door. Then set the angle of the outside cone so that it extends to the width of the doorway and set the outside cone volume to inaudible. The user, when passing the open door, will suddenly hear the voice emanating from the room."

How does A3D differ from DS3D?

To know why A3D was developed you need to know a bit of history. When Microsoft released DS3D with DirectX3, the summer 96 (if I remember correctly), they didn't offer any hardware acceleration and hinted that even if they later would offer that, they wanted everyone to use their algorithms. Aureal didn't want to use Microsoft's 3D algorithms and they wanted the possibility to accelerate the 3D streams but still use the same 3D sound commands (API), the result of their work was A3D. Aureal also released some tools to make life easier for developers to include 3D sound in their titles. That together with soundcards released using Aureal's 3D sound algorithms without taxing the CPU too much, was enough to make some developers start to include 3D sound in their titles (something no one did using MS DirectX3 3D sound engine).

Later MS changed their mind and released DirectX5 the summer/fall 97 that included a new DS3D with ability for soundcard companies to accelerate 3D streams in hardware using their own algorithms.

So doesn't A3D 1.X offer anything more than DS3D?

Yes it does offer 3 more things. The most important is a voice manager (Aureal's name for it is resource manager) that helps the developers to manage the 3D streams and take better advantage of the number of 3D streams that the card can handle, that is, choose the most important sound sources to be using Aureal's 3D sound algorithms. The rest of the sound sources are either not played at all or played using the stereo mixer, usually the latter. This doesn't completely remove the problems I mentioned above in Unreal but should at least reduce them. By how much depends on the developers and how many sound sources they use in the game. The other improvement A3D 1.X has is a more advanced distance model where they have a high frequency distance factor the developer can manipulate to simulate different atmospheric environments, such as thick fog or underwater. Finally the developer can find out more details about the A3D hardware that it uses including what drivers are used.

There is now a voice manager for DS3D that QSound made as an extension to DS3D and gave to MS. MS later made some changes to that extension after feedback from companies like Creative and  published it as an official voice manager extension that all soundcard companies could support if they wanted to.  The Live and all soundcards using QSound's and  Sensaura’s 3d technology support this voice manager.

However, it's not enough to just support a resource manager in your drivers.  You also need to get developers to take advantage of it which is why Creative Labs,   QSound and Sensaura all are strongly promoting and recommending the usage of   MS Voice Management to game developers, as a complement to DS3D platform, to take full advantage of 3d  audio hardware acceleration and to optimize resource consumption. The current plans (unless they changed since last summer) is that MS will include a new more advanced and more integrated voice manager when they ship DirectX7 later this year.

There are also several SDKs(software development kit) like QSound's QMDX and QMixer that include  voice manager capabilities that will work on all 3D soundcards regardless of  what voice manager they use.

I won't include A3D2 or EAX in this article other than to say that EAX is an extension to DS3D and uses DS3D for the positional sound commands, while A3D  2 isn't an extension to DS3D but it still uses basically the same positional commands as A3D 1.x with a few enhancements. You will soon be able to read my A3D 2 article.

What's new in DirectX7

In DirectX7 the only real change is that the new voicemanager and a new software 3D sound engine. The new 3D sound engine offers 3 modes, stereo panning, HRTF light, HRTF full. As the name suggests the first is just stereo panning while the 2 others are really 3D sound engines using HRTF filters just like Sensaura, Aureal's and Creative's 3D sound engines.  All old games will end up using the stereo panning while new games can choose to use the light or full HRTF engine. However regardless what the games choose VXD drivers will always end up using the stereo panning mode. In case you don't know Windows2000 only use the WDM format while WindowsME and Windows98SE supports both VXD and WDM drivers. Most soundcards only offers WDM drivers for Windows 200 and WindowsME and some doesn't even offer WDM drivers for WindowsME.

The new stereo panning algorithms are much quicker than the old 3D sound engine which is why you will see much better results when using Directx7 than DirectX6 in ZD AudioWinbench with soundcards that support less than 32 3D streams in hardware.  In actual games you are unlikely to see a performance benefit since most if not all games either dropped sound effects or use their own stereo panning algorithms for the 3D streams that the soundcard can't handle. Few if any game force the use of the full HRTF mode but some offers it as an option which will benefit users of soundcards that doesn't support 3D sound.

What's new in DirectX8

DirectX8 includes plenty of new features that we may go into more detail in a future article. The new features will definetely be of great benefit to the developers but when it comes to 3D audio no driver changes is required. Here's the hi-lights from the press release when it comes to 3D audio:

- Consolidated DirectSound® and DirectMusic® interfaces simplify application development.
- DLS2 audio synthesis support improves instrument realism.
- DirectPlay IP voice communication support is provided.
- DirectShow® Editing Services APIs provide real-time compositing and editing of audio/video timelines.
- DirectShow supports reading and writing Windows Media(TM) Audio and Video (WMA and WMV).

The major additions when it comes to 3D audio and reverb is I3DL2 which is very similar to EAX 2.0. Unfortunately the I3DL2 implementation does not offer any hardware support which means it will use MS reverb algorithms and not the ones included with your soundcard. This may change in the future but until it does it's unlikely we see many game take advantage of I3DL2. So far no game has but possible some X-Box to PC port will. Here are some details about I3DL2 from the DirectX8 SDK  

DirectX supports environmental reverberation in accordance with the Interactive 3-D Audio, Level 2 (I3DL2) specification, published by the Interactive Audio Special Interest Group.

The DirectX environmental reverb effect is an implementation of the listener properties in the I3DL2 specification. Source properties are not supported in this release.

Sounds reaching the listener have three temporal components:

a.. The direct path is the audio signal that goes straight from the sound source to the listener, without bouncing off any surface. There is therefore only one direct path signal.

b.. Early reflections are the audio signals that reach the listener after one or two reflections off surfaces such as the walls, floor, and ceiling.  If a signal is the result of the sound hitting only one wall on its way to the listener, it is called a first-order reflection. If it bounces off two walls before reaching the listener, it is called a second-order reflection. Humans can typically perceive individual reflections only of the first or second order.

c.. Late reverberation, or simply reverb, consists of the combined lower-order reflections, usually a dense succession of echoes of diminishing intensity.  The combination of early reflections and late reverberation is sometimes called the room effect.

Reverb properties include the following:

a.. Attenuation of the early reflections and late reverberation.

b.. Rolloff factor, or the rate at which reflected signals become attenuated with distance. The rolloff factor for the direct path is managed by the DirectSound listener.

c.. Reflections delay. This is the interval between the arrival of the direct-path signals and the arrival of the first early reflections.

d.. Reverb delay. This is the interval between the first of the early reflections and the onset of late reverberation.

e.. Decay time. This is the interval between the onset of late reverberation and the time when its intensity has been reduced by 60 dB.

f.. Diffusion, which is proportional to the number of echoes per second in the late reverberation. Depending on the implementation, the density can change as the reverberation decays. In DirectX, the application can control this property by setting a percentage of the range allowed by the implementation.

g.. Density, which is is proportional to the number of resonances per hertz in the late reverberation. Lower densities produce hollower sounds like those found in small rooms. In DirectX, the application can control this property by setting a percentage of the range allowed by the implementation.

Reverb properties are represented by an IDirectSoundFXI3DL2Reverb8 interface, and the parameters of the environment are contained in a DSFXI3DL2Reverb structure.

DirectX supports many sets of default parameters, or presets, that describe the reverb properties of audio environments ranging from mountains to sewer pipes. Most applications can simply choose one of these environments by using IDirectSoundFXI3DL2Reverb8::SetPreset.

To set custom properties, use DirectSoundFXI3DL2Reverb8::SetAllParameters. You can retrieve the current properties by using IDirectSoundFXI3DL2Reverb8::GetAllParameters"

For other new DirectX features (including audio) you can check out The Cold Shop's DirectX8 article or Computer Games Online short overview of the new features in DirectX. Here's snip from the audio portion of Computer Games Online's article:

DirectMusic now supports the a Downloadable Sounds Level 2 (DLS2) capable synthesizer, which allows for quality custom instruments, six-stage envelopes, layering of voices, release waveforms, and all kinds of other nifty technical mumbo-jumbo. Developers can assign arbitrary sound looping points, submix channels before sending them off to DirectSound for playback, apply filters independently to each voice, and stream sound playback automatically. Music tracks can play back as 3D sounds, so you can have a DirectMusic track playing through a radio on a desk in a 3D game, and it will be represented as a 3D sound. Designers can more accurately control the sound in a game through the use of scripts, too. A game event might call upon a sound script instead of controlling multiple sound events directly. This should make it easier for the sound specialists to control the sound in games without so much work from the programmers.

If you have any comments, questions or see any errors in the article contact Mikael@3dsoundsurge.com

Related articles
Gamer's Guide to EAX
A Gamer's Guide to 3D Sound and Reverb APIs
A Gamer's Guide to 3D Sound and Reverb Engines

Have comments or questions on this feature?
Why not post them in our forum?

Most Recent News Headlines
Site Refresh
DTS Bridges PC / AV Component Connectivity with DTS Connect; Strategic Partnerships with C-Media and Realtek Bring High-Quality DTS Surround Sound Into PCs
Creative Announces Xtreme Fidelity And The Creative X-FI Xtreme Fidelity Audio Processor
Doom 3 EAX Patch
Logitech Cordless Headset for Xbox Review
Philips HDRW720 DVR/DVD recorder review


Articles

Audigy Tour Report

Philips Press Event

QSound 3D Audio

A Gamer's Guide to Sensaura 3D Audio

A Gamer's Guide to 3D Sound and Reverb APIs

A Gamer's Guide to 3D Sound and Reverb Engines

A Gamer's Guide to DS3D and A3D 1.x

A Gamer's Guide to EAX

DVD Buyer's Guide

Surround Sound Formats

Virtual Surround Sound Technologies

The Advantages of the Center and LFE channels

Stereo to 4 or 5.1 Expansion Technologies

Bassmanagement

Visit to the Creative EMU Technology Center

Liveware 2.0

dot_yellowish.gif (35 bytes)

3dss_small.gif (2549 bytes)All content, design and work is © 2001 - 3D Sound Surge Please respect the copyrights of the articles and writers herein. All copyrights are enforced by 3DSS.  
View the 3DsoundSurge Privacy Statement

dot_yellowish.gif (35 bytes)