What is the easiest way to get 3d spatialization for VR?

Hi Fredrum!

Welcome to the world of Game Audio! We have definitely had spatialization in game audio for a long time! The default panner maps the 3D position of spatialized sound sources and projects an angle across your speaker map, which then outputs that audio to the correct speaker(s). We utilize attenuation by distance to affect the loss of power from the sound source dissipated into air which can mean a drop in volume or a change in frequency response (through a filter).

On a platform where you know the user will be using headphones (like VR), you also have the option of utilizing an HRTF renderer which simulates the transit of sound across a human head (delaying sounds based on the speed of sound through air and filtering sounds based on the shadowing caused by the head itself).

We support 3rd party HRTF renderers and ship with some options already. Both Oculus Audio and Steam Audio Plugins provide HRTF renderers you can check out and these can be enabled like any other plugin in UE4.

There are a variety of other tricks and implementation techniques one might employ to create a well resolved 3d audio experience, so I encourage you to be creative and experiment.

Never discount the power of a well resolved stereo asset either played back non-spatialized, sometimes those can be just as useful in crafting your 3d audio experience as any other technique.