HeroEngine Forums

HeroEngine Support => General Discussion => Topic started by: GuruComposer on Jun 22, 16, 09:32:34 PM

Title: FMOD Problem: Hero Engine Blade givesno file path?
Post by: GuruComposer on Jun 22, 16, 09:32:34 PM
Hi everyone,

I'm having a very strange problem getting sounds to upload from my FMOD Studio Banks to Hero Engine. I'm using FMOD Studio 1.05.14 and the HE Blade 2.6.7. I build a bank in FMOD, with eventsloaded into the bank, and place them in the hero engine repository audio folder.

I then go to the HE Blade, and click create, audio, find the bank, and create the bank. I then create an instance of the bank, and a speaker appears right above my caster. Now when I go to adjust the properties of the instance of the bank, and select the file path so that the FMOD event will actually load into the instance, there is no file path. It is a blank drop down menu.

So I can't get any sounds to play. Why is there no file path in the file path properties window of the instance of the FMOD bank?

Can someone please help me? Thank you!
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: ToY-Krun on Jun 24, 16, 09:48:32 AM
This got resolved, but i'll post the solution here as well for future reference.

There can only be one MasterBank.bank file loaded on the client at any given time.
if you have multiple projects, using multiple masterbank files, they will need to be inside
sub folders , with each masterbank, and additional project bank files in the same folder with each other.

The masterbank file is reloaded on entering an area NON seamlessly, but does not reload during seamless travel.

Each sound bank that attempts to play, searches the folder it is in for the masterbank, and uses it, however if any masterbank is already loaded, it will be searched instead.  If the sound isnt found in the masterbank, no event/path will be available for that sound.

Hope some of that made sense :)
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: nocake on Aug 25, 16, 01:53:49 AM
How do you properly assign the master bank file to load on the first load?

Also should it be "Master Bank" or "MasterBank"?

Does anyone have a working FMOD source folder + example paths so we can see exactly how the pathing is set up and test from a full proof solution.

Thanks.
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: ToY-Krun on Aug 25, 16, 09:58:41 AM
Quote
How do you properly assign the master bank file to load on the first load?
you don't, it loads automatically when the first FX spec that uses audio is called. (provided that audio uses the masterBank)

Quote
Also should it be "Master Bank" or "MasterBank"?
Master Bank.
FmodStudio automatically creates this file, just leave as is.
Just be sure to upload all the files that FmodStudio creates in your "build" folder.
This image does not correspond with the example below as its from a different build, but this shows
where you can find your "build" folder:
(https://i.gyazo.com/6d57f87dc78fbe3f3b46722ba91b0143.png)



Inside your project, all of the sound for your game will be created.
you probably want to sort it using numerous subfolders within the project.

each actual sound event then is added to a Bank.  if you dont have a bank you'll need to create one, but don't add anything to the master Bank.

Quote
Does anyone have a working FMOD source folder + example paths so we can see exactly how the pathing is set up and test from a full proof solution.

upload all of your files into the same folder.  Where that folder is isnt as important as having them all together.

(https://i.gyazo.com/9b256e15a36089ac6c48fea6c464d981.png)

Heres an example:

I'll refer to the Torch sound event:
(https://i.gyazo.com/9405c96f3d3e5175cbbaa34933e999c5.png)

to keep it separate ive put it in its own subfolder called Fire (all fire events go here)

next i create a Bank for ALL of my fire events, and add Torch to that Bank:

(https://i.gyazo.com/89884ce4bc3360b992d57a84ac878aca.png)

you'll notice the Master Bank, but that is created by the FmodStudio, and contains the info
for ALL of your custom made banks.  think of it as the index in a way , for your Audio project.

Easy way to get the proper event path (different format from FMOD Designer) is to right click on the event in FMOD Studio, and click copy path.   Paste this into the FX editor/Script where you need the path.

Studio uses "event:" in the path.
so, an event called "(the bank name)Fire/(the event name)Torch" would be entered as :

event:/Fire/Torch



Is that what you were looking for?
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: nocake on Aug 25, 16, 12:35:12 PM
I will dig into this today,

quick questions before:

How can you tell what bank is loaded and when it is loaded?

Do you load the master bank file to the FX's or the individual bank containing the audio you want?

Do you have an example of a working fmod project to upload?
If not i will include one once i get this working for other peoples sanity.
There is just too many little things that are not in the wiki.
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: ToY-Krun on Aug 25, 16, 02:03:39 PM
i cant upload a project without uploading copyrighted material, but the master bank is loaded by the engine automatically.  other banks are loaded on demand as needed (when called by an FX etc)

you never call the master bank, it is for engine use only.

You do not load banks, but rather tell the FX system what bank to use, the loading/unloading
of banks is internal.   They're loaded asynchronously like Specs are, and just like specs, once loaded, will
remain loaded until the client is purged (transfering to another area via RequestTravel() etc, non seamless, or logging out).

An FX spec, asks for the bank file you need

the event path would be as described above (for an FX)

OR you can create a single instance of your audio like this:

to create an audio node in the game world, simply load from the "create/audio/load Audio" menu, then "create/audio/create instance, then from the drop down select the event of yoour choice (after first selecting which bank to use) in the properties panel.

There are a couple things not in the wiki as it does not pertain to HeroEngine, but can be found on Fmod's web site.  How to use the software itself etc are not included on the wiki, same reason.  There is a lack of info regarding the use of FmodStudio as the wiki has not been updated since the implementation of FmodStudio over FmodDesign. (and wont be until the release of the new site/wiki) However, as with FmodDesign, all help for the software itself comes from Fmod's own site.

As far as the implementation in the Engine, we must rely on the forums / social media at the moment as it doesnt make sense to stop work on the new site to back up and update the old items :D

And with that said, its not really complicated once you get used to setting your banks up in the engine.
there are only two methods of using them... well 3 if you count HSL, but for the most part you'll use the FX system and the Manual method of creating single instances of your audio nodes.
And the setup of each one is pretty simple, just a matter of getting used to the path structure where needed, (Only in HSL and FX specs) and keeping your events sorted in your Fmod project so that you can easily find sound events you want (put "like" sounds in a single bank together etc).


this is where having some help from a sound director is almost a must at some point as , there is as much work required for good sound/placement/swapping etc as there is in building the game world itself.

Also most of them will be familiar with Fmod.
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: nocake on Aug 29, 16, 10:40:26 AM
I think the missing piece of information was that it must be in livecontent folder for HE to load it properly not the Audio file on the main directory.

Audio is working as intended now.
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: ToY-Krun on Aug 29, 16, 10:56:05 AM
you may put it in any folder you like, if you notice the screen shot above,  our audio folder is in the HE Root folder, I made you an example one in livecontent.  It makes no difference whatsoever.

all of your project files should be in a single folder, and there cannot be a previously loaded master bank file (called by an older audio file for example).

when an audio file is loaded, it looks in its imediate folder for the master bank file, that must also be the currently loaded master bank, (there can only be one period).

Hope that helps clear up any confusion for any others that may have issues on the subject of the Master Bank file.
only one, anywhere you like, so long as all of its bank files share the folder.



Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: FI-ScottZ on Sep 12, 16, 07:21:27 PM
Have you gotten this to work for putting an audio node in an area via the Create-->Audio-->Load Audio... menu? If so, which bank did you choose? The specifically-named one or "Master Bank"?
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: ToY-Krun on Sep 12, 16, 07:25:55 PM
create/audio/load the bank you wish (not the master bank)
then
create/audio/choose your bank

then in properties, make sure volume is up (1 max)
then in the event field, select theevent you want
then, adjust the pitch to anything above "0" or it wont play.

Then it should work. (yeah i have sounds placed this way for water etc)

Edit: it took me some playing about before i realized that pitch had to also be adjusted.
Seems like it should probably default to something other than "0", but thats just me.
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: nocake on Sep 12, 16, 09:48:51 PM
Hrm loading any bank does nothing. Master or not.

When I go back up to add the bank a second time it just isnt in the list. Does not matter how many times I attempt to load it.

This bank works perfectly fine through the FX system though.
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: ToY-Krun on Sep 12, 16, 11:04:01 PM
nocake, add the following to your Server side E_EditHandler class script. let me know if it takes care of the issue with creating audio instances via the Create/audio method



Code: [Select]
method HE_ValidateAddAsset( FQN as String, isValid references Boolean, error references String) as Boolean
  bank as Integer = FindString(FQN, ToLower(".bank"))
  if bank > 0
    return true
  .
 
  return false
.


seems i added this last october... while FX's seem to work okay, it looks like the ".bank" type asset wasnt added to the valid asset list.


Edit: Actually hold up on this, we're looking into it, there may be a way to correct it rather than override it.
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: FI-ScottZ on Sep 12, 16, 11:24:55 PM
There was a problem for us in the EDIT server prototype and we were able to fix it, at least to get the loaded asset to show up in the list for creation.

Initially, when we tried loading a bank from the Create-->Audio menu, there was a message in the Chat Panel:

"Edit: AddAsset was called with an invalid fileExtension on the FQN...."

That message comes from unique method _ValidateAddAsset() in server _EditHandlerClassMethods.  We could see it comes after calling  $EDIT._isKnownAssetFileExtension() with ".bank" as the test extension.  That method checks the _editAssetRegistry field of both the "_EditHandler" and "EDIT" prototypes for an asset with the matching extension.

Looking at our prototypes via CLI we saw that both had ".fev" for the extension of the audiofmodeventasset, but no ".bank" extension.  Looking further into _EditHandlerClassMethods, we saw that the function _ProcessCommandAddHeroEngineAssets() creates an asset called "audiobankasset" with extension ".bank" and that it is called by the edit command "addheroengineassets".
_________________________________

TLDR; When we entered the command "/heedit addheroengineassets" into the chat panel, we were able to add bank files to the audio creation menu.

I tested this and the sounds also work called from code via the client $SOUND system node.
Title: Re: FMOD Problem: Hero Engine Blade givesno file path?
Post by: ToY-Krun on Sep 12, 16, 11:28:34 PM
Thanks for posting that up Scott.

I've gone ahead and corrected ours as well now and removed the override method :D


There was mention when Fmod Studio was implemented that it "could" cause conflicts when using the new sound files along with the old ones ( i assume in the same area/location at the same time).

It may be that they didnt add this in automatically, with the intention that the world owners should implement it themselves when they had their audio assets converted to the new ones etc.

Unsure on that, but thanks again Scott.