버전

menu_open
경고 : 이 페이지에서 보호된 일부 정보가 표시되지 않았습니다.
특정 플랫폼의 라이선스 사용자일 경우 로그인하셨는지 확인해 주세요.

Quick Start Sample Integration - Environments and Game-defined Auxiliary Sends

Environmental Effect Example

First the user must create Auxiliary busses in the Wwise project that will represent the environments, one aux bus per environment. The option "Use game-defined auxiliary sends" must have been set in the object properties or in the object it inherits its properties from for sounds that should use this feature. For the game to use these parameter sets, the effect in question must be registered in the sound engine. You do this in exactly the same way you register other effect plug-ins (see Plug-in Example for more details), as demonstrated in the following example:

The appropriate factory header file must be included so the four arguments passed to AK::IAkPluginMgr::RegisterPlugin() can be found at compile time. To allow the creation functions to be found at link time, your C++ project must link with the appropriate plug-in library. Refer to Overview of Libraries and Header Files Contained in the SDK for more information on libraries.

After the effect to be used as environmental is registered and applied to one control bus in the Wwise project (refer to the Wwise Help for more information), your game can start setting the ratio of each environment for each game object to be affected by those environments.

You can set the dry ratio for each game object with AK::SoundEngine::SetGameObjectOutputBusVolume(). To set the ratio for each environment that should be considered for that game object, use AK::SoundEngine::SetGameObjectAuxSendValues(), as described in the following example:

// In this example we hardcode the 3 values for Dry, Hangar, and Tunnel. In
// a game you would compute these values based on the game object's position
// in its environment.
AkReal32 nDryRatio      = 0.5f;
AkReal32 nHangarRatio   = 0.25f;
AkReal32 nTunnelRatio   = 0.25f;

AkAuxSendValue aEnvs[2];
aEnvs[0].auxBusID = AK::SoundEngine::GetIDFromString( L"Hangar" );
aEnvs[0].fControlValue = nHangarRatio;
aEnvs[1].auxBusID = AK::SoundEngine::GetIDFromString( L"Tunnel" );
aEnvs[1].fControlValue = nTunnelRatio;

AK::SoundEngine::SetGameObjectOutputBusVolume( GAME_OBJECT_ID_HUMAN, nDryRatio );
AK::SoundEngine::SetGameObjectAuxSendValues( GAME_OBJECT_ID_HUMAN, aEnvs, 2 );

Refer to Integration Details - Environments and Game-defined Auxiliary Sends for information on the meaning of these ratios.

Note.gif
Note: The names passed to AK::SoundEngine::GetIDFromString() are the names of the Auxiliary busses as defined in Wwise. Refer to Using IDs or Strings (Unicode or Ansi) for more information.

In the sample program you can experiment with Environments by moving the first three sliders in the "Environments: Footsteps" group, which let you set the ratio (0% on the left, to 100% on the right) for Dry, Hangar, and Tunnel environments.

Refer to Integration Details - Environments and Game-defined Auxiliary Sends for more details, and to Integration Demo Sample for the sample project.

Obstruction/Occlusion Example

Obstruction and occlusion can be computed for each game object relative to each listener, as it depends on the environment and positions of game objects and listeners.

Setting obstruction and occlusion is done by calling AK::SoundEngine::SetObjectObstructionAndOcclusion() as demonstrated here:

// In this example we use hardcoded values for obstruction and occlusion. In a game you need
// to compute these values based on the position of the game parameter and the listener, and
// the composition of their environments.
AkReal32 fObstruction = 0.05f;
AkReal32 fOcclusion   = 0.0f;

// In this case we compute and set the values for Listener 0 only. If you have multiple listeners,
// the values must be computed and set for each listener independently.
AK::SoundEngine::SetObjectObstructionAndOcclusion( GAME_OBJECT_ID_HUMAN, 0 /*listener*/, fObstruction, fOcclusion );

In the sample program you can experiment with Obstruction and Occlusion by moving the last two sliders in the "Environments: Footsteps" group which let you set the ratio (0 to 100%) for obstruction and occlusion.

Refer to Obstruction and Occlusion in Environments for more details, and to Integration Demo Sample for the sample project.

Note.gif
Note: This sample code comes from the Sound Engine Integration Sample Project available in the Samples section. Refer to Integration Demo Sample for more information.

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요