社区问答

欢迎来到 Audiokinetic 社区问答论坛。在此,Wwise 和 Strata 用户可互帮互助。如需我们团队直接提供协助,请前往技术支持申请单页面。若要报告问题,请在 Audiokinetic Launcher 中选择“报告错误”选项(注意,问答论坛并不会接收错误报告)。我们内部设有专门的错误报告系统,会有专人查看报告并设法解决问题。

要想尽快得到满意的解答,请在提问时注意以下几点:

  • 描述尽量具体:比如,想达到什么样的目的,或者具体哪里有问题。
  • 包含关键细节:比如,Wwise 和游戏引擎版本以及所用操作系统等等。
  • 阐明所做努力:阐明自己为了排除故障都采取了哪些措施。
  • 聚焦问题本身:聚焦于问题本身的相关技术细节,以便别人可以快速找到解决方案。

0 投票

I'd like to seek advice on a scheme of lowering priority of a game object during playback which I'd like to use in my game.

 
The idea is, I think it would be great for long-tailed sounds (weapon shots, explosions) to change their priority while their tail (volume) is gradually decreasing. But with the condition that priority offset at distance for these objects is also working.
 
Since there is such a probability like “set game parameter” in event actions and the possibility to change priority of the sound with RTPC, I have constructed the next scheme:
 
first – RTPC game parameter to change priority of a sound
and second – an event with the next three consecutive actions:
1 - reset game parameter (to restore priority of a game object after a previous “set game parameter” action)
2 - play shot sound (with slight action delay, e.g., 0.01 sec)
3 - set priority parameter (with fade in time to lower absolute value and also with action delay, slightly bigger than previous, e.g., 0.1 sec)
 
And my question is, is this scheme is a correct solution for my idea or maybe I have a mistake somewhere? I have tested it in Soundcaster and everything worked correctly, but who knows, maybe there are some pitfalls.
 
I guess I can also use a side-chain function with RTPC driven by weapon shot peak meter for more accurate values, but the main question is the cooperation of reset and set game parameter actions with distance offset and, the reasonableness of the whole scheme.
分类:General Discussion | 用户: Robert (390 分)
修改于 用户:Bernard R. (Audiokinetic)

1个回答

0 投票
 
已采纳
It could be working, but there are some potential issues with driving priority with RTPC this way.

The RTPC value is per game object and not per sound instance, meaning that if you have the same game object playing an old and a new sound of the same type, both will be bound to the same priority value. Still it will work if you reset the RTPC at every playback but some old sound will be preserved with high priority if the same game object is playing new sounds. There could be a worst case scenario when a game object is playing a lot of sounds, but since a game object has same position all the time, sounds will have same distance priority offset and you should then specify in the priority options "when priority is equal, discard oldest sound".
用户: Alexandre L. (Audiokinetic) (1.5k 分)
采纳于 用户:Robert
Thank you for your comment, Alexandre.
Of course I will be using the options ""when priority is equal, discard oldest sound", I forgot to write about that.
I am a little bit confused with this your sentence: “Still it will work if you reset the RTPC at every playback but some old sound will be preserved with high priority if the same game object is playing new sounds.”
Could you explain it in more detail? I thought if I will use the action “gradually lower priority” and “reset previous priority” for each new sound than it will has bigger priority value than an old one.
RTPC values are per game object and not per sound instance.
for example, you have two characters walking around you in the level. each character is a game object.

The sound they are playing are footsteps. they are at similar distance from listener.
time 1: character 1 plays footstep first instance
time 2: character 2 plays footstep second instance
time 3: character 1 plays footstep third instance

We have 3 sounds palying, the first sound started to fade out, but since sound 3 was on same game object as sound 1, sound 3 will have the same priority RTPC offset as sound 1 since they both share the same game object, therefore soudn 2 will have lowest priority in your system.
Oh, now I understand, thanks a lot!
And because RTPC is per game object, sound 3 in your example will kill not sound 1 but sound 2, if there would be playback limit.
But, I guess it is not such a scary scenario in case if those two objects are using similar sounds.
...