コミュニティQ&A

Audiokineticのコミュニティ主導のQ&Aフォーラムへようこそ。ここはWwiseとStrataのユーザのみなさまがお互いに協力し合う場です。弊社チームによる直接のサポートをご希望の場合はサポートチケットページをご利用ください。バグを報告するには、Audiokinetic LauncherのBug Reportオプションをご利用ください。(Q&AフォーラムではBug Reportを受け付けておりませんのでご注意ください。専用のBug Reportシステムをご利用いただくことで、バグの報告が適切な担当部門に届き、修正される可能性が高まります。)

最適な回答を迅速に得られるよう、ご質問を投稿される際は以下のヒントをご参考ください。

  • 具体的に示す:何を達成したいのか、またはどんな問題に直面しているのかを具体的に示してください。
  • 重要な詳細情報を含める:Wwiseとゲームエンジンのバージョンやご利用のOSなど詳細情報を記載してください。
  • 試したことを説明する:すでに試してみたトラブルシューティングの手順を教えてください。
  • 事実に焦点を当てる:問題の技術的な事実を記載してください。問題に焦点を当てることで、ほかのユーザのみなさまが解決策を迅速に見つけやすくなります。

+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? :)
Matthieu B. (820 ポイント) General Discussion

回答 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 ポイント)
...