Wwise SDK 2024.1.0
|
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 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.
RTCP values are set as follows:
or
or
RTPC values can affect sounds playing on game objects, bus parameters, source plug-ins, and effect plug-ins. We will consider all these possibilities.
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 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.
In Wwise, some bus parameters can be modified by RTPCs. In general, most usages of RTPCs on bus parameters will require calls to the AK::SoundEngine::SetRTPCValue() method be made with the AK_INVALID_GAME_OBJECT parameter, as explained in RTPCs and Game Objects. This will give all busses a value for that RTPC.
However, if your project uses 3D Positioning for busses, you might want to give specific values to each bus. In this case, provide the Game Object/Listener attached to the bus to the AK::SoundEngine::SetRTPCValue() function.
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 busses using the plug-in, the same scenarios explained above in RTPCs and Busses will apply.
If the plug-ins are used in Actor-Mixer or Interactive-Music objects or your project, they will always be played on a Game Object. Most of the time AK::SoundEngine::SetRTPCValue() method should be made with a valid AkGameObjectID value. However, it is still possible to only set a global default value for all Game Objects that don't have one specified directly by using AK_INVALID_GAME_OBJECT.
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: 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.
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageRegister your project and we'll help you get started with no strings attached!
Get started with Wwise