Simon Ashby, founder and VP of strategy at Audiokinetic, offers an in depth look at implementing quality convolution reverb
In post-production nowadays, convolution reverb is certainly the weapon of choice for reproducing realistic room acoustics and outdoor environments. For good reason too, since it's easy to use and it replicates real environments with precision and detail that surpasses traditional parametric reverbs.
In game development, however, convolution reverb is rarely used. One reason is that developers may not have the time and expertise to code such advanced DSP effects. But the most significant reason for not using convolution reverb is the general perception that convolution reverbs consume a lot of runtime memory and CPU resources.
Resource usage is directly affected by the length of the IR (impulse response) used by the convolution reverb. An IR is a recorded sample of a room’s response to short impulse sounds, which are applied to the incoming audio signal. Typically, rooms with long reverb times generate longer IRs and use more resources at runtime, whereas smaller rooms generate shorter IRs and consume less runtime resources.
Audiokinetic fully understands the performance constraints in game development and has created a convolution reverb that adjusts memory and CPU usage based on available resources while minimising the impact on reverb quality. To optimise runtime performance, two approaches can be used by developers: time-domain truncation and frequency-domain truncation.
Since CPU and memory consumption are directly related to the IR length, significant optimisation can be achieved by reducing the length of the IR. This technique is called time-domain truncation. A good approach to shorten the IR length is to determine the noise floor level of the scene where the IR will be used and then reduce the IR end time to the point where the reverb tailgate artifact is inaudible. Playing a high energy transient sound through the convolution reverb over a room tone at the noise floor level of the scene where the IR is used is a good way to find the right end point.
Typically, IR high frequencies decay more rapidly over time than low frequencies. When the IRs are convolved in the frequency domain, memory can be saved by discarding low energy frequencies from the IR.
With the convolution reverb effect you can discard these low energy frequencies by defining a threshold parameter that sets the level below which the energy contained in the IR is discarded to save CPU and memory resources. This further optimizes storage and processing of the convolution at minimal or no cost in perceptual quality.
Setting the threshold value too high may introduce artifacts such as frequency sweeping and tail cut. As with time truncation, the best approach to find the right threshold value is to play back the convolution reverb over a room tone near the floor level. This way, it is possible to set the threshold value to a level where quality is preserved and resources are maximised.
Using time and frequency domain truncation is a great strategy to reduce both memory and CPU usage. The following table shows various time and frequency truncation scenarios profiled on an Xbox360 along with their respective compression factors.
CAN YOUR GAME AFFOR IT?
Resource budgets for high-quality DSP effects vary greatly among game developers, so it is difficult to generalise the answer to that question. Also, the convolution reverb might not be suitable for long reverb tail environments like cathedrals, for example, where a parametric reverb would probably be a better choice. But, the convolution reverb yields great performance for outdoor locations and short to medium size rooms and with time and frequency truncation, most concerns about runtime memory and CPU usage are a thing of the past.
Considering the ease of use and the high quality result that convolution reverb provides, it's the tool to consider if you want to take your game audio to the next level.