UPrimitiveComponent
에 연결된 AkLateReverbComponent 를 사용할 경우 Wwise Unreal 통합이 UPrimitiveComponent
의 크기와 모양에 따라 잔향 Aux Bus를 자동으로 지정하는 것을 볼 수 있습니다.
마찬가지로 Wwise Unreal 통합은 UPrimitiveComponent
를 사용하여 특정 잔향 매개 변수를 예측하고 Driving Reverb RTPCs 를 통해 이 매개 변수를 조정할 수 있습니다. 이 튜토리얼은 Global Reverb RTPC를 사용한 Aux Bus 자동 지정과 잔향 효과 매개 변수 예측을 설명해줍니다.
| 참고: |
- UPrimitiveComponent is a generic Unreal Component that has size and shape. There are many Component types that are based on UPrimitiveComponent, including collision Components, brush Components and mesh Components. See UPrimitiveComponent for more information.
- Although Reverb Parameter Estimation is a feature of the AkLateReverbComponent, the AkSpatialAudioVolume contains an AkLateReverbComponent, so it can also make use of the feature.
- The Spatial Audio 튜토리얼 준비 must be completed prior to starting this tutorial.
|
Automatic Aux Bus Assignment
It is possible to automatically associate an Aux Bus with a Spatial Audio Room. You can set up a Reverb Assignment Table in the Integration Settings, which maps different Decay values to different Aux Buses.
The Decay value of a Room is the estimation of its T60 decay (see EstimateT60Decay), which is the time (in seconds) required for the sound reverberation in a physical environment to decay by 60 dB.
The following exercise demonstrates how to use the the Reverb Assignment Table to automatically determine which Aux Busses to use for each Room.
Reverb Assignment section the Integration Settings
Before you configure the Decay keys in the table, observe the estimated Decay values for the existing reverbs in the level.
- Open the SpatialAudioTutorialMap.
- In the World Outliner, select the Interior_SmallRoom
AkSpatialAudioVolume
. Selecting Auto Assign Aux Bus sets the Aux Bus to the Default Reverb Aux Bus specified in the Project Settings because the Reverb Assignment Table is not yet set up.
- Interior_SmallRoom의 Details 패널에서 Auto Assign Aux Bus를 활성화하세요.
- Interior_LargeRoom
AkSpatialAudioVolume
에 2와 3단계를 반복해주세요.
Interior_SmallRoom과 Interior_LargeRoom에 Auto Assign Aux Bus 활성화하기
Some text information is displayed above each AkSpatialAudioVolume
in the viewport when they are selected. 또한 이 정보는 Reverb Parameter Estimation 아래의 Details 패널에서도 확인할 수 있습니다.
- In Unreal, click Edit > Project Settings, then scroll to the Wwise section and click Integration Settings.
- Expand the Reverb Assignment Map section.
Reverb Assignment section the Integration Settings
- Open the Reverb Assignment Table asset.
- In the toolbar, click Add.
- Set the Decay value of the new row to 1.0 and set the Aux Bus to SmallRoom.
- Add another row with a Decay value of 2.0 and set the Aux Bus to LargeRoom.
Any Room with a Decay value between 0.0 and 1.0 sends to the SmallRoom Aux Bus and any Room with a Decay value between 1.0 and 2.0 sends to the LargeRoom Aux Bus. Decay values above 2.0 sends to the Default Reverb Aux Bus.
다시 레벨로 돌아가면 Interior_SmallRoom과 Interior_LargeRoom에 올바른 Aux Bus 값이 지정된 것이 보입니다.
Global Reverb RTPC
Aux Bus 자동 지정과 마찬가지로 Global Reverb RTPC(전역적 잔향 RTPC)를 사용하면 Wwise를 통해 잔향 효과의 특정 매개 변수를 자동으로 설정할 수 있습니다. 이 방법으로 Decay, Predelay, HFDamping이라는 세 가지 매개 변수를 설정할 수 있습니다. Integration Settings에서 이 매개 변수를 제어할 RTPC를 설정할 수 있습니다.
The HFDamping, or high frequency damping, value is an estimation of how much high frequencies are dampened compared to low frequencies. See EstimateHFDamping for more information.
The PreDelay value is an estimation of the time in milliseconds for the first reflection to reach the listener, assuming both listener and emitter are in the center of the environment. See EstimateTimeToFirstReflection.
RTPC 구성하기
Global Reverb RTPC를 사용하기 위해서는 Wwise 프로젝트에 세 개의 RTPC를 추가해야 합니다.
- Wwise 프로젝트를 여세요.
- Click Layouts > Designer.
- Project Explorer에서 Game Syncs 탭을 클릭하세요.
- Add three new Game Parameters called Decay, PreDelay and HFDamping.
- Set the Min, Max, and Default values of the three new Game Parameters as follows:
- Decay:
- Min: 0
- Max: 10
- Default: 0
- PreDelay:
- Min: 0
- Max: 1000
- Default: 0
- HFDamping:
- Min: -1
- Max: 1
- Default: 0
- In the Project Explorer, open the Audio tab.
- Under the Master-Mixer Hierarchy, double-click SmallRoom. The SmallRoom Aux Bus Object Tab opens.
- On the Effects tab, at the right of the RoomVerb Effect row, click Edit.
- In the Effect Editor, open the RTPC tab.
- Add Reverb entries for Decay Time, Pre Delay and HF Damping.
- In the X Axis column, add Game Parameters for each entry as follows:
- Decay Time: Decay
- Pre delay: PreDelay
- HF Damping: HFDamping
- Decay 매핑을 선택하고 곡선에서 기준점을 추가하세요.
- 기준점의 X와 Y 값을 0.2로 설정하세요.
- HFDamping 매핑을 선택하고 곡선에서 기준점을 추가하세요.
- X 값을 0.0으로, Y 값을 1.0으로 설정하세요.
- 목록에서 모든 매핑을 선택하세요.
- 매핑 중 하나를 우클릭하고 Copy를 선택하세요.
- Property Editor에서 LargeRoom Aux Bus를 여세요.
- On the Effects tab, at the right of the RoomVerb Effect row, click Edit.
- In the Effect Editor, open the RTPC tab.
- 비어 있는 RTPC 목록을 우클릭하고 Paste를 선택하세요. Three RTPCs now control reverb parameters in our Wwise project. In the Unreal project, these RTPCs function as the Global Reverb RTPCs.
- In Unreal, open the Wwise Integration Settings.
- Under Reverb Assignment, expand the RTPCs subsection.
- 새로운 각 RTPC를 해당하는 Global Reverb RTPC로 지정하세요
새로운 세 개의 RTPC가 Global Reverb RTPC로 지정되었습니다
이제 Wwise에 원격 연결하고 Play In Editor(에디터에서 재생)할 수 있습니다. If you observe the RTPC curves in Wwise while triggering the sounds in the small room and the large room, you can see how the reverb parameters change.
서로 다른 공간 종류에 하나의 잔향 보조 버스 사용하기
With Global Reverb RTPCs, you can use one reverb effect for an entire level and drive the parameters dynamically for the different rooms in the level.
- Wwise 프로젝트에서 DynamicReverb라는 새로운 Aux Bus를 만드세요.
- Add a RoomVerb Effect to this Aux Bus, using the Default Effect preset.
Wwise RoomVerb Effect가 있는 DynamicReverb라는 새로운 Aux Bus를 추가하세요
- SmallRoom Aux Bus 잔향 효과로부터 DynamicReverb Aux Bus 잔향 효과로 RTPC 매핑을 복사하세요.
- In the Unreal project, clear all entries in the Reverb Assignment Table (described in Automatic Aux Bus Assignment).
- Default Reverb Aux Bus를 새로운 DynamicReverb Aux Bus로 설정하세요.
Now, if you remote connect and Play In Editor, both the Interior_SmallRoom and Interior_LargeRoom use the DynamicReverb Aux Bus, but the parameters are automatically adjusted for each room through the Global Reverb RTPCs.
커스텀 Blueprint Class로 Reverb Estimation 사용하기
The following procedure demonstrates the single Aux Bus workflow through the use of a custom Blueprint Class that represents a single room. For demonstration purposes, the room is a simple cube with walls that the player can walk through. In this exercise, you will create a double-sided material (so that you can see the interior of the room) and then create the Blueprint Class.
- Content Browser에서 WwiseAssets/SpatialAudioDemo 폴더로 이동하세요.
- SpatialAudioDemoMeshMaterial을 우클릭하고 Duplicate를 선택하세요.
- Name the new Material Instance "SpatialAudioDoubleSidedMaterial".
- 새로운 Material Instance를 여세요.
- In the Details panel under Material, select Two Sided.
- Material Instance를 저장하세요.
- Content Browser에서 Blueprints 폴더로 이동하세요.
- 폴더 안을 우클릭하고 Blueprint Class를 선택하세요.
- Actor를 Parent Class로 선택하세요.
- Name the new Blueprint "BPRoom".
- Open the new BPRoom Blueprint Class.
- On the Components panel, click Add and select the Cube component.
- Select the new Cube component and in the Details panel, under Materials, set Element 0 to SpatialAudioDoubleSidedMaterial.
- In the Components panel, select the Cube Component and add a Box Collision Component under it.
- Select the Box Collision Component and add the following Components under it:
- Ak Room
- Ak Late Reverb
- Ak Geometry Ensure that the Component hierarchy in your Blueprint Class looks like this:
- AkGeometry Component를 선택하세요.
- In the Details panel, under Geometry, ensure that the Mesh Type is set to Simple Collision.
- In the Surface Overrides section, set the AkAcousticTexture to Concrete.
- In the Components panel, select the Cube Component.
- Add a Point Light Component, which illuminates the room when the player walks inside it.
- Cube Component를 선택하세요.
- In the Details panel under Collision, set the Collision Presets to NoCollision.
- Box Component를 선택하세요.
- In the Details panel under Collision, set the Collision Presets to NoCollision. The player can now walk through the walls of the room.
- Blueprint를 컴파일 및 저장하세요.
Before you can test the new room Blueprint, add a sound to play when you change between the rooms.
- Content Browser의 Blueprints 폴더에서 MyCharacter Blueprint를 여세요.
- Components 패널에서 Capsule Component를 선택하세요.
- Add an Ak Component and name it "SpatialSound".
MyCharacter Blueprint에 Ak Component를 추가하세요
- SpatialSound Component를 선택하세요.
- In the Details panel, set the Ak Audio Event to Play_SpatialSound.
- MyCharacter Blueprint의 Event Graph를 여세요.
- Locate the Event BeginPlay node in the lower right of the Event Graph.
- Drag from the last Set Switch node and select Post Associated Ak Event (SpatialSound).
You can now place some rooms in your level.
- Drag several instances of the BPRoom Blueprint into the level.
- 공간의 크기를 서로 다르게 조정하세요.
- Change the Acoustic Texture on the AkGeometry Component in each of the rooms:
- 레벨에서 공간을 선택하세요.
- Details 패널에서 AkGeometry Component를 선택하세요.
- Change the AkAcousticTexture to a different value such as Brick, Carpet, or something else. Do this for all BPRoom instances in the level.
이제 Wwise에 원격 연결하고 Play In Editor(에디터에서 재생)할 수 있습니다. The spatial sound is triggered immediately. As you walk into the different rooms, the appropriate reverb parameters are applied to the sound.
HFDamping 계산과 Acoustic Texture
When estimating the HFDamping value, the AkLateReverbComponent
uses the AkGeometryComponent
to identify its Acoustic Textures. In the previous section, an AkLateReverbComponent
and an AkGeometryComponent
were attached to the same UPrimitiveComponent
parent (the Box Component). With this configuration, when the AkLateReverbComponent
has a sibling AkGeometryComponent
, it automatically uses that sibling AkGeometryComponent
to calculate the HFDamping. However, if the AkGeometryComponent
has a different parent, you must explicitly associate the AkGeometryComponent
with the AkLateReverbComponent
through the AssociateAkTextureSetComponent function. This section demonstrates how to do so.
- BPRoom Blueprint를 여세요.
- In the Components panel, drag the AkGeometry Component on top of the Cube Component. The AkGeometry Component is now attached to the Cube Component instead of the Box Component.
- AkGeometry Component를 선택하세요.
- In the Details panel, under Geometry, set the Mesh Type to Static Mesh.
- In the Surface Overrides section, set the AkAcousticTexture to Concrete.
- Blueprint의 Event Graph를 여세요.
- Drag a node from the execution pin of the Even BeginPlay node and select Associate Ak Texture Set Component (AkLateReverb).
- Drag the AkGeometry Component from the Components panel and release it on top of the Texture Set Component pin.
You can now remote connect to Wwise and Play In Editor to test whether the HFDamping value is updated correctly. With this configuration, you can have a Static Mesh with multiple materials, and an attached AkGeometryComponent
that maps those materials to Acoustic Textures. You can then associate this AkGeometryComponent
with an AkLateReverbComponent
to make the textures drive the HFDamping value.