社区问答

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

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

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

+1 投票
Hi all,

I am looking for a way to smoothly fade some music from the diegetic space to the non-diegetic, and I was wondering what the best way to achieve this would be.

I haven't found any way to control the spread of a 3D source from an RTPC (it seems spread can only be managed through attenuations, as a function of distance to the listener).

Right now, the way I do it is I have 2 versions of my music hierarchy: one is 2D, the other is 3D, and I crossfade between both, but it's a waste of CPU/memory and it feels wrong!

Any ideas? :)
分类:General Discussion | 用户: Matthieu B. (820 分)

1个回答

+3 投票

That's one way to do it, and it doesn't waste as much memory as you think (well, a few bytes).  But it is ugly, I agree. Transitioning from 3D panning to 2D panning and vice versa, without glitch, is not trivial.  You need to take spatialization in account (or maybe not, if the Enable Spatialization checkbox is off) and maybe cone attenuation.  There are ways to do that though. 

  1. Keep only one copy of your music
  2. Put an RTPC on the 2D/3D selector (just under Center % in the Positioning tab)
  3. For this step, you need programmer support.  When you start the transition from 3D to 2D, move your game object position at the right place relative to listener.  It must also face the listener.  "The right place" is defined as "the x/y/z position that will make the distance right so that the volume with attenuation and spread will be almost the same as the 2D version".  And that, my friend, is the killer, since it depends on your attenuation curves and spread.  It also depends on your audio output setup: spatialization rules are different for mono, stereo or 5.1 sounds.  You will want this "move" to be nice and gradual too, so do it over a few game frames.  Think of this as forcing your player to sit in front of the radio (actually, bringing the radio in front of him).
  4. Make a new Event in which you have to sub actions:
    1. Set the RTPC to 2D
    2. Set the Volume of your music to the volume in the 3D space (it won't be the same)
  5. Trigger the event when the game object is finally at the right place.

But I suspect at this point that you will not be happy either.  You will discover that your nice stereo music (or 5.1), when playing in 3D, is not playing exclusively in the right speakers, even when properly aligned in front of you.  3D spatialization rules make each of the channel bleed in neighboring speakers (this is made so rotating in 3D space gives a smooth transition from speaker to speaker).  So when switching to 2D, the bleed will suddenly disappear and you may notice it.  That's the current state of things right now.

But there is hope in the next version, we've added a Focus feature to control the amount of bleed in the 3D spatialization.

Did I say it wasn't trivial ? :)

 

用户: Mathieu J. (Audiokinetic) (7.1k 分)
3D to 2D Music using Spread as an RTPC
...