1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HDR.... sounds!

Discussion in 'Racer' started by Mr Whippy, Oct 14, 2010.

  1. This is something I'd like to see soon in Racer.

    Right now it's hard to get cars sounding the right volumes consistently. If we had a dB rating system that auto-gained (like auto-exposure), then the audio would feel much more authentic.

    At idle the engine sound would get louder sounding, and ambient noises would be audible like the wind outside the car, perhaps leaves rustling etc... yet at maximum attack at 200mph these sounds would pale into insignificance next to the blaring engine and rumbling wind sounds!

    Right now it's hard to get a balance, or get cars feeling about right next to each other. By using the data in many car magazines and reviews of cars dB ratings, it should be fairly easy to get reasonable data. Cripes, even an iPhone can record dB these days fairly well in a car of your choice.
    So tons of data out there to help us get things right :D

    What do others think?

  2. Yeah I like the idea. It should also be tied into sounds being placed in the world properly (i.e. the car is 100m away - the sound takes a little longer to get here, is quieter, etc.)
  3. I thought the audio engine worked all this out for us already, or at least should? I feel this is something that could be worked out post 090, in fear of stalling 090 into oblivion?
  4. Doppler changes the pitch but not the timing of the sounds.
    The volume doesn't change either. All the things Mr. Whippy mentioned don't work either I don't think.
  5. My point was more
    is it that it needs to be implemented,
    or the implentation fixed?
  6. Oh it's certainly a feature really... it should be really easy to add later though.

    The doppler is a thing that I hadn't considered, but would also be nice to have, so that sounds take time to get somewhere!

    There are some audio bugs still in Racer too, and imo it'd be nice to get them fixed (pitch_scale does nothing)... and perhaps tidy up some half-implemented stuff too (ie, backfire sounds fully added to go with the backfire graphics)

  7. Adding a way to define load groups would be a must for HD - Sounds. If you Shift a car into first and accelerate at full load, most racer cars will purr like a cat. If I'd accelerate with 100% load at 1000 rpm my car will shake and make, lets call it a growling noise, which tells me to shift down one or more gears.

    True HD Sounds will only happen if we are only able to set some basic stuff for sounds, e.g. like the wave, pitch, etc. and leave the game to do reverb, echo, etc. all by itself.

    I for one do not think that the current implementation for sound reverb is going to be much help, but it is a step in the right direction.

    Ultimately I think TrackEd should be able to create and calculate the reverb, echo, etc for a track by itself and not use triggerlines for this, more like areas where to apply what kind of sound. It would be even better if it would be possible to create fluent areas, so if you drive of the track next to a huge wall, it will sound different than being 30 meters away from the wall.

    Triggerlines are fine if you never go offroad, but once you do and manage to sneak around them weird results may come up. Driving backwards will also result in unintended stuff, especially for tunnels as when you enter the reverb is reset and if you leave you get the reverb setting which should actually be played upon entering if you drove in the correct direction.
  8. That is true. I was thinking much the same. Maybe even use a system based on distance to a node that defines the audio properties at that location. Ie, let trackEd calculate the occlusion over the track, or perhaps along the spline route, and then determine what will be good settings at different points for the audio alteration, and then Racer can just use your proximity to these points to determine the mix to use.

    I also like the idea that sounds are played at the source, but heard at the camera (track camera) after the sound reaches them. Ie, if I watch from 500m away, I hear the sound instantly. It'd be nice to simulate the audio lag. That would make replays sound even more realistic with the lag :D

    Also just need to define sounds in dB really, rather than 0...X volume (seems to go to 3.0 before stopping getting louder)... then just have an auto-gain control :D

  9. I'd rather go for a more general approach, like a node grid instead of placing nodes along the spline route (if that's what you meant). I mean you can debate about the use of this, but we do not know if we will keep splines forever, so a node grid might be more future proof.

    Especially if we could determine a resolution of the node grid, so we can update old tracks when we get more powerful systems to have a finer sound adjustment (I guess it gets ridiculous now).

    A better approach might be a grid based on the environment, so use fewer nodes in places with less elevation changes/ objects and more nodes e.g. near hills or where you actually expect a change in reverb, echo, etc.

    However I guess this would pull quite a lot of additional resources, as you have to change several aspects of the sound on the fly. Especially when multiple cars come into play.

    While its not the same genre, I recall X3 The Reunion doing this with e.g. Pitch, and the higher the possible variation of pitch for each shot of a gun, the lower the fps.
    If I remember right I gained about 3-5 FPS from turning pitch changes of completely (I was @ 40 fps at that time, so about 43-45 fps). And less lag in battles where I heard multiple sounds.
  10. Why not just use detection like we do for current sounds on tracks?

    Are we near a node, if yes, then see what it's asking us to do with the sound.

    Could easily define a zone around it, then a falloff distance, so 100m radius for the sound, and then a 50m falloff around it.


  11. Stereo

    Premium Member

    The first approximation to that, which would be necessary to make sound start playing as soon as you switch cameras, would be to basically keep a memory of the sounds each source has made over the past few seconds, and then take the current distance (thus the approx. - more accurate would be to keep track of the source's location and slide back in time until they intersect - but unless something's moving at near supersonic speeds, this won't be a huge issue) to determine how far back to be playing. Current approach/departure speed would have to pitch/speed shift the audio so it won't skip. As eg. a car approaching at 1 meter per frame (216km/h at 60fps) will be jumping forward about 3ms in the audio track every frame.

    Hmm. I guess you record out a buffer for each sound source, keep a pointer in it to the current playback, another pointer to where it "should" be, and adjust playback speed (ie how fast the current playback pointer is advancing) so the two match.

    Since volume falls off with distance, you'd have a max length to the buffer proportional to how loud it is, I suppose. A howling engine needs to be heard up to a few km off, which is several seconds time lag. (see http://en.wikipedia.org/wiki/Speed_of_sound#Effects_due_to_wind_shear also - if we have track wind speed, volume falloff is direction dependent)
  12. Hehe, yep.

    It'll add so much though. With HDR sounds as well, it'll make tyre sounds travel further as they do in real life. It sounds odd in Racer right now trying to balance noises so they fall off right. They are either too loud up close to sound right at a distance, or vice versa.

    HDR sounds right now would be good enough. The time warping due to observer distance from source could be a secondary thing I suppose :D

  13. I think this would be best, since we've talked about getting away from splines and it's already implemented in tracked.
    Why not just have it as an option button under the current ambient sounds in Tracked? That way you can just choose if it will be an effect or sound or both, set a location and then a radius.

    Alex Forbin
  14. Good point.

    The code must be there checking if a sound should be playing, and the code seems to work already too.

    OK, it might not be perfect, ie, overlapping zones might cause problems, but for now it seems sensible to add this effect like that and just get it working, then refine it later.

    Ie, ABS isn't perfect right now, nor is TCS, but they have been helpful for the last 5 years even in their currently implemented state :D