HDR Audio gives us the ability to simulate extreme volume changes in the limited -60db to 0db (in practical terms -30db to 0db) range available. The key usage of the system is to allow very loud sounds that would be 100db plus in the real world to retain a simulated sense of that volume.
We can achieve this by considering the volume available as a slice of the complete volume we wish to represent. This moving window of sound will shift up when an explosion plays, culling the sounds at lower volumes (gentle ambiance, etc), and dipping the sounds in the area in between (shouts, distant gunfire etc).
In addition to this we have distance factoring that allows for the fall off over distance. With this system, a weapon can have the same HDR value on both FP and 3P, and the distance from player of the FP sound will subtract HDR value, allowing it to be culled by louder sounds. While this was effective at short/mid range we found it was too aggressive at long range, so we added a max falloff setting that locks the amount of HDR lossage caused by distance. The adjustable figure keeps loud but distant sounds playing, with a good sense of distant volume.
You need to give each event that you want to be considered by the HDR code a floating point property called "loudness" and set its range between 0.0 and 1.0
These are the console commands associated with HDR Audio.
CVar | Description |
---|---|
s_HDR [0/1] | Turns the HDR system on or off. |
s_HDRDebug [0/1] | Toggles display of current HDR activity. |
s_HDRFade [0.0 - 1] | After the initial cull amount this is the span of HDR with volume dipped from none to 100% |
s_HDRFalloff [0.0 - 1] | This is the time taken to return to normal levels after HDr has been activated. |
s_HDRLoudnessFalloff [0.0 - 1] | This is the amount per meter that HDR value drops over distance. |
s_HDRLoudnessmaxFalloff [0.0 - 1] | This is largest amount HDR is allowed to drop over distance. |
s_HDRRange | This is range of HDR value that gets completely culled. |
This is an in-game example of HDR active, with debug display on.
This is the sound with the current highest HDR value. In this case, an FP firing loop with HDR of 0.7. This value is causing a cull on some quiet / distant sounds (shown in red (4)), and dip in volume of less quiet/distant (shown in amber (3)) and doesn't affect others (shown in green (2)).
To keep a sound exempt from the HDR system, it can be given an HDR value of 0, and this will exempt it (and it will not appear in the debug list).