hez
01-12-2010 10:44:19
Hi,
I'm new into OgreOggSound and I have 5 intensive months of experience in Ogre3D.
I'm developing an Augmented Reality application with a colleague using Ogre.
My problem is that we need to add 3D sound to make the experience more realistic, but I've been working with that for 8hours with no results.
I found a post with some example lines but i don't get any 3D effect ("plain" sound only).
My scene is something like this:
(tipical AR) One node placed into the marker (what we use to put te scene over the background webcam plane), one 3d object placed over it with animations and simple sounds made with windows' playSound (completely useless, the reason why i'm looking into your project). I've made a dummy object with the robot.mesh wich walks around the other "main" model, and i've made a child for attaching the 3D sound into the "dummy".
I don't really know if i've missed something or i've set the incorrect parameters.
And there's something I don't actually understand: if you attach a sound to a sceneNode and you move around the scene, it should get the distance to the observer (ogre's camera) and do the correspondant calculations for the attenuation of the sound, isn't it?
This is part of my code:
Any clues?
Thanx
I'm new into OgreOggSound and I have 5 intensive months of experience in Ogre3D.
I'm developing an Augmented Reality application with a colleague using Ogre.
My problem is that we need to add 3D sound to make the experience more realistic, but I've been working with that for 8hours with no results.
I found a post with some example lines but i don't get any 3D effect ("plain" sound only).
My scene is something like this:
(tipical AR) One node placed into the marker (what we use to put te scene over the background webcam plane), one 3d object placed over it with animations and simple sounds made with windows' playSound (completely useless, the reason why i'm looking into your project). I've made a dummy object with the robot.mesh wich walks around the other "main" model, and i've made a child for attaching the 3D sound into the "dummy".
I don't really know if i've missed something or i've set the incorrect parameters.
And there's something I don't actually understand: if you attach a sound to a sceneNode and you move around the scene, it should get the distance to the observer (ogre's camera) and do the correspondant calculations for the attenuation of the sound, isn't it?
This is part of my code:
// => in createScene
if (gavilan = mSoundManager->createSound("Gavilan", "Gavilan.wav", false, true, true) )
{
//set 3D properties
gavilan ->setRolloffFactor(2.f);
gavilan ->setReferenceDistance(10.f);
}
//Attenuation algorithm
mSoundManager->setDistanceModel(AL_LINEAR_DISTANCE);
...
soundNode->attachObject(gavilan);
...
// => in frameStarted
//If marker detected
gavilan->play();
//pause if not
...
// => in frameRenderingQueued
// Sound 3D timing
mSoundManager->update(evt.timeSinceLastFrame);
Any clues?
Thanx