Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

0 votes

Hey folks! 

So I'm trying to crowbar in multi position emitters to our existing engine :slightly_smiling_face: I have the base implementation set up and working, but I'm having a little trouble with occlusion. Our engine works by applying an RTPC based on the occlusion zone the game object is in; this obviously isn't going to work for multi position game objects as I could have a point in an occlusion zone, and another outside.So I'm trying to use the AK_SpeakerVolumeMatrix callback to fake occlusion:          

AkSpeakerVolumeMatrixCallbackInfo* info = reinterpret_cast<AkSpeakerVolumeMatrixCallbackInfo*>( callbackInfo );
if( info == nullptr )
{
break;

// set up the speaker volumes event and broadcast the (in my test case, 2)
int numPoints = info->pContext->GetNum3DPositions();

// initialize the event that retrieves the occlusion values
speakerVolumeEvent->SetPlaylistData( ndSoundHandle(info->playingID), info->gameObjID, numPoints ); 

// broadcast the event and retrieve the occlusion values (in my test  case, [0.0f, 1.0f])

vector<ndFloat> occlusionValues = speakerVolumeEvent->GetPointOcclusionValues();

AkEmitterListenerPair emitterListenerPair;

for( ndU32 i = 0; i < numPoints; ++i )
{
   info->pContext->Get3DPosition( i, emitterListenerPair );
   emitterListenerPair.fDryMixGain = 1.0f - occlusionValues[i];
   emitterListenerPair.fGameDefAuxMixGain = 1.0f - occlusionValues[i];
   emitterListenerPair.fUserDefAuxMixGain = 1.0f - occlusionValues[i];

   emitterListenerPair.fOcclusion = occlusionValues[i];
   if( occlusionValues[i] > 0.0f )
   {
        emitterListenerPair.fDistance *= 1000.0f;
   }
}

In my test case I have one game object in an occlusion zone, and one outside it - so I set the occluded game object's occlusion value to 1.0f, and the other to 0.0f. But no matter  how I adjust the emitter-listener pairs it doesn't seem to make a difference to the final output volume. 

Is it possible to control an individual point's volume?

Cheers!

/Oliver

in General Discussion by Oliver S. (310 points)

Please sign-in or register to answer this question.

...