Thank you for Opamp77. Do you know if this works on Android for the GearVR?
I’m going to budget around a day to integrate this for the VR Jam. Audio isn’t getting any love in that Jam.
Thank you for Opamp77. Do you know if this works on Android for the GearVR?
Firsthand experience with this… out of the box the plugin does not package properly to the Note 4 and so the app will crash at start up on the GearVR because the plugin isn’t included in the apk. So after following Opamp’s guide here and then his followup on packaging the plugins here, which works for desktop packaging, the next step to solving this is to contact FMOD support and to request a modification to the UEDeployAndroid.cs file in the UE4 source code which they describe as necessary within the FMOD Integration CHM Documentation in the UE4 Help menu dropdown under the section within the CHM on Deployment.
From my communication with FMOD support after doing this, “The windows version of the FMOD integration already has the Android .so files and the .jar file, but there needs to be a modification of UE4 in order to correctly package them up. I’ve been in contact with Epic and they are improving plugin loading for 4.8, but the workaround is to modify UEDeployAndroid.cs and built the UBT build executable. I have attached the code to add in the “android_uedeployment.txt” file…,” which then goes into detail where and how to insert the code.
Unfortunately the email they sent did not include the attachment with the code inside of it, either because it was inadvertently not sent or because Gmail blocked and removed the file before sending it to me. I requested on Friday morning that they resend the attachment to a different email address, yet have not heard back at this time and imagine that I won’t until after the weekend. Just for context since you said, “budget around a day to integrate this,” I sent my initial request on Monday morning of this last week and received the first response on Thursday morning. Having started this integration process myself with this thread here almost two weeks ago, I’ll admit to being a bit frustrated by it and have considered dropping FMOD altogether several times, mainly because the process has been so convoluted and not documented very well, or not documented at all actually. All of this was discovered from piecing together clues, trial and error and reading between the lines, mostly from Opamp’s threads, without which we would all be completely lost.
Because there is one more thing… though the process above will allow FMOD itself to deploy to Android, the actual Oculus Spatializer plugin is not included within the FMOD Plugin itself (the 64-bit and 32-bit .dll versions are), and according to my understanding of the FMOD and Oculus Audio SDK documentation, along with Opamp’s packaging directions on the OculusVR forum, the libovrfmod32.so file included within the Oculus Audio SDK from the Plugins>FMOD>android directory needs to be manually placed somewhere, either within the UE4 engine, the Android NDK -and/or- within the apk directly after packaging, just like the .dll plugins require doing for PC packaging.
When I explained my situation with deploying the Oculus Spatializer to the GearVR and asked FMOD support about where the libovrfmod32.so should go or if it needs including, their response was, “I’ll get back to you regarding loading plugins via Android. The main issue is getting them in the right place so they are packaged up properly during the Android build process.”
In the recent Mobile VR AMA on reddit, Chris from Oculus looked into my question as to where this should be placed and said the following, “I spoke to somebody on the UE4 team who suggested that you but .so files at Engine/Build/Android/Java/libs/armeabi-v7a. If you have trouble, check out UEDeployAndroid.cs.”
All a bit circular, even being linked back to this thread both by Oculus there and by FMOD Support in one of their emails, yet still moving forward… so once I get the code from the new attachment from FMOD support, I am going to insert the code into my own modification of the UE4 source as posted in the following thread here, and then will place the libovrmod32.so file at Engine/Build/Android/Java/libs/armeabi-v7a within the source directory, then package to the Note 4 and see if it works on the GearVR. If not, then I will follow Opamp’s packaging suggestion to manually place the plugin into the apk after it has been packaged and see if that works.
If it all works, woo-hoo! If not, then I’m canning FMOD, because yeah.
I hope this helps clarify your decision (or anyone else’s) and wasn’t too long-winded. Lately I’ve kind of adopted the mantra, “It’s complicated.”
Edit: Yes, it works with help from FMOD Support.
Firsthand experience with this… following Opamp’s guide here and here, neither the FMOD nor Oculus plugins will package properly to the Note 4 and so the app will crash at start up because the plugins are not included in the apk. The solution is to contact FMOD support and to request a modification to the UEDeployAndroid.cs file in the UE4 source code, as described within the Deployment section of the FMOD Integration CHM Documentation in the UE4 Help menu.
Though this will allow the FMOD plugin itself to deploy to Android, the Oculus Spatializer plugin requires the libovrfmod32.so file from the Oculus Audio SDK to be manually placed in Engine\Plugins\FMODStudio\Lib\Android within the UE4 Source directory, which then gets packaged in the proper location by FMOD Studio once the source code modfications from FMOD Support are applied.
Thanks Akshara for the detailed response.
I’ll try the latest native 3D audio support in the master branch instead of FMOD.
I was able to get the Oculus Spatializer working on the GearVR with FMOD Support’s help and edited the post above to reflect this. I posted a rough outline of the process over on the Oculus forums to try and help Bino and anyone else in the Jam get it up and running as quickly as possible. If you are in the Mobile VR Jam and reading this while researching how to get the Oculus Spatializer working, the only option within UE4 at this time is to get FMOD up and running and deploying to Android successfully, which requires contacting FMOD Support. If you have a question about my process for getting it to work, reach out through a PM or post it here and I will answer if I am able.
The instructions posted here and by Akshara and Geoff of FMOD works really well
May as well try asking this question here. I’ve posted it in the FMOD forums as well.
This works well for me if I drag and drop an FMOD event into the scene.
However I can’t seem to fire it from blueprints. It works in the mobile and PC simulator but not in Note4.
Is it possible to fire spatialized sounds from Blueprints?
Wanting to follow along, as I’m curious as well, yet am confused that you posted in the FMOD forums… their forums are archived read only. Where did you post this?
I posted the question where Geoff gave his answer - http://www.fmod.org/questions/question/deploying-on-android
But I now realised that’s not really an appropriate place based on the format of that site.
You have to add an FMODAudio object to the blueprint class. You cannot select an event from Play Event Attached.
If you think you’re an idiot then what should i say after clicking on at least 10 invalid links in order to compile this thing because it’s crying for .lib files that aren’t in the “SDK” or whatever its called.
A bit upset about it, it should be 2 clicks
I tried everything and I am not able to make this work, I always get error
LogFMOD:Warning: d:\jk\workspace\Build__1.7__UE4Libs_Win\studio_api\src\fmod_effect.cpp(189) - Missing DSP plugin 'OCULUS SPATIALIZER' LogFMOD:Warning: d:\jk\workspace\Build__1.7__UE4Libs_Win\studio_api\src\fmod_bankmodel.cpp(232) - Creating stub DSP plugin model and continuing.
Hey Opamp. I tried to follow your guide but with the changes to the plugin/fmod it does not seem to work anymore. Anyone try this with the current Audio SDK and current version of Fmod?
When I drop my events into the level they do not play Audio. I can right click on the event in the UE4 editor and click play and hear the audio. Is there something I need to ensure to get it to play right away?
Little differences I notice now:
The Oculus FMOD plugin looks different with different knobs.
I have two FMOD plugin in UE4 editor. FMOD Studio and FMOD Oculus plugin. I have tried enabling and disabling them.
I test in the editor, VR Preview and from a compiled EXE.
I have’nt tried using FMOD since I wrote this guide TBH. But i’d imagine the reason there are two plugins is because Geoff @ FMOD did what he suggested and seperated out the standard FMOD plugin and my additional blueprint nodes into two seperate modules.
As far as your other issues are concerned I really cant remeber how the audio events works.
This video series might shed some light on that. https://youtube.com/watch?v=K64sGI9cKEg
This isn’t necessarily a problem. The integration uses on FMOD studio system while in the editor, and a second while in the game (or PIE). The system used in the editor is for auditioning and general information querying, and we don’t load plugins into that system for stability. If its printing that warning in the editor at startup you can ignore it. The error you want to keep on eye out for is a red error when running PIE that says “DSP plugin returned an error, bank will not load properly.”.
Other than that, there are two things to be aware of
- Make sure the Oculus .dll you use is the same version in FMODStudio\Binaries<Win64 or Mac> as the version you used in FMOD Studio.
- In FMOD Studio Oculus project settings, click “Oculus Enabled”. That should load the plugin for you when you run PIE or launched game.
If you are still having problems, try posting a new Q/A on FMOD and we can dig into why its not working.
Any luck working out how to get it playing? I’ve got the exact same problem as you at the moment.
I work on a project for the Oculus Rift CV1. The problem i have is that the sound created with FMOD plays not on trough the Oculus Headphones but trough my standard speakers! I need 3d sound and therefore i would like to get some support how to get the sound played trough the Rift itself? Even when in the preferences i change the output to Rift Headset it wont use the headset!
The OP method doesn’t work with 1.08 FMOD.
There two knobs, min and max range on the panel of Oculus Spatializer. Those set the distance. Too bad you can’t see it in the Editor when using Oculus (native FMOD plugin shows attenuation in the 3D view, Oculus’ doesn’t)
Thanks for the guide, some things were a little different on my end due to version and updates.
I’m at the stage of getting the attenuation working on a FMOD event. I tried a few different approaches.
I curious as to how you set the “Distance parameter” in the FMOD event to = attentuation in unreal.
A screenshot would be good of how you setup the blueprint for basic attenuation (if that’s how you approach it)
Unfrtuantly it doesn’t work for me. Probably I don’t have this **ovrfmod64.dll **file and I don’t know how to download it. Or how to install it. I have fmod in my project folder not in my engine folder (I am working with source control)
I have fmod plugin working in Unreal and I have Oculus Spatializer appearing in fmod but everytime I enable spatializer everything in UE4 is silent.
I am using ue 4.18 and fmod studio 1.10.