버전

menu_open

Integration Details - RTPCs

Introduction

RTPCs are real time parameters that you can update using the AK::SoundEngine::SetRTPCValue() function. It is your responsibility to set RTPC values, because event actions cannot modify them.

RTPC Values

RTPC values are always passed as AkRtpcValue, which represents a 32-bit float value. This value is used to directly interpolate in the RTPC curve the sound designer has previously defined in Wwise.

When parameters are beyond the curve defined in Wwise, the extreme values on the curve are used. If the parameter exceeds the maximum value, the rightmost value of the curve is used, and if the parameter is under the minimum value, the leftmost value of the curve is used. If the RTPC represents a Boolean value, 1 represents True and 0 represents False.

Setting RTPC Values

RTCP values are set as follows:

AKRESULT AK::SoundEngine::SetRTPCValue( 
    AkRtpcID        in_rtpcID,                                      // ID of the RTPC
    AkRtpcValue     in_value,                                       // Value to set
    AkGameObjectID  in_gameObjectID = AK_INVALID_GAME_OBJECT        // Associated game object ID
);

or

AKRESULT AK::SoundEngine::SetRTPCValue( 
    const char *    in_pszRtpcName,                                 // Name of the RTPC
    AkRtpcValue     in_value,                                       // Value to set.
    AkGameObjectID  in_gameObjectID = AK_INVALID_GAME_OBJECT        // Associated game object ID
);

or

AKRESULT AK::SoundEngine::SetRTPCValue( 
    const wchar_t * in_pszRtpcName,                                 // Name of the RTPC
    AkRtpcValue     in_value,                                       // Value to set.
    AkGameObjectID  in_gameObjectID = AK_INVALID_GAME_OBJECT        // Associated game object ID
);

RTPC values can affect sounds playing on game objects, bus parameters, source plug-ins, and effect plug-ins. We will consider all these possibilities.

Enabling ID Usage

To work with IDs, the banks must be generated with the "Generate header file" option in the Generate SoundBanks dialog box in Wwise. The definition file, named Wwise_IDs.h, contains all the required IDs. It is updated at each bank generation.

RTPCs and Game Objects

RTPCs can be used to modify the behavior of game objects by affecting a Sound SFX, a Sound Voice, a container or an actor-mixer object. Switches can also be modified through the use of RTPCs (refer to Driving Switches).

You can set a global RTPC value for all unassigned game objects with one function call. To do this, call the AK::SoundEngine::SetRTPCValue() method using AK_INVALID_GAME_OBJECT as game object ID, or without specifying an AkGameObjectID parameter. However, once the sound object receives a call to this method using valid AkRtpcID and AkGameObjectID inputs, the game object is considered assigned and will no longer be affected by the global RTPC value.

RTPCs and Busses

In Wwise, some parameters of busses can be modified by RTPCs. For busses to be correctly affected by RTPC value changes, calls to the AK::SoundEngine::SetRTPCValue() method must be made with the AK_INVALID_GAME_OBJECT parameter, as explained in RTPCs and Game Objects.

RTPCs and Plug-Ins

In Wwise, RTPCs can affect the properties of effect and source plug-ins, such as their reverb levels, pitch, or low pass cut-off frequencies. For the RTPC value to correctly affect these properties on buses using the plug-in, calls to the AK::SoundEngine::SetRTPCValue() method must be made with the AK_INVALID_GAME_OBJECT parameter, as explained in RTPCs and Game Objects. If the plug-ins are used by game objects, calls to the AK::SoundEngine::SetRTPCValue() method must be made with a valid AkGameObjectID value.

Note.gif
Note: It is important to note the difference between setting global RTPC values, and setting RTPC values per game object. If a Wwise object playing sounds, such as a switch container, is affected by RTPCs, it is important to make calls to the AK::SoundEngine::SetRTPCValue() method with a valid AkGameObjectID value. On playback, if no such game object-specific value has been set, the sound engine will look for a global RTPC value that will have been set by calling AK::SoundEngine::SetRTPCValue() with the AK_INVALID_GAME_OBJECT parameter or with no specified game object. If this global value does not exist, the sound engine will use the Game Parameter's default value as specified in the Wwise authoring application.
Caution.gif
Caution: Note that it is possible to use the same RTPC for sounds, buses, and effects. This may result in unexpected behavior, and we recommend you use different RTPCs for game objects, buses, and effects. For example, in a racing game, you might have set a default RPM value on the engines of ten cars. At the same time, a low pass filter on the bus playing the cars' engine sounds could be applied. If you follow this recommendation, it will be easier for you to identify the source of the low pass filter effect.

For an example of integrating RTPCs, refer to RTPC Example.


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

지원이 필요하신가요?

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

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

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

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

Wwise를 시작해 보세요