An idiots guide to using the Oculus SDK with FMOD

As the title suggests and idiots guide written by me, A fully certified idiot.

  1. download the audio sdk from https://developer.oculus.com/downloads/#sdk=audio

  2. download the UE4 FMOD Plugin version 1.05.13 http://www.fmod.org/download/fmodstudio/integrations/UE4/Plugin/Win/fmodstudio10513ue4.7windows.zip

Edit* or this custom one https://drive.google.com/file/d/0BzgVPR4xFGgjYl9DSDJETmlITTA/view?usp=sharing
Which has additional settings and blueprints for the Oculus audio SDK.

  1. Download FmodStudio version 1.05.12 (important as banks created with 1.05.13 were crashing my system for some reason) http://www.fmod.org/download/fmodstudio/tool/Win/fmodstudio10512win-installer.exe

  2. Install FmodStudio.

  3. Extract the UE4 FMOD plugin to your UE4 installation folder so that the Engine folders merge. For me that was e:\unreal\4.7\

  4. Extract the oculus 64bit plugin ovrfmod64.dll to Engine/Binaries/ThirdParty/FMODStudio/Win64/

  5. Create a new UE4 project and within the content folder create a folder called FMOD

  6. Within UE4 goto Edit->Project Settings->Plugins->FmodStudio. Under Basic change output format to Stereo. And under Advanced click the plus sign next to Plugin File and enter ovrfmod within the text field. (its important to enter exactly that without the “64.dll” as fmod will crash the editor when you PIE if it cannot find the file. The Fmod plugin adds “64.dll” internally).

  7. Now fire up FmodStudio. Go to Edit->preferences and under the format tab change output to Stereo. And under the Build tab change the directory to point to your Content/FMOD directory.

  8. Select File->save as… and give your Fmod project a name i.e “fmodtest”(making a note of where the project is located).

  9. Close FmodStudio and navigate to where your Fmod project was saved within that directoy(which contains your fmodtest.fspro file) create a folder called Plugins and within the plugins folder extract ovrfmod32.dll from the audio sdk zip file.

  10. Fire up FmodStudio again and re-open your saved fmod project. and create a new event by right clicking on the events tab.

p1.png

  1. Give the new event a name and then select the new event. Select the master track and delete the 3d-panner by right clicking on it.

  1. Add the Oculus Spatializer by right clicking on the same area.

  1. Right click on the VU meter to the left and change the input to Mono.

p100.png

  1. right click on the Plus tab next to the timeline and add a default distance parameter.

  1. Right click on the master volume knob and add automation.

p5.png

  1. Create a attenuation graph by left clicking once on the left and again on the right.

  1. Select File->Import Audio File… to import the sound you wish to use. After the file has been loaded into the audio bin drag the file onto your audio track.
    In this case ‘Audio 1’.

  1. Right click on the event in the events tab and assign to the master bank.

  1. Save your fmod project and finally build with File->Build.

If all has gone well there should be a new folder within your UE4 content folder. content/FMOD/Desktop/ which contains your banks.

Fire up your UE4 project and within the content browser under FMOD/Events you should see your FMOD audio event.
Drag the event into your scene and test it out with VR-preview.

  1. Look forward to the day when this is integrated directly into UE4. :slight_smile:

Thank you very much, I shared your post on reddit so everyone can see how awesome you are!

+1 Awesome!
Thanks!

Thanks. I was having the same problem with 1.05.13 builds crashing the UE project.

Any idea how we set up room size and enable reflections via Blueprint?

This is going to save me a lot of time and effort. Thanks!!

Bookmarked, and tyvm!

Thanks so much for putting this together. All went good until the very end, I’ve got a folder called ‘Desktop’ which contains 2 .bank files within the FMODStudios/Content/ dir however I can’t see anything in my content browser or if I select an object and add an FMOD competent to it, the event section has nothing in the drop down. Any advice on what I could do?

you’re a genius! Thanks for posting this, I got it working but I’m an idiot and don’t fully understand what It’s doing. Will I have to run each sound effect in my project through FMODStudio in this matter if I want them to be 3d? Is there an easy way to make the sound “events” loop once in unreal? Thanks in advance!

@chrisdhog Its really hard to say without seeing it but it sounds like you didnt assign the event to the master bank.

once your fmodStudio project is setup it should be just a case of adding additional events to that project and rebuilding it.
To loop a sound right click on the audio file in the timeline and ‘add loop’

I’ve just finished modding the FMod plugin to be able to do this and am trying to compile it. but I am having a bit of an issue with the compiled version saying that it needs to be recompiled when placed in 4.7.2 vannilla. If anyones got any experience with compiling a distributing plugins I could do with some help.

Ok,

Custom FMod Plugin is compiled with some added functionality for the oculus plugin.
https://drive.google.com/file/d/0BzgVPR4xFGgjYl9DSDJETmlITTA/view?usp=sharing

theres now some more setting’s for the oculus sdk along with some blueprint nodes.

Apply Default Settings OSP Needs to be called at begin play to apply these settings.

Hi,
I’m the lead developer on the FMOD Studio plugin for UE4. I love the work you’ve done here!

Exposing the OSP functions into Blueprint and the Settings dialog is a great idea. In terms of the actual code changes, I’m inclined to add support for it via a separate module instead. That would make it easy to strip out for those users who don’t want to use it, or for platforms which currently don’t support it at all at the moment. I think we could probably get this added as an official part of the FMODStudio plugin for the next release.

Cheers Geoff,

Your right a seperate module would have been better but as the UE4 plugin system is a bit of a blackbox to me I just extended functionality
within your current module.
It would be great if you could create a seperate module for the next release.
BTW Is there any chance of you guys including 32bit binary’s with the next release?

Thanks for the tutorial helped me out alot!

However, everything works fine in the editor but I have problems running my game after I packaged it in UE 4.7.2.

The error I am getting is this: http://imgur.com/TKfP3oR

I tried to copy the .dll files into my game folder I packaged… but no luck.

I just had another look at our latest release, and it has FMOD 32bit dlls, the compiled plugin for Win32 Shipping, but is missing the Binaries/ThirdParty/FMODStudio/Win32 files. They are actually just a copy from Plugins/FMODStudio/Lib/Win32/*.dll but I will update our build script for next release.

Just wanted to say FMODSTUDIO is a great tool! Its an easy transition for the audio heads, because the workflow is very similair to Ableton Live / Bitwig. Thumbs up:cool:

Thanks, much appreciated! I’ll pass that along to the team.

Incredibly helpful, thanks.

I’ve gotten everything to work except one thing–it appears that spatialization and volume work fine when moving around a level with the mouse and WASD keys. However, with positional tracking, I can’t seem to get the audio to follow the position of the headset. For example, I would expect the audio to get louder as I approach it physically (due to positional tracking from the camera), but the volume remains the same (whether I move forwards or backwards). The audio only changes volume when I move towards it or away from it using the WASD keys. Any advice?

Definitely a great tool!! Is it possible to use the FMOD and Oculus plugin also with real time streamed audio?