Announcement

Collapse
No announcement yet.

An idiots guide to using the Oculus SDK with FMOD

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    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/fmodstu...4.7windows.zip

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

    3) 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/fmodstu...-installer.exe

    4) Install FmodStudio.

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

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

    7) Create a new UE4 project and within the content folder create a folder called FMOD

    8) 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).

    9) 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.

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

    11) 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.

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

    Click image for larger version

Name:	p1.png
Views:	1
Size:	25.0 KB
ID:	1145263

    13) 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.

    Click image for larger version

Name:	p2.png
Views:	1
Size:	45.0 KB
ID:	1145264

    14) Add the Oculus Spatializer by right clicking on the same area.

    Click image for larger version

Name:	p3.png
Views:	1
Size:	78.7 KB
ID:	1145265

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

    Click image for larger version

Name:	p100.png
Views:	1
Size:	54.1 KB
ID:	1145266

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

    Click image for larger version

Name:	p4.png
Views:	1
Size:	46.5 KB
ID:	1145267

    17) Right click on the master volume knob and add automation.

    Click image for larger version

Name:	p5.png
Views:	1
Size:	28.3 KB
ID:	1145268

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

    Click image for larger version

Name:	p6.png
Views:	1
Size:	32.2 KB
ID:	1145269

    19) 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'.

    Click image for larger version

Name:	p7.png
Views:	1
Size:	65.0 KB
ID:	1145270

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

    Click image for larger version

Name:	p8.png
Views:	1
Size:	162.7 KB
ID:	1145271

    21) 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.

    22) Look forward to the day when this is integrated directly into UE4. :-)
    Last edited by Opamp77; 03-07-2015, 10:26 AM. Reason: incorrect title

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

    Comment


      #3
      +1 Awesome!
      Thanks!

      Comment


        #4
        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?
        Creator of VR games, Dimensional and The Relentless
        For updates see twitter.com/JumbliVR or JumbliVR.com

        Comment


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

          Comment


            #7
            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?

            Comment


              #8
              Opamp77 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!

              Comment


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

                Comment


                  #10
                  Originally posted by Spectral Illusions View Post
                  Opamp77 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!
                  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'
                  Last edited by Opamp77; 03-07-2015, 07:58 AM.

                  Comment


                    #11
                    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.

                    Comment


                      #12
                      Ok,

                      Custom FMod Plugin is compiled with some added functionality for the oculus plugin.
                      https://drive.google.com/file/d/0Bzg...ew?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.
                      Click image for larger version

Name:	osp1.png
Views:	1
Size:	121.3 KB
ID:	1067870

                      Click image for larger version

Name:	osp2.png
Views:	1
Size:	133.1 KB
ID:	1067871
                      Last edited by Opamp77; 03-07-2015, 10:30 AM.

                      Comment


                        #13
                        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.

                        Comment


                          #14
                          Originally posted by Geoff Carlton View Post
                          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?

                          Comment


                            #15
                            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.
                            Last edited by rayburn; 03-10-2015, 04:03 PM.

                            Comment

                            Working...
                            X