Wwise Unity Integration Documentation
|
A. サーフェスリフレクタと、ポータル
ポータルが、ルームという空間の開口部として音の伝播を通すのと同様に、反射面の開口部としても機能します。単純な立方体をサーフェスリフレクタとして使うと、設定したメッシュの開口部分で、リフレクション(反射)が発生してしまうことを、私たちは サーフェスリフレクタ(Surface Reflectors)に関するチュートリアル の終わりで発見しました。この問題の対策として、Spatial Audioのポータルは、リフレクションパスも認識し、通過させます。リフレクションパスは、ポータルの境界線で回折することもできます。
- 設定は単純で、ルームとサーフェスリフレクタを貫通するポータルを配置するだけです。

リフレクションパスがポータルを通過する様子を示す、Game Object 3D Viewer
B. サーフェスリフレクタと、リバーブ
後期リバーブ(late reverb)のあるルームでは、アーリーリフレクションをリバーブに送り込み、空間の形状をリバーブで意識できるようにすることが可能です。
- Wwiseプロジェクトで、Reflectエフェクトを適用したAuxiliary Busを開きます。
- General Settingsタブで、 Use game-defined auxiliary sends がチェックされていることを確認します。

Auxiliary Bus Property EditorのGeneral Settingsタブで、ルームリバーブにアーリーリフレクションを送る
- シーンを再生して、小ルームのボタンを押します。プレイヤーが小部屋にいると、Voices Graphには以下のように表示されます:

Voices Graphで、小ルームのアーリーリフレクションを、小部屋のリバーブに送る
C. 回折(Diffraction)
エミッターとリスナーの間にオブジェクトが出現するときに、Spatial Audioを使い、このオブジェクトの周りを回る回折パス(diffraction path)を作成できます。エッジを回るパスの角度に基づいて、オブストラクションをシミュレーションし、音を減衰させます。Diffraction(回折)を、個別のSoundや、個別のSurface Reflectorに対して設定できます。回折を有効にしたサウンドを出すエミッタは、回折を有効にした反射面でしか回折しません。
- サウンドのDiffractionを有効にするには:
- Positioningタブで、Enable Diffractionチェックボックスがチェックされていることを確認してください。

サウンドにDiffractionを設定する
-
AkSurfaceReflector コンポーネントの回折を有効にするには:
- Enable Diffractionをチェックします。これで、Wwise Spatial Audioに送られるジオメトリに、回折エッジが生じます。Wwiseがゲームに接続したときに、回折エッジをゲームオブジェクトビュアーで見ることができます。
- 場合によって、Enable Diffraction On Boundary Edgesもチェックします。前の手順のチェックボックスをチェックすると、このチェックボックスが表示されます。バウンダリーエッジとは、1つの三角形だけに接するエッジです。例えば、UnityのQuad 3D Objectを囲うエッジなどは、バウンダリーエッジとみなされます。

回折(Diffractionを有効にした AkSurfaceReflector
- Wwise Unity Demo Sceneでは、Outside(屋外)エミッター、バリア(障害)、そして建物の外壁で、回折を有効にしてあります。回折パスは、紫色です。それぞれの、音が聞こえる場所に、バーチャルソースを配置します。

Game Object 3D Viewerに表示された回折パス
D. Transmission(透過)
エミッターとリスナーの間にオブジェクトが出現すると、音はそのオブジェクトの中を通過することもできます。Spatial Audioは、音のダイレクトパスにオクルージョンを適用することで、この現象を再現します。Occlusion値を0から1の範囲で設定し、 AkSurfaceReflector や AkRoom コンポーネントに適用します。このOcclusion値がWwiseに送られ、そこで、プロジェクトのOcclusionカーブに従い該当フィルタが適用されます。一般的に、設定値が1.0であれば完全なオクルージョン、設定値が0.0であればその音がジオメトリを透過することを意味します。
- Spatial Audioの初期設定で、Transmissionを有効にします

Spatial Audioの初期設定
- ある音がエミッタからリスナーまでのダイレクトパスで遭遇する AkSurfaceReflector や AkRoom コンポーネントの、最大オクルージョン値が、その音の透過値です。
-
AkSurfaceReflector コンポーネントで、Surface Reflectorメッシュの各サブメッシュにオクルージョン値を紐づけるために、 Occlusion Valuesアレイの設定値を入れます。

AkSurfaceReflector コンポーネントのOcclusion Valuesアレイ
-
AkRoom コンポーネントで、Wall Occlusionパラメータのオクルージョン値を変更します。

AkRoom コンポーネントのWall Occlusionパラメータ
- Wwise AuthoringのProject Settingsで、Obstruction/OcclusionタブにあるOcclusionカーブを調節します。

WwiseのProject Settingsの、Occlusionカーブ
E. Roomを認識できるSurface Reflector(最適化)
Spatial Audioにサーフェスリフレクタを追加すると、必ずそのディフレクションエッジや、視界に入るかが、分析されます。この処理を最適化するために、各ルームに、複数のサーフェスリフレクタをつなげたグループを設定できます。1つのルームに関連付けられたサーフェスリフレクタは、ほかのルームからは見えません。サーフェスリフレクタを、1つのルームに関連付ける(1つのAssociated Roomを設定する)のが適しているのは、サーフェスリフレクタがそのルームに完全に包囲されていて、そのルームに、ほかのルームと共有するサーフェスリフレクタがない場合です。ルームを、サーフェスリフレクタに関連付けるかどうかは、全く自由です。ルームを選択していないサーフェスリフレクタは、サーフェスリフレクタをまとめたグローバルグループに追加されます。サーフェスリフレクタをルームに関連付けることで、リフレクションや回折の計算によって実行するレイキャストの、サーチ対象範囲を限定できます。
- ルームとサーフェスリフレクタを関連付けるには、 AkSurfaceReflector コンポーネントの中のAssociated Roomの下にある、ルームを、1つ選択します。

ルーム形状を認識できる、AkSurfaceReflector
Helper class that knows a Wwise Event and when to trigger it in Unity. As of 2017....
Definition: AkEvent.cs:36
UnityEngine.Vector3 axis
The axis used to find the contribution of each environment
Definition: AkEnvironmentPortal.cs:17
static bool Call(string Uri, string Args, string Options, out string Result)
Perform a call to the Wwise Authoring. See Querying the Wwise Project for more information.
Definition: AkWaapiClient.cs:184
(DEPRECATED) This script is deprecated as of 2019.2. Early reflections, Diffraction and Room Reverb c...
Definition: AkSpatialAudioEmitter.cs:9
bool decodeBank
Decode this SoundBank upon load
Definition: AkBank.cs:20
AK.Wwise.AcousticTexture[] AcousticTextures
The acoustic texture per submesh. The acoustic texture represents the surface of the geometry....
Definition: AkSurfaceReflector.cs:17
bool loadAsynchronous
Check this to load the SoundBank in the background. Be careful, if Events are triggered and the Sound...
Definition: AkBank.cs:23
bool drawDiffractionPaths
This allows you to visualize geometric diffraction sound paths between an obstructed emitter and the ...
Definition: AkSpatialAudioDebugDraw.cs:18
void ClosePortal(UnityEngine.GameObject in_gameObject)
Closes the portal on trigger event
Definition: AkRoomPortal.cs:132
ulong GetID()
Access the portal's ID
Definition: AkRoomPortal.cs:99
float reverbLevel
The reverb control value for the send to the reverb aux bus.
Definition: AkRoom.cs:29
Trigger triggerDelegate
All components reacting to the trigger will be registered in this delegate.
Definition: AkTriggerBase.cs:19
static bool IsConnected
Is the client connected
Definition: AkWaapiClient.cs:33
Sorts AkEnvironments based on the selection algorithm. The selection algorithm is as follows:
Definition: AkEnvironment.cs:75
Sorts AkEnvironments based on their priorities.
Definition: AkEnvironment.cs:61
float transitionDuration
Duration of the fade. See AK::SoundEngine::ExecuteEventOnAction()
Definition: AkEvent.cs:72
static bool Unsubscribe(ulong SubscriptionID, int TimeoutMs, out string Result)
Unsubscribes from a topic.
Definition: AkWaapiClient.cs:166
float reflectionsAuxBusGain
(DEPRECATED) As of 2019.2, the early reflections send volume can be set per sound,...
Definition: AkSpatialAudioEmitter.cs:20
virtual UnityEngine.Vector3 GetUpward()
Definition: AkGameObj.cs:228
This component converts the provided mesh into Spatial Audio Geometry.
Definition: AkSurfaceReflector.cs:10
float roomReverbAuxBusGain
(DEPRECATED) As of 2019.2, the Room Reverb Aux Bus Gain is set by the Game-Defined Auxiliary Sends Vo...
Definition: AkSpatialAudioEmitter.cs:28
uint diffractionMaxPathLength
(DEPRECATED) As of 2019.2, diffraction is enabled in the Sound Property Editor in the Authoring tool.
Definition: AkSpatialAudioEmitter.cs:39
static SpatialAudioListenerList SpatialAudioListeners
Returns the list of active Unity Game Objects that are designated to be spatial audio listeners.
Definition: AkSpatialAudioListener.cs:36
static bool Subscribe(string Uri, string Options, WaapiEventCallback Callback, out ulong SubscriptionID, out string Result)
Subscribes to a topic. See Subscribing to Topics in the Wwise Authoring API for more information.
Definition: AkWaapiClient.cs:75
bool drawDiffractionPaths
(DEPRECATED) Spatial Audio Debug Drawing were moved to the new AkSpatialAudioDebugDraw component.
Definition: AkSpatialAudioEmitter.cs:55
This class represents the list of active Unity Game Objects that are designated to be spatial audio l...
Definition: AkSpatialAudioListener.cs:60
bool isLocalizedBank
Is the bank localized (situated in the language-specific folders)
Definition: AkMemBankLoader.cs:20
void UpdateGeometry()
Update the surface reflector's geometry in Spatial Audio.
Definition: AkSurfaceReflector.cs:202
override void OnEnable()
Definition: AkRoom.cs:86
static bool Unsubscribe(ulong SubscriptionID, out string Result)
Unsubscribes from a topic.
Definition: AkWaapiClient.cs:149
bool drawSecondOrderReflections
(DEPRECATED) Spatial Audio Debug Drawing were moved to the new AkSpatialAudioDebugDraw component.
Definition: AkSpatialAudioEmitter.cs:49
The full Wwise Authoring API is exposed to Unity as a native plugin for the Windows and macOS platfor...
Definition: AkWaapiClient.cs:6
void LoadNonLocalizedBank(string in_bankFilename)
Load a SoundBank from WWW object
Definition: AkMemBankLoader.cs:45
AK.Wwise.AuxBus reflectAuxBus
(DEPRECATED) As of 2019.2, the early reflections auxiliary bus can be set per sound,...
Definition: AkSpatialAudioEmitter.cs:13
This component represents a sound object in your scene tracking its position and other game syncs suc...
Definition: AkGameObj.cs:21
Add this script on the game object that represent a listener. This is normally added to the Camera ob...
Definition: AkAudioListener.cs:16
bool EnableDiffractionOnBoundaryEdges
Switch to enable or disable geometric diffraction on boundary edges for this mesh....
Definition: AkSurfaceReflector.cs:30
void SetGeometry()
Sends the mesh's triangles and their acoustic texture to Spatial Audio
Definition: AkSurfaceReflector.cs:175
uint diffractionMaxPaths
(DEPRECATED) As of 2019.2, diffraction is enabled in the Sound Property Editor in the Authoring tool.
Definition: AkSpatialAudioEmitter.cs:36
Defines the behavior of a AkEventPlayable within a AkEventTrack.
Definition: AkEventPlayableBehavior.cs:14
bool drawFirstOrderReflections
(DEPRECATED) Spatial Audio Debug Drawing were moved to the new AkSpatialAudioDebugDraw component.
Definition: AkSpatialAudioEmitter.cs:46
void ExitedRoom(AkRoom room)
Called when exiting a room.
Definition: AkRoomAwareObject.cs:80
void UnloadBank(UnityEngine.GameObject in_gameObject)
Unloads a SoundBank
Definition: AkBank.cs:75
delegate void Trigger(UnityEngine.GameObject in_gameObject)
Delegate declaration for all Wwise Triggers.
This enables us to detect intersections between portals and environments in the editor
Definition: AkEnvironmentPortal.cs:80
static bool Subscribe(string Uri, string Options, WaapiEventCallback Callback, int TimeoutMs, out ulong SubscriptionID, out string Result)
Subscribes to a topic. See Subscribing to Topics in the Wwise Authoring API for more information.
Definition: AkWaapiClient.cs:106
bool Remove(AkSpatialAudioListener listener)
Removes listeners from the list
Definition: AkSpatialAudioListener.cs:92
AK.Wwise.AuxBus reverbAuxBus
The reverb auxiliary bus.
Definition: AkRoom.cs:25
void LoadLocalizedBank(string in_bankFilename)
Load a language-specific bank from WWW object
Definition: AkMemBankLoader.cs:52
delegate void WaapiEventCallback(ulong SubscriptionID, string Contents)
Delegate ran when a subscription is triggered
override void HandleEvent(UnityEngine.GameObject in_gameObject)
Loads the SoundBank
Definition: AkBank.cs:66
This will call AkSoundEngine.SetSwitch() whenever the selected Unity event is triggered....
Definition: AkSwitch.cs:17
bool drawSecondOrderReflections
This allows you to visualize second order reflection sound paths.
Definition: AkSpatialAudioDebugDraw.cs:12
AkGameObjPositionOffsetData m_positionOffsetData
When not set to null, the position will be offset relative to the Game Object position by the Positio...
Definition: AkGameObj.cs:38
virtual UnityEngine.Vector3 GetForward()
Definition: AkGameObj.cs:221
UnityEngine.GameObject sender
GameObject from whom the callback function was called
Definition: AkEvent.cs:18
An AkRoom is an enclosed environment that can only communicate to the outside/other rooms with AkRoom...
Definition: AkRoom.cs:8
virtual UnityEngine.Vector3 GetPosition()
Definition: AkGameObj.cs:210
AK.Wwise.AuxBus reflectionsAuxBus
Definition: AkEarlyReflections.cs:14
Add this script on the game object that represent a listener. This is normally added to the Camera ob...
Definition: AkSpatialAudioListener.cs:19
A playable asset containing a Wwise event that can be placed within a AkEventTrack in a timeline.
Definition: AkEventPlayable.cs:16
void EnteredRoom(AkRoom room)
Called when entering a room.
Definition: AkRoomAwareObject.cs:71
System.Collections.Generic.List< int > unloadTriggerList
Reserved.
Definition: AkBank.cs:29
uint reflectionsOrder
(DEPRECATED) As of 2019.2, the Reflection Order is set in the Spatial Audio Initialization Settings.
Definition: AkSpatialAudioEmitter.cs:23
float wallOcclusion
Occlusion level modeling transmission through walls.
Definition: AkRoom.cs:33
static bool Call(string Uri, string Args, string Options, int TimeoutMs, out string Result)
Perform a call to the Wwise Authoring. See Querying the Wwise Project for more information.
Definition: AkWaapiClient.cs:209
Event callback information. Event callback functions can receive this structure as a parameter
Definition: AkEvent.cs:13
AkCallbackInfo info
For more information about the event callback, see the classes derived from AkCallbackInfo.
Definition: AkEvent.cs:15
A track within timeline that holds AkEventPlayable clips.
Definition: AkEventTrack.cs:20
static void Disconnect()
Disconnects from the connected Wwise Authoring application
Definition: AkWaapiClient.cs:50
This will call AkSoundEngine.SetState() whenever the selected Unity event is triggered....
Definition: AkState.cs:17
Definition: AkRoom.cs:156
UnityEngine.Mesh Mesh
The mesh to send to Spatial Audio as a Geometry Set. We recommend using a simplified mesh.
Definition: AkSurfaceReflector.cs:13
string bankName
Name of the bank to load
Definition: AkMemBankLoader.cs:17
AkEnvironment[] environments
Definition: AkEnvironmentPortal.cs:22
bool drawHigherOrderReflections
This allows you to visualize third or higher order reflection sound paths.
Definition: AkSpatialAudioDebugDraw.cs:15
ulong GetID()
Access the room's ID
Definition: AkRoom.cs:81
void RemoveGeometry()
Remove the surface reflector's geometry from Spatial Audio.
Definition: AkSurfaceReflector.cs:211
override void HandleEvent(UnityEngine.GameObject in_gameObject)
Opens the portal on trigger event
Definition: AkRoomPortal.cs:126
AkRoom AssociatedRoom
Optional room with which this surface reflector is associated. It is recommended to associate geometr...
Definition: AkSurfaceReflector.cs:34
AK.Wwise.Event roomToneEvent
Wwise Event to be posted on the room game object.
Definition: AkRoom.cs:36
This class is an example of how to load banks in Wwise, if the bank data was preloaded in memory....
Definition: AkMemBankLoader.cs:11
int priority
Definition: AkRoom.cs:22
bool drawFirstOrderReflections
This allows you to visualize first order reflection sound paths.
Definition: AkSpatialAudioDebugDraw.cs:9
Use this component to define a reverb zone. This needs to be added to a collider object to work prope...
Definition: AkEnvironment.cs:23
AkCallbackType type
AkSoundEngine.PostEvent callback flags. See the AkCallbackType enumeration for a list of all callback...
Definition: AkEvent.cs:21
bool enableActionOnEvent
Enables additional options to reuse existing events. Use it to transform a Play event into a Stop eve...
Definition: AkEvent.cs:44
Base class for the generic triggering mechanism for Wwise Integration. All Wwise components will use ...
Definition: AkTriggerBase.cs:12
AkCurveInterpolation curveInterpolation
Fade curve to use with the new Action. See AK::SoundEngine::ExecuteEventOnAction()
Definition: AkEvent.cs:41
bool isEnvironmentAware
Is this object affected by Environment changes? Set to false if not affected in order to save some us...
Definition: AkGameObj.cs:25
float reflectionMaxPathLength
(DEPRECATED) As of 2019.2, the Reflection Max Path Length is set by the sound's Attenuation Max Dista...
Definition: AkSpatialAudioEmitter.cs:16
This script deals with initialization, and frame updates of the Wwise audio engine....
Definition: AkInitializer.cs:22
bool Add(AkSpatialAudioListener listener)
Uniquely adds listeners to the list
Definition: AkSpatialAudioListener.cs:74
Completely obstructs/occludes the emitter of the current game object from its listeners if at least o...
Definition: AkEmitterObstructionOcclusion.cs:12
uint diffractionMaxEdges
(DEPRECATED) As of 2019.2, diffraction is enabled in the Sound Property Editor in the Authoring tool.
Definition: AkSpatialAudioEmitter.cs:33
bool drawHigherOrderReflections
(DEPRECATED) Spatial Audio Debug Drawing were moved to the new AkSpatialAudioDebugDraw component.
Definition: AkSpatialAudioEmitter.cs:52
float roomToneAuxSend
Send level for sounds that are posted on the room game object; adds reverb to ambience and room tones...
Definition: AkRoom.cs:41
UnityEngine.GameObject soundEmitterObject
Game object onto which the Event will be posted. By default, when empty, it is posted on the same obj...
Definition: AkEvent.cs:69
float reflectionsVolume
Definition: AkEarlyReflections.cs:21
const int MAX_ROOMS_PER_PORTAL
AkRoomPortals can only connect a maximum of 2 rooms.
Definition: AkRoomPortal.cs:10
Use this component to add a Large Mode position to any AkAmbient in a Scene.
Definition: AkAmbientLargeModePositioner.cs:8
Add this script on a GameObject to print Spatial Audio paths.
Definition: AkSpatialAudioDebugDraw.cs:6
Completely obstructs the spatial audio portal of the current game object from the spatial audio liste...
Definition: AkRoomPortalObstruction.cs:13
An AkRoomPortal can connect two AkRoom components together.
Definition: AkRoomPortal.cs:8
float[] OcclusionValues
The occlusion value per submesh. The occlusion value is a control value used to adjust sound paramete...
Definition: AkSurfaceReflector.cs:22
EnvListWrapper[] envList
Unity can't serialize an array of list so we wrap the list in a serializable class
Definition: AkEnvironmentPortal.cs:85
Use this component to define an area that straddles two different AkEnvironment's zones and allow mix...
Definition: AkEnvironmentPortal.cs:13
static bool Connect(string Uri, uint Port)
Connects to a Wwise Authoring application
Definition: AkWaapiClient.cs:14
This component makes a GameObject aware of AkRoom components. When using Spatial Audio rooms,...
Definition: AkRoomAwareObject.cs:15
static AkAudioListener? TheSpatialAudioListener
Returns the "single" spatial audio listener.
Definition: AkSpatialAudioListener.cs:28
Loads and unloads a SoundBank at a specified moment. Vorbis sounds can be decompressed at a specified...
Definition: AkBank.cs:16
Use this component to attach a Wwise Event to any object in a scene. The sound can be started at vari...
Definition: AkAmbient.cs:36
Set an early reflections auxiliary bus and send volume for a particular game object.
Definition: AkEarlyReflections.cs:7
bool saveDecodedBank
Save the decoded SoundBank to disk for faster loads in the future
Definition: AkBank.cs:26
AkActionOnEventType actionOnEventType
Replacement action. See AK::SoundEngine::ExecuteEventOnAction()
Definition: AkEvent.cs:38
bool EnableDiffraction
Switch to enable or disable geometric diffraction for this mesh.
Definition: AkSurfaceReflector.cs:26
あなたのプロジェクトについて教えてください。ご不明な点はありませんか。
プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。
Wwiseからはじめよう