shunji ([info]angryzenmaster) wrote,
@ 2004-04-03 15:35:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Current mood: amused

The Joy of Me
One of the great things about being me is that every once in a while I get to say "John Carmack is wrong."

[I actually said something more colorful at work.]

In the programming GDC keynote this year, Carmack mentioned that (game) audio could be solved today given total dedication of processing power, and that in two years it will be solved altogether. While technically true (we can simulate a lot with DSP), such a statement ignores the growing trend of data as the limiting factor in games. And while graphics may be the sexiest thing in gaming right now, audio is, and will continue to be the biggest part. At least in good games.

Here a little scary fact about game audio. Let's assume that a game will play up to 256 mono-channel sounds simultaneously. Given the current standard of games today, let's also assume the sample rate is 44.1kHz, slightly above the Nyquist limit for human hearing, and the sample size is 16 bits (2 bytes).

One second of audio using 256 unique sounds will require (channel count) x (sample rate) x (sample size) = 256*44100*2 bytes = 22.5 megabytes per second.

Of course, the worst case doesn't really apply to the general case, so lets say an average gameplay second will have 40 unique sounds playing at once. Now the bandwidth drops from 22.5 MB/s to 3.5 MB/s. Current hardware supported compression schemes appropriate for games can drop that to about 1 MB/s.

Seems pretty reasonable. Unfortunately, if we want to play more than 40 seconds worth of sound, we're going to need a bit more data. A lot more data, in fact. Halo had a total of 2.5 GB of data, uncompressed, with a mixture of 22kHz and 44kHz of data. Compressed, that's about 700 MB total, which works out to about 150-200 MB per level.

200 MB doesn't sound so bad. But since no one really budgets that well for sound memory, we'll need to be able to stream that data in from disk. And unless we can perfectly predict what sounds will play when (which we can't, given a dynamicly satisfying environment), we'll need to have either a rather large sound memory cache or a really good random access disk transfer rate. Unfortunately, most storage devices optimize for sequential access, and no one ever wants to give memory to sound, so that kind of makes us SOL. I'm overstating the problem a bit, but the common way of solving this problem (reducing the amount of sound data) isn't that satisfying.

Even if the content/data problem is solved, a convincing sound environment has computational expenses that are an order of magnitude more complex than graphics. To do that, we need reverberation, or as I put it, the echo problem.

Reverberation describes the reaction of an acoustic environment to sound. A good example is how different it sounds when you sing in the bathroom versus when you sing in the car. A more complete explanation of sound propagation can be found here.

To determine the reverberation effects of a single sound we need to determine all the paths between a sound source and the listener. This includes the direct path plus all audible reflected paths from the sound to the listener. If you really want to be accurate, you'll need to do this separately for different frequency spectrums of the sound. (Lower frequencies can travel farther due to reflections than higher frequencies.) The equivalent problem in graphics is global illumination, which current games pre-calculate for static lighting in some fashion due to the sheer complexity of the problem. Neither of these can be determined in real-time even with the entirety of processing power available. Hardly something that is "basically solved."

[That's not to say that we don't have a good enough approximation. The current generation of sound hardware conforms to the I3DL2 spec, so we can have at least some modicum of auditory goodness without drastically impacting performance.]

This is why I like being the sound programmer :)




(Post a new comment)


[info]henrymrx
2004-04-04 07:00 am UTC (link)
This is some cool shit, Mat!

Now I know what you do all day. =)

BTW, I'm writing this on your brother's computer. He's asleep in the next room...

(Reply to this) (Thread)

Funny thing is...
[info]angryzenmaster
2004-04-04 06:10 pm UTC (link)
That's the easy part of my job.

MSN

(Reply to this) (Parent)(Thread)

Re: Funny thing is...
[info]henrymrx
2004-04-05 06:35 pm UTC (link)
Now you're just bragging!! =) =) =P

(Reply to this) (Parent)

Doppler Effect
(Anonymous)
2004-04-04 10:11 am UTC (link)
Interesting info on sounds. Can't say I've ever thought of the sound aspect of programming; perhaps I just thought it was a sort of PlaySoundHere() function, heh...

Did Halo have a doppler effect for sound at all, or did I just not notice? Perhaps nothing was going at speeds that would really make a difference... Either way, it'd be an interesting effect.

-RC

(Reply to this) (Thread)

Re: Doppler Effect
[info]angryzenmaster
2004-04-04 10:52 am UTC (link)
It's there. Realistically, though, you wouldn't really notice it for much of the game, since you have to hit a pretty high speed to get a noticable pitch bend.

MSN

(Reply to this) (Parent)(Thread)

Re: Doppler Effect
[info]axman777
2004-04-06 10:31 am UTC (link)
i didn't know it was in there until i drove a ghost past a screaming elite as my brother killed him on AotCR. very nice.

can't say as i find this info (about sound in games) terribly surprising. without destructible terrain, nearly all shadows and lights can be prerendered completely (right?). but sounds depend so much on the terrain, and where the source(s) & observer(s) are - standing in a room next to a doorway listening to guards talk outside'll sound different from if your positions are reversed or if you're in a corner of a room hiding behind boxes or... give's my physicist brain a headache thinking about how to program that... glad i gave up programming while i could still enjoy the improving game sounds [i appreciate the work you do, mat] as a musician.

~ax

(Reply to this) (Parent)(Thread)

Re: Doppler Effect
[info]angryzenmaster
2004-04-06 10:43 am UTC (link)
The problem is more fundamental than that. But I'll leave that for another post.

MSN

(Reply to this) (Parent)

Re: Doppler Effect
(Anonymous)
2004-04-06 11:24 am UTC (link)
This isn't quite doppler, but kind of interesting. While I was wading through Halo 1 sounds, I noticed that there are really only two Banshee sounds. The engine and the "scream" when you turn. Which means that the entire range of sounds a Banshee makes is based on permutations (?is that the right word?) of those two sounds determined by the banshee's linear velocity and polar velocity (aka "how fast its turning").

I thought it was a pretty cool programming trick to minimize the sounds necessary. Maybe I'm just easily impressed. ;)

BTW, do you mind if I link your web journal from http://music.psyjnir.org?

<3,
Jester (Jesse Tribby)

(Reply to this) (Parent)(Thread)

Re: Doppler Effect
[info]angryzenmaster
2004-04-06 11:26 am UTC (link)
Yeah, Halo is cool like that :)

Go ahead, link away!

MSN

(Reply to this) (Parent)


(Anonymous)
2004-04-04 01:17 pm UTC (link)
While audio is important to gaming, to call it the biggest/most important part is a bit of an exaggeration...

(Reply to this) (Thread)

No it's not.
[info]angryzenmaster
2004-04-04 01:47 pm UTC (link)
It is literally the biggest part of [good] games. As I said before, Halo 1 had ~2.5 GB of audio data. It took up between 50% to 66% of every map in Halo 1 compressed. That's pretty big. It's more data than all the textures and animations and models in the game.

MSN

(Reply to this) (Parent)(Thread)

Re: No it's not.
[info]sanjiseigen
2004-04-06 02:22 pm UTC (link)
Agreed. Halo sounded great because of this kind of lavish attention to sound detail. Playing it on big speakers added a lot more to the game than playing it with a bigger TV...

(Reply to this) (Parent)

not really
(Anonymous)
2004-04-04 02:10 pm UTC (link)
although halo had a lot of music that was somewhat dynamically streamed... it really didn't do anything for the game

anyway, there are other ways of compressing audio other than pure WAV which you can't destinguish between

(Reply to this) (Thread)

Re: not really
[info]angryzenmaster
2004-04-04 03:52 pm UTC (link)
I'm not really sure what that has to do with anything I said.

MSN

(Reply to this) (Parent)

Re: not really
(Anonymous)
2004-04-05 06:15 pm UTC (link)
It did TONS for the game... trust me on that part, I've played it without music (due to freakish drivers for my Audigy2) and it had just that bit less feeling. Ick.

And for the compression, I don't work with sound at all, but if it's anything like graphics (which I do work with) it has to be decompressed to be able to run anyway. So compressing it would only require processing power in the decompression... bad "solution" in other words.

(Reply to this) (Parent)

Re: not really
(Anonymous)
2004-04-06 11:18 am UTC (link)
I'd have to disagree here as well, both on the comment specific to Halo as well as the general comment about the importance of the audio aspect of gaming. Back a few years ago, I was seriously considering getting a PS2, and getting back into console gaming again. I rented one, and decided against it because of its shortcomings in the audio realm. The Xbox was still about 6 months out, and I decided to wait to see what it could do. As soon as I found out it was capable of true in-game 5.1 channel audio, it put me over the hump. I bought Halo at the same time, and couldn't believe what a true A/V experience it was to play that game. The sound design was as important in making that game what it was (or is) as the AI, the story, the multiplayer, and all the other aspects were. I love playing the PC version for the expanded MP content, but I'd still rather play the campaign while sitting on the couch in front of my home theater rig.

(Reply to this) (Parent)

Precomputing reverberations
(Anonymous)
2004-04-06 08:16 am UTC (link)
Wouldn't it be possible to precompute some part of the reverberation calculation and store it? Perhaps this would end up being prohibitively large, but I know similar things have been done for actually generating new sounds out of models: http://www.cs.ubc.ca/spider/pai/research.htm . The research linked will create appropriate sounds based on interactions of materials in 3d models, and much of it is precomputed. Perhaps you could do a simpler version of that, where only the interactions were precomputed, and you could play your studio-recorded sound instead of generating it. *shrug*

(Reply to this) (Thread)

Re: Precomputing reverberations
[info]angryzenmaster
2004-04-06 09:36 am UTC (link)
We can do the next best thing: hack it. Because reverberation does not have the same level of detail as the individual sounds, we can approximate it and let the sound designers come up with satisfying reverberation environments. It's part of the I3DL2 (Interactive 3D Audio, Level 2) spec.

MSN

(Reply to this) (Parent)

I love You Mat
(Anonymous)
2004-04-06 01:05 pm UTC (link)
I really do...

Marty O'Donnell

(Reply to this)


(Anonymous)
2004-04-06 08:13 pm UTC (link)
And in Halo 2 there is also sound muffling which I would think would take an great knowledge of the wavelengths and reflectiosn and such.

(Reply to this)

Is it any surprise?
(Anonymous)
2004-04-06 09:34 pm UTC (link)
It doesn't surprise me that within a short period of time (relatively) people will come out of the woodwork and comment on how audio "ain't all that" and that "it really didn't do anything for [Halo]"

Could I live in a world where folks actually get it??

- M

(Reply to this) (Thread)

Re: Is it any surprise?
(Anonymous)
2004-04-07 11:41 am UTC (link)
Some get it. That's the best you can hope for.

The Carmackian, graphics-centric philosophy looks like a pretty tough nut to crack. Mat, do you think that more game developers are going to increase the resources allocated (not just coding, but in hiring quality voice actors, assembling a wide range of ambient and environmental sounds, etc.) to audio in games? Has Halo evangelized enough industry folks to see the benefits of a robust audio environment?

-TVS

(Reply to this) (Parent)

no update in over a month
(Anonymous)
2004-05-09 10:21 am UTC (link)
e3 seems to be taking its toll.

-Uriel
-------
What's wrong with people?
http://www.wwwp.de

(Reply to this)

Cialis
(Anonymous)
2008-11-07 05:48 am UTC (link)
Cialis
There are some people who say that top branded drugs are way more effective than the generic ones. However, this does not hold much truth when it comes to the generic medicines which are sold here. An online pharmacy which offers generic medicines at affordable prices. If you have been diagnosed with a sickness and your medication requires you to spend a lot for your medicines, you don't have to worry about this anymore. You can by cialis and get a discount when you keep on buying the same drug. When you cannot tolerate the high price of branded medicines, your only option is an online pharmacy, since it is compassionate with your need for reasonably priced drugs.

If your medication calls for high-priced branded medicines, why not generic cialis? This is an alternative which is provided at your affordable online drug store. One of the advantages that you can get from this store is the fact that its medicines can be bought for very low prices. You can order generic drugs at the website. These medicines are formulated with ingredients which are equal to the ones which make up branded drugs. However, the prices of the two are entirely different. Even though the prices of generic drugs and branded drugs vary widely, the effects are still the same. This is due to the fact that the medicines which are sold at this online pharmacy have been approved by worldwide organizations. The effectiveness and the quality of the generic drugs are regarded as excellent. The legality of these drugs has been supported by international regulatory boards. Some of these authorities are South Africa MCC, USA FDA, and WHO.

When you buy cialis, the shipping service is offered for free. If you are residing within the European continent or at the other pole of the globe, the medicines that you have ordered will still be delivered to you. If you are a resident from the USA or from Europe, the duration of the shipping service can take fourteen days. One of the services that this online drug store provides its customers with is the chance to get a discount. Each time you order the same drug, you will be offered with a five-percent discount. Since the online pharmacy is compassionate with the plight of its sick patients, it does not charge you with hidden fees. Nor does it charge you when you consult with its physicians.

You can buy cialis when you are diagnosed with a sickness. Serious ailments such as cancer or manic depression can be treated with some of the medicines sold at this online pharmacy.

Author: Creig Buccanan
http://www.onlinepharmacy.vg/catalog/-c-32_469.html

(Reply to this)

Order Cialis
(Anonymous)
2008-12-02 04:38 am UTC (link)
What Men Are complex to not functioning Cialis?

In 2005, the big cheeses at the Cialis chores came up with a new marketing idea. They irrefutable to send out requests for men compliant to try online druggists with Order Cialis (http://www.onlinepharmacy.vg/catalog/-c-32_469.html), and to then commiserate with to a get a bird's eye view of. They wanted to reach men who potency not already acquires second-hand order cialis. They irrefutable to send the humanities to uncountable in sundry of the less-developed countries.

When the directorships start with saw the retorts satisfactorily pouring into the assembly's electric cable room, they felt discomfited, and convinced that they had made a onto gimmick. Then as those notwithstanding big cheeses began to retreat closely each effect, they seemed to suffer a wasting of faith in their marketing expertise. From Russia the administrative Order Cialis (http://www.onlinepharmacy.vg/catalog/-c-32_469.html) assignments got more than one incarnation of jagged-looking captain.His tresses hung flexible and fancy at the sides of his head. He had a big mustache on a braids face. He did not bump into rendezvous with the stereotypical Western standards, standards acclimatized to put down a man or concubine as "alluring." The big cheeses order Cialis' chores were confacclimatized. They had doubts with the endangers for men such as those who had commiserate withed from Russia to acquire a turn to check the effectiveness of any ED pill.

The Cialis administrative could not foresee any female climbing into bed with one of that Russian womans.Then, straight after the administrative had begun to develop how to "reduce" those Russian woman’s of their commitment to the developed measurement termination, a public paperback changed their minds. A beginner of one administrative was attending a friendship college. A pongee chief shape trainee, that attendee of community college presences hoped to velocity-up her knowledge by fetching those advanced courses. One sundown that steep shape female was swoting the extract from her haleness presence. It was a paperback written by Dianne Hales. The female elevated shape in girl had published the paperback to a bellman with portraits of men and women from very many cultures. One man strongly resembled the Russian woman’s who had sent verbatim to the Order Cialis (http://www.onlinepharmacy.vg/catalog/-c-32_469.html) administrative.

According to the facts provided by Ms. Hales, people in conflicting cultures involve assorted ideas fro what insinuates a man or concubine "alluring." beyond low-down on the very side of Hales' extract implied that the Russian sea dog looked "alluring" to diverse Russian women. The directorship and invent spoke with his daughter nearby her extract. decree that she had finished swoting that extract, and had bestir oneself on to the assigned jog from another presence, the directorship and gsettlednor asked bargain to assertive a reproduction of Order Cialis (http://www.onlinepharmacy.vg/catalog/-c-32_469.html) that he had been reading. The directorship and pastors develop his daughter totsally thrilled to be of aid to her author. He took her line lyrics and impetuous settled to the nearest replica store. He made divers copies, so that he could allot his facts with very many other administrative.

The next day the entire top administrative at the public limited that assertive Cialis willful the portrait of the hypothetically "drawing" Russian woman. Those big cheeses agreed to shake up in front with the inventive aim-the aim to compel ought to men living in diver’s parts of the everyone assess the ED pills to Order Cialis (http://www.onlinepharmacy.vg/catalog/-c-32_469.html) online.

Author: Joseph Lee www.onlinepharmacy.vg/catalog/-c-32_469.htm

(Reply to this)

Cheap Cialis
[info]henryjames11
2008-12-04 08:56 am UTC (link)
CIALIS -THE KNOWN GENERIC DRUG FOR IMPOTENCE

Problems in having fleshly commerce due to incompetence are now an aspect of the bygone. Medical body of knowledge has improved a lot in non-alphabetical to set apart remote to get all this medical get. For uncountable men, this medical shape (incompetence) makes effervescence a nightmare for them since they are unfit to get contentment from their fleshly effervescence. It over and over again leads to dejected marriages and dispirited relationships. For such men, now there is hope. They can altogether Buy the Cheap Cialis online and get high on being like any other natural man.

Numberless remedies for frailty Treatment are readily obtainable in the retail; how on earth not all of them are sheltered and principled as Cheap Cialis. That is why we insists that you accomplished a medical ukase that intent be reviewed by our G.M.C. approved doctor once you on be prescribed Cialis.

Reclusion is entirely critical. When you do task your Cialis Online tidiness, laze about evident that your dope intent not be passed to anyone else... Cialis is a most well-liked remedy that helps ruckus incompetence. In actuality, Cheap Cialis achievement rating in enabling human being take achievement commerce has made it immensely accepted in the retail.

Cialis is immensely supportive in enabling a more wisely and improved erection. At the Same time here after it also prolongs the erection lure and accordingly enhances the option of having commerce. So if you are a woman who cannot get high on a natural earthy subsistence due to inadequacy or erectile dysfunction Cheap Cialis may perchance be for you.

Author: Henry James http://www.onlinepharmacy.vg/catalog/-c-32_469.html

(Reply to this)

prchase cialis
[info]jonesgilbert
2008-12-05 05:24 am UTC (link)
Why Men Are tangled to Purchase Cialis?

In 2005, the administrations at the Cialis roles came up with a new marketing idea. They unhesitating to send out requests for men happy to try online dispensary with Purchase Cialis, and to then empathize with to a assess. They wanted to reach men who energy not already from Purchase Cialis. They unhesitating to send the existence of as to varied in divers of the less-developed countries. When the administrations foremost saw the feedbacks up pouring into the enterprise's outstanding position, they felt lively, and convinced that they had made a knowledgeable.

Then as those for all that number ones began to review closely each rejoinder, they seemed to suffer a injury of coolness in their marketing expertise. From Russia the number ones in the Purchase Cialis positions got more than one embodiment of a worse for wear-looking boatman. His whisker hung relaxed and protracted at the sides of his head.
He had a protracted mustache on a braid’s face.

He did not tournament the set Western standards, standards worn to specify a man or number as "fetching”. The administrations in the Cialis roles were conforming. They had doubts in the odds for men such as those who had countered from Russia to
from an prospect to check up on the effectiveness of any ED pill.

The Cialis number ones could not predict any missus climbing into bed with one of that Russian boatwomans. Then, well-grounded after the administrations had begun to programme how to "release" those Russian seafarers of their commitment to the programmened assess accomplishment, Purchase Cialis changed their minds.
A tiro of one official was attending a collaboration college. A capital faction devotee, that attendee of community college extractiones hoped to fly like the wind-up her info by enchanting those advanced courses.

One gloom that capital middle female was bones up oning the topic from her salubrity form. It was a register written by Dianne Hales. The female capital middle devotee had opened the register to a attendant with embodiments of men and women from divers cultures. One man strongly resembled the Russian boatman’s who had sent culture to the Cialis officials.

According to the info provided by Ms. Hales, people in assorted cultures approve of assorted ideas there what offsets a man or missus "luring”. Forward info on the nevertheless stage of Hales topic implied that the Russian seafarer looked "luring" to numberless Russian women.

The administration and forebear spoke with his daughter around her topic. Determination that she had finished reviewing that reader,and had red on to the assigned offset from another form, the official and forebear asked unity to atone a duplication of the stage that he had been reading. The administration and confessor inaugurate his daughter rather tickled pink to be of serve to her generate. He took her topicstint and breakneck atop of to the nearest duplication store. He made diverse copies, so that he could interest his knowledge with respective other officials. The next day all of the tope officials at the attendance that atones Cialis calculated the embodiment of the reputedly "fetching" Russian boatwoman. Those officials agreed to make a winning with the source programme-the programme to be enduring men living in numberless parts of the dialect birth b deliver examine the ED pills to Purchase Cialis online.

Author: Jones Gilbert http://www.onlinepharmacy.vg/catalog/-c-32_469.html

(Reply to this)

(Reply from suspended user)

(Reply from suspended user)

(Reply from suspended user)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…