0
0

Hello all,
I’m on a RPG game like project, using C++ programming and Ogre3D for the graphic system, and I would like to use FMod Ex for the sound system. But I have some problems getting it initialized correctly.

I may be have missed something, but the time is playing against me, so I was wondering if FMod Ex was compatible with Ogre3D, and if yes, how do I make it clearly functionnal ? Do someone would have a working exemple ?

Scyrus R.

PS: I think it’s a problem with the includes and/or the initialisation . . .

  • You must to post comments
0
0

[quote="Olex":69gaevjw]My LGPL code might help you out. While rudimentary it could help you out. (it is however good enough for my needs at the moment):

http://ox.slug.louisville.edu/urumble2/ … /rgf/sound

I plan to write a tutorial on how to use it, and release as a stand-alone package some time later.

P.S. Watch out as I use boost smart pointers for my sound framework.
http://www.boost.org/libs/smart_ptr/smart_ptr.htm[/quote:69gaevjw]

Didn’t realize you had that under LGPL there Olex…..guess I’ll have to play with that too along with Opal. 8)

  • You must to post comments
0
0

I think I am the 4th Ogre 3D user who is implementing FMOD for a project at school.

I was wodering though if anybody already used the implementation with Ogre and an FMOD_INIT_3D_RIGHTHANDED flag at initialisation succesfully without negating the vector values for 3D spatialisation (don’t know if this is proper english actually).

  • You must to post comments
0
0

[quote="jorrit5477":9jkmt9h4]I think I am the 4th Ogre 3D user who is implementing FMOD for a project at school.

I was wodering though if anybody already used the implementation with Ogre and an FMOD_INIT_3D_RIGHTHANDED flag at initialisation succesfully without negating the vector values for 3D spatialisation (don’t know if this is proper english actually).[/quote:9jkmt9h4] I use that flag. I’ve yet to check proper operation for all cases, but so far it works find within my system.

  • You must to post comments
0
0

FmodEx works fine with Ogre3D. I’m currently using it for one of my projects.

  • You must to post comments
0
0

So what [i:1fu6l9bo]is[/i:1fu6l9bo] the proper way of dealing with coordinates between FMOD / Ogre?

[url=http://pastebin.com/f632e5a95:1fu6l9bo]This is what I do.[/url:1fu6l9bo] (pastebin, for syntax hightlighting) Unfortunatly it’s not correct.

I’ve read through the [url=http://www.ogre3d.org/phpBB2/viewtopic.php?t=20756:1fu6l9bo]source of StuntPlayGround 2.0[/url:1fu6l9bo], but Walaber is not using the Event-system so he’s not doing EventSystem::Init like the rest of us. :(

I tried his math though – inverting the Z-axis – with and without FMOD_INIT_3D_RIGHTHANDED, but FMOD still complains when I set3DListenerAttributes.

Should I bother using FMOD_INIT_3D_RIGHTHANDED?
If not – how should I massage the Ogre::Vector3 before handing it over to FMOD?

  • You must to post comments
0
0

Cool, now I’m sure there si no problem with Ogre3D. I’m quite sure, there is no audio initialization with that one either . . . so I might have messed up my includes. That must be it. Thanks for the infos, I’ll go check that later.

  • You must to post comments
0
0

Hi Guys,

It just so happens we are using Ogre internally for our new sandbox tool, so I can say with confidence that the 3D positioning works correctly. You just need to make sure you initialise the FMOD system or FMOD event system (for those using Designer) with FMOD_INIT_3D_RIGHTHANDED. All coordinates will be directly transferrable then. i.e. FMODVector.x = OgreVector.x, y = y, z = z.

  • You must to post comments
0
0

You might want to check out the Ogre3D wiki and look at the FmodEx sound manager code someone had submited.

I’m not using that yet………but will probably implement it myself sumtime in the future.

  • You must to post comments
0
0

Thank you Mathew! Yesterdays experimentation (doing what the Ogre wiki’s soundmanager did, trying out various "facts" from the forums etc) left me very confused.

Would you mind sharing with us your code to set3DListenerAttributes properly with Ogre?

  • You must to post comments
0
0

Hi, I’m the 3rd Ogre User here I guess and I just want to tell you that the SoundManager from the Ogre WiKi has obviously wrong code in it don’t touch or at least touch at own risk.

It seems to me that the creator of the code just has stereo sound available on his machine and therefore it might somehow sound right for him, but it’s just rubbish for 5.1 and such speaker sets.

If you PM me at the Ogre forums or here I’d give you the important pieces of my code, I’m just willing to do that because I can remember very well which battle it was to convert between the FMOD and the Ogre coordinate system, and I want to save you from this fate :wink:.

friendly greetings,
stoneCold

  • You must to post comments
0
0

Sure not a problem, I have an update function for audio in our sandbox tool that is run once every 10ms to keep FMOD updated with listener position data. Also note that mCamera is the Ogre::Camera instance, mAudioSystem is an FMOD event system instance and FMOD_ERRCHECK is a macro I define to record any errors to the Ogre.log. This code doesn’t take into consideration velocity as yet.

[code:1jegy4kg]
Ogre::Vector3 ogrePosition = mCamera->getDerivedPosition();
Ogre::Vector3 ogreForward = mCamera->getDerivedDirection();
Ogre::Vector3 ogreUp = mCamera->getDerivedUp();

FMOD_VECTOR fmodPosition = { ogrePosition.x, ogrePosition.y, ogrePosition.z };
FMOD_VECTOR fmodForward = { ogreForward.x, ogreForward.y, ogreForward.z };
FMOD_VECTOR fmodUp = { ogreUp.x, ogreUp.y, ogreUp.z };

FMOD_ERRCHECK(mAudioSystem->set3DListenerAttributes(0, &fmodPosition, NULL, &fmodForward, &fmodUp));
FMOD_ERRCHECK(mAudioSystem->update());[/code:1jegy4kg]

  • You must to post comments
0
0

Hmm, thanks for pointing that out. I’ve been busy getting video playback to work in my app and haven’t messed with the sound manager yet.

I’d be very interested in the code and/or hear about the issues you had getting 5.1/7.1 working properly with Ogre………as that is one of my goals in this current project.

  • You must to post comments
0
0

Oh thats nice!

I was running: [code:299hha5v]
SUtils::toFMODV(_camera->getPosition(), _listenerpos);
SUtils::toFMODV(_camera->getWorldOrientation().yAxis().normalisedCopy(), _up); //direction vectors are required to be of unit length!
SUtils::toFMODV(_camera->getWorldOrientation().zAxis().normalisedCopy(), _forward);[/code:299hha5v]

And before that something equally contrived. I’m not very familiar with the Ogre methods: I suppose the Camera’s direction and up-vectors are normalized?

  • You must to post comments
0
0

is there a place (forum) I can go to for a tutorial that implements the two together?? I am somewhat of a newb that is in charge of implementing ogre and fmod, I’m trying to use the virtual voices example from fmod and merge it into ogre’s camera track demo. the theory of the listener to move and songs at a certain position. does anybody know where I could find it. thanks.

oh the 3d fmod was sort f helpful, but it uses openGL, and i"m not using that.

  • You must to post comments
0
0

I’m not overly familiar with Ogre myself but so far I have found it to be pretty straight forward. (No bad vector pun intended :roll:).

And yes the camera directions are normalized.

  • You must to post comments
0
0

Well, Wallaber just released his Stunt Playground 2.0 source code witch used Newton, Fmod and Ogre. Should be easy to find on the Ogre forums.

I think it’s "only" Fmod 3.x and not Fmodex though, but it might be a place to start.

  • You must to post comments
0
0

My LGPL code might help you out. While rudimentary it could help you out. (it is however good enough for my needs at the moment):

http://ox.slug.louisville.edu/urumble2/ … /rgf/sound

I plan to write a tutorial on how to use it, and release as a stand-alone package some time later.

P.S. Watch out as I use boost smart pointers for my sound framework.
http://www.boost.org/libs/smart_ptr/smart_ptr.htm

  • You must to post comments
Showing 17 results
Your Answer

Please first to submit.