Wwise Unity Integration Documentation
|
A. 표면 리플렉터와 포털
포털이 공간 영역을 열어 소리가 전달되도록 하듯이 표면 리플렉터는 반사적인 표면을 통해 소리가 전달되도록 합니다. 표면 리플렉터 튜토리얼 의 끝부분에서 간단한 큐브를 표면 리플렉터로 사용할 경우 리플렉션이 메시의 열린 부분에서 일어나는 것을 볼 수 있었습니다. 이 문제를 해결하기 위해서 Spatial Audio Portal은 리플렉션 경로를 인식하며 통과시킵니다. 심지어 리플렉션 경로는 포털의 경계선에서 회절합니다.
- 설정 방법은 간단합니다. 공간으로의 포털을 설치하면 표면 리플렉터가 작동합니다.
Game Object 3D Viewer에서 포털을 통한 리플렉션 경로
B. 표면 리플렉터와 리버브
늦은 리버브가 있는 Room의 경우 리버브에 초기 리플렉션을 추가하여 지오메트리를 더욱 인식하도록 할 수 있습니다.
- Wwise 프로젝트에서 Reflect Effect가 적용된 Auxiliary Bus를 여세요.
- General Settings 탭에서 Use game-defined auxiliary sends를 선택하세요.
초기 리플렉션를 공간 리버브로 전달하는 Auxiliary Bus Property Editor General Settings 탭
- 씬을 재생하고 작은 Room에서 버튼을 누르세요. 플레이어가 작은 Room에 있을 때 Voice Graph가 다음과 같이 표시됩니다.
Voices Graph에서 작은 공간의 초기 리플렉션은 작은 공간의 리버브로 전달됩니다.
C. 회절
오브젝트가 방사체와 리스너 사이에 나타날 경우 Spatial Audio는 오브젝트를 피해 지나갈 회절 경로를 생설할 수 있습니다. 모서리 주위의 경로 각도에 따라 사운드가 감쇠되어 방해를 시뮬레이션합니다. 기본적으로 회절은 Unity에서 비활성화되어 있습니다. 회절은 Spatial Audio 방사체마다 그리고 Surface Reflector마다 활성화할 수 있습니다. 회절이 활성화된 방사체는 회절이 활성화된 반사적 표면에서만 회절합니다.
-
AkSpatialAudioEmitter 컴포넌트에서 회절 활성화하기
-
Diffraction Max Edges를 8로 설정하세요
-
Diffraction Max Paths를 8로 설정하세요
-
Diffraction Max Path Length를 이 방사체가 재생하는 사운드의 최대 감쇠 거리를 표시하는 값으로 설정하세요 (혹은 실험 중일 경우 10000과 같이 어느 정도 큰 값으로 설정).
Diffraction enabled AkSpatialAudioEmitter
-
AkSurfaceReflector 컴포넌트에서 회절 활성화하기
- Enable Diffraction을 선택하세요. 그러면 Wwise Spatial Audio에 전송된 지오메트리에서 회절 모서리가 생성됩니다. 회절 모서리는 Wwise가 게임에 연결되었을 경우 게임 오브젝트 뷰어에서 확인할 수 있습니다.
- Enable Diffraction On Boundary Edges도 확인하세요. 이 체크 상자는 이전의 체크 상자가 체크되었을 때 나타납니다. 경계 모서리는 한 삼각형에만 연결된 모서리를 말합니다. 예를 들어 Unity Quad 3D Object의 모서리가 경계 모서리로 간주됩니다.
Diffraction enabled AkSurfaceReflector
- Wwise Unity Demo 씬에서는 실외 방사체, 건물의 경계선과 외부에 회절이 활성화되어 있습니다. 회절 경로는 보라색으로 표시됩니다. 각 회절 경로는 사운드가 들려올 곳인 가상 근원지를 생성합니다.
Game Object 3D Viewer에서 회절 경로
D. 공간 인식적 표면 리플렉터 (최적화)
Spatial Audio에 추가된 각 표면 리플렉터는 회절각과 가시성에 대해 분석됩니다. 이 단계를 최적화하기 위해서 각 공간이 연결된 표면 리플렉터의 그룹을 가질 수 있습니다. 공간에 연결된 Surface Reflector(표면 리플렉터)는 다른 공간에서 볼 수가 없습니다. Surface Reflector가 공간에 완전히 둘러싸여 있으며 이 공간이 다른 공간과 표면 리플렉터를 공유하지 않을 경우에만 공간에 연결되어야 합니다. 공간을 표면 리플렉터와 연결하는 것은 완전히 선택적입니다. 공간을 선택하지 않으면 표면 리플렉터가 표면 리플렉터의 전역 그룹으로 추가됩니다. 표면 리플렉터를 공간에 연결하면 리플렉션과 회절 계산에 의해 실행되는 레이 캐스팅에 대한 검색 공간이 줄어듭니다.
- 공간을 연결하려면 AkSurfaceReflector 컴포넌트의 Associated Room에서 Room을 선택하세요.
Room-Aware AkSurfaceReflector
.
Helper class that knows a Wwise Event and when to trigger it in Unity. As of 2017....
Definition: AkEvent.cs:36
Base class for spatial audio emitter and listener components.
Definition: AkSpatialAudioBase.cs:12
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
Add this script on the GameObject which represents an emitter that uses the Spatial Audio API.
Definition: AkSpatialAudioEmitter.cs:6
bool decodeBank
Decode this SoundBank upon load
Definition: AkBank.cs:20
bool loadAsynchronous
Check this to load the SoundBank in the background. Be careful, if Events are triggered and the Sound...
Definition: AkBank.cs:23
void ClosePortal(UnityEngine.GameObject in_gameObject)
Closes the portal on trigger event
Definition: AkRoomPortal.cs:133
ulong GetID()
Access the portal's ID
Definition: AkRoomPortal.cs:86
float reverbLevel
The reverb control value for the send to the reverb aux bus.
Definition: AkRoom.cs:23
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
The gain [0, 1] applied to the reflect auxiliary bus.
Definition: AkSpatialAudioEmitter.cs:19
virtual UnityEngine.Vector3 GetUpward()
Definition: AkGameObj.cs:228
This component will convert the triangles of the GameObject's geometry into sound reflective surfaces...
Definition: AkSurfaceReflector.cs:9
float roomReverbAuxBusGain
Send gain (0.f-1.f) that is applied when sending to the aux bus associated with the room that the emi...
Definition: AkSpatialAudioEmitter.cs:30
uint diffractionMaxPathLength
The maximum length that a diffracted sound can travel. Should be no longer (and possibly shorter for ...
Definition: AkSpatialAudioEmitter.cs:43
static SpatialAudioListenerList SpatialAudioListeners
Returns the list of active Unity Game Objects that are designated to be spatial audio listeners.
Definition: AkSpatialAudioListener.cs:32
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
This allows you to visualize geometric diffraction sound paths between an obstructed emitter and the ...
Definition: AkSpatialAudioEmitter.cs:87
This class represents the list of active Unity Game Objects that are designated to be spatial audio l...
Definition: AkSpatialAudioListener.cs:56
bool isLocalizedBank
Is the bank localized (situated in the language-specific folders)
Definition: AkMemBankLoader.cs:20
static bool Unsubscribe(ulong SubscriptionID, out string Result)
Unsubscribes from a topic.
Definition: AkWaapiClient.cs:149
void EnteredRoom(AkRoom room)
Called when entering a room.
Definition: AkSpatialAudioBase.cs:25
bool drawSecondOrderReflections
This allows you to visualize second order reflection sound paths.
Definition: AkSpatialAudioEmitter.cs:81
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
The Auxiliary Bus with a Reflect plug-in Effect applied.
Definition: AkSpatialAudioEmitter.cs:10
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:20
uint diffractionMaxPaths
The maximum number of paths to the listener that the sound can take around obstacles.
Definition: AkSpatialAudioEmitter.cs:39
bool drawFirstOrderReflections
This allows you to visualize first order reflection sound paths.
Definition: AkSpatialAudioEmitter.cs:78
void UnloadBank(UnityEngine.GameObject in_gameObject)
Unloads a SoundBank
Definition: AkBank.cs:79
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:88
AK.Wwise.AuxBus reverbAuxBus
The reverb auxiliary bus.
Definition: AkRoom.cs:19
AK.Wwise.AcousticTexture AcousticTexture
All triangles of the component's mesh will be applied with this texture. The texture will change the ...
Definition: AkSurfaceReflector.cs:12
static void RemoveGeometrySet(UnityEngine.MeshFilter meshFilter)
Remove the corresponding mesh filter's geometry from Spatial Audio.
Definition: AkSurfaceReflector.cs:117
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:70
This will call AkSoundEngine.SetSwitch() whenever the selected Unity event is triggered....
Definition: AkSwitch.cs:17
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
Add this script on the game object that represent a listener. This is normally added to the Camera ob...
Definition: AkSpatialAudioListener.cs:15
System.Collections.Generic.List< int > unloadTriggerList
Reserved.
Definition: AkBank.cs:29
uint reflectionsOrder
Definition: AkSpatialAudioEmitter.cs:25
float wallOcclusion
Occlusion level modeling transmission through walls.
Definition: AkRoom.cs:27
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
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:108
string bankName
Name of the bank to load
Definition: AkMemBankLoader.cs:17
AkEnvironment[] environments
Definition: AkEnvironmentPortal.cs:22
void ExitedRoom(AkRoom room)
Called when exiting a room.
Definition: AkSpatialAudioBase.cs:35
ulong GetID()
Access the room's ID
Definition: AkRoom.cs:43
override void HandleEvent(UnityEngine.GameObject in_gameObject)
Opens the portal on trigger event
Definition: AkRoomPortal.cs:127
AkRoom AssociatedRoom
Optional room with which this surface reflector is associated. It is recommended to associate geometr...
Definition: AkSurfaceReflector.cs:26
AK.Wwise.Event roomToneEvent
Wwise Event to be posted on the room game object.
Definition: AkRoom.cs:30
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:16
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
A heuristic to stop the computation of reflections. Should be no longer (and possibly shorter for les...
Definition: AkSpatialAudioEmitter.cs:14
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:70
Obstructs/Occludes the emitter of the current game object from its listeners if at least one object i...
Definition: AkEmitterObstructionOcclusion.cs:13
uint diffractionMaxEdges
The maximum number of edges that the sound can diffract around between the emitter and the listener.
Definition: AkSpatialAudioEmitter.cs:35
bool drawHigherOrderReflections
This allows you to visualize third or higher order reflection sound paths.
Definition: AkSpatialAudioEmitter.cs:84
float roomToneAuxSend
Send level for sounds that are posted on the room game object; adds reverb to ambience and room tones...
Definition: AkRoom.cs:35
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
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
Obstructs/Occludes the spatial audio portal of the current game object from the spatial audio listene...
Definition: AkRoomPortalObstruction.cs:13
An AkRoomPortal can connect two AkRoom components together.
Definition: AkRoomPortal.cs:8
static void AddGeometrySet(AK.Wwise.AcousticTexture acousticTexture, UnityEngine.MeshFilter meshFilter, ulong roomID, bool enableDiffraction, bool enableDiffractionOnBoundaryEdges)
Sends the mesh filter's triangles and their acoustic texture to Spatial Audio
Definition: AkSurfaceReflector.cs:40
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
void SetGameObjectInRoom()
Sets the Unity Game Object within the highest priority room.
Definition: AkSpatialAudioBase.cs:44
static bool Connect(string Uri, uint Port)
Connects to a Wwise Authoring application
Definition: AkWaapiClient.cs:14
static AkAudioListener? TheSpatialAudioListener
Returns the "single" spatial audio listener.
Definition: AkSpatialAudioListener.cs:24
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
AkRoom frontRoom
These private members should not be given setters. Rooms should be set using the array,...
Definition: AkRoomPortal.cs:67
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:16
지원이 필요하신가요?
질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!
지원 페이지를 방문해 주세요
작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.
프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.
Wwise를 시작해 보세요