|
Wwise SDK 2025.1.3
|
RTPC 是可使用 AK::SoundEngine::SetRTPCValue() 函数来更新的实时参数。由于事件动作无法更改 RTPC 值(译注:无法连续更改),因此设置它们是您的职责。
RTPC 值总是被当作 AkRtpcValue 传输,后者代表 32 位浮点数值。This value is used to directly interpolate in the RTPC curve the sound designer has previously defined in Wwise.
当参数超出在 Wwise 中定义的曲线时,将使用曲线上的极值。如果参数大于最大值,则使用曲线上最右侧的值;如果参数小于最小值,则使用曲线上最左侧的值。如果 RTPC 参数代表布尔值,则 1 表示 True,0 表示 False。
设置 RTCP 值的方式如下:
或者
或者
RTPC 值可影响在游戏对象、总线参数、源插件和效果器插件上正在播放的声音。We will consider all these possibilities.
要使用 ID,必须在选中 Wwise 中 Generate SoundBanks 对话框上的“Generate header file”选项的情况下生成 SoundBank。名为 Wwise_IDs.h 的定义文件中包含所有必要的 ID。每次生成 SoundBank 时都会更新此文件。
RTPCs can be used to modify the behavior of game objects by affecting a Sound SFX, a Sound Voice, a container or a Property Container. Switches can also be modified through the use of RTPCs (refer to 驱动切换开关).
您只需一次函数调用,即可为所有未赋值的游戏对象设置全局 RTPC 值。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.
在 Wwise 中,有些总线参数可通过 RTPC 进行修改。总的来说,在总线参数上应用 RTPC 时,一般都要通过 AK_INVALID_GAME_OBJECT 参数调用 AK::SoundEngine::SetRTPCValue() 方法(如 RTPC 和游戏对象 中所述)。这样可以为所有总线提供一个 RTPC 值。
不过,若工程为总线应用 3D Positioning,则可能要为每条总线赋予特定的值。在这种情况下,请将与总线绑定的 Game Object/Listener 提供给 AK::SoundEngine::SetRTPCValue() 函数。
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. 要让 RTPC 值正确调节插件所在总线上的这些属性,请参照上述 RTPC 与总线 章节中所述的情况。
If the plug-ins are used in Container objects or your project, they will always be played on a Game Object. 大部分情况下,在调用 AK::SoundEngine::SetRTPCValue() 方法时都要使用有效的 AkGameObjectID 值。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.
![]() | 备注: 注意设置全局 RTPC 值与根据游戏对象设置 RTPC 值之间的差异,这点非常重要。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. |
![]() | 注意: 注意,同一 RTPC 可能会同时用在声音、总线和效果器上,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. |
有关集成RTPC的示例,请参阅 RTPC 示例 。