버전

menu_open
Wwise SDK 2021.1.14
Using the Geometry API for Simulating Diffraction and Transmission

Introduction

The geometry passed to Wwise Spatial Audio may be used to simulate diffraction and transmission of sound. 즉, 방해(obstruction)를 계산하는 데 있어 게임 엔진의 레이캐스팅 메소드를 완전히 대체할 수 있습니다.

이미터가 오브젝트에 의해 리스너로부터 가려진 경우, Spatial Audio는 오브젝트의 모서리를 감싸 돌아오는 경로들을 계산하고, 이 경로가 존재할 경우, 모서리를 돌아 굽어지는 소리의 회절 계수를 계산합니다. 이에 따라 이미터의 명확한 입사각이 조정되고, 회절 값을 Wwise로 전송해 궁극적으로 소리에 어떤 영향을 끼칠 지 통제할 수 있게 됩니다. 회절은 주로 로우패스 필터가 됩니다.

Additionally, Spatial Audio computes sound paths going through geometry. Sound transmitting though an obstacle has a transmission loss coefficient applied to it, resulting from the surface properties assigned to the geometry via the API. Typically, transmission loss is modeled with a low-pass filter and a volume attenuation.

The image below is a screenshot of the Game Object 3D Viewer in Wwise. It shows a sound with a diffraction path, diffracting around the edges of a thin wall, and a transmission path with a transmission loss of 100%.

주의:
Geometric diffraction and transmission can be used to entirely replace your game engine's raycasting method for computing obstruction, however the performance cost grows with the complexity of the geometry. Spatial Audio로 전송된 지오메트리는 최대한 단순해야 합니다. 또한, Geometric Diffraction의 복잡한 계산을 줄이기 위해 이와 함께 효율적인 Room과 Portal 추상화 ( Rooms and Portals 참고)를 사용하는 게 좋습니다.

지오메트리 회절은 이미터와 리스너 사이 직접 소리 전달의 경로에 사용할 수 있지만, Wwise Reflect와 함께 사용해 초기 반사의 경로에도 사용할 수 있습니다.

Setting Up Geometry for Diffraction

Spatial Audio로 보낸 각 지오메트리 세트는, 회절 경로를 계산하는 데 이를 사용할 지 여부를 명시해야 합니다. 여기에는 AkGeometryParams::EnableDiffraction 플래그를 이용합니다. 이 플래그는 회절을 계산하는 데 필요한 모서리 데이터를 생성시키고, 직접 경로의 지오메트리 회절과 반사 회절에 사용됩니다.

또한, 메시의 경계 모서리가 소리를 회절시키도록 허용할 것인지 아닌지에 대해서도 결정합니다. 특정 메시에서 경계 모서리는 단 하나의 삼각형에만 연결된 모서리로 정의되기 때문에 다면의 경계선에 존재합니다. 복잡한 회절 계산일수록 모서리의 개수가 늘어나게 되므로, 자신의 메시에 소리를 회절시지 않는 경계 모서리가 있다면 이 옵션을 비활성화해야 합니다.

마지막으로, 모서리 머터리얼은 에너지를 흡수하지 않기 때문에 음향 표면에 할당된 음향적 질감은 회절에 아무런 영향을 끼치지 않는다는 점을 주의하세요. 모서리는 단순히 소리를 구부리기만 합니다.

Setting Up Geometry for Transmission

There are no additional steps required to set up geometry for sound transmission, however it may be desirable to adjust the transmission loss coefficient for various geometry types. For example, a concrete structure is likely to block almost all sound transmission, whereas geometry composed of plywood may block significantly less sound.

Each AkTriangle in the AkGeometryParams::Triangles array contains AkTriangle::surface, an index into the AkGeometryParams::Surfaces array. The AkAcousticSurface::transmissionLoss field describes how much transmission loss to apply to a sound transmitting though a triangle that references it. It is expressed as value between 0 and 1. The transmission loss is converted to a percentage and then used to evaluate the occlusion curve (assuming AkSpatialAudioInitSettings::bUseOcclusion is enabled). The final volume attenuation and filter value applied to a sound with a given transmission loss will depend on the occlusion curves defined in the Wwise Project Settings. Transmission loss may also be applied as a built-in parameter and can be mapped to an RTPC.

Geometric Diffraction of the Direct Path

Integration Demo 예제 (SDK/samples/IntegrationDemo)에서 Geometric Diffraction 데모를 통해 직접 경로의 지오메트리 회절에 사용하는 지오메트리의 예제를 자세히 살펴보실 수 있습니다. Demo Positioning > Spatial Audio: Geometry 를 확인하세요.

Setting up a Sound for Diffraction and Transmission

In the Positioning tab in the Wwise Authoring tool, ensure that Enable Diffraction and Transmission is checked. This box enables Spatial Audio features related to diffraction and transmission, including:

  • Computation of the diffracted path of the sound through geometry and/or portals, if applicable. The path calculation is performed by Spatial Audio on each game object that is currently playing a sound with diffraction and transmission enabled. 동일한 게임 오브젝트에 회절이 활성화된 사운드가 여러 개 재생중일 경우, 경로 계산은 단 한 번만 실행됩니다.
  • Computation of the transmission path of the sound, through geometry and/or between rooms. The final transmission loss coefficient is always taken as the largest transmission loss value encountered along the transmission path, whether it comes from a room's AkRoomParams::transmissionLoss or a triangle's associated AkAcousticSurface::TransmissionLoss.
  • Generation of virtual positions for diffraction paths, which are sent to the Sound Engine for rendering the sound, assuming Spatial Audio's initialization setting AkSpatialAudioInitSettings::bCalcEmitterVirtualPosition is set.
  • Application of the obstruction curve according to the diffraction coefficient, assuming Spatial Audio's initialization setting AkSpatialAudioInitSettings::bUseObstruction is set. 게임에서도 AK::SoundEngine::SetObjectObstructionAndOcclusion 를 이용해 방해 값을 설정해놓은 경우, 둘 중 더 큰 값이 사용됩니다.
  • Application of the occlusion curve according to the transmission loss coefficient, assuming Spatial Audio's initialization setting AkSpatialAudioInitSettings::bUseOcclusion is set. In the case that the game has also set an occlusion value via AK::SoundEngine::SetObjectObstructionAndOcclusion, the maximum of the two values is used.

Direct Path Diffraction and Transmission in Wwise

Diffraction and transmission may be observed in the Game Object 3D Viewer, provided the proper profiling settings and view options are set (see the following images).

이미터에서 리스너로의 경로에 대해 계산된 회절 인자는 각 회절 모서리에 대해 표시됩니다. This diffraction factor is conveyed to Wwise via either the Built-In Game Parameter called Diffraction or via the emitter's Obstruction value, if AkSpatialAudioInitSettings::bUseObstruction is enabled. Built-in Game Parameter values may be profiled by adding the bound Game Parameter to the Game Sync Monitor, and Obstruction and Diffraction may be profiled in the Profiler's Obs/Occ tab.

The calculated transmission loss factor is displayed beside the corresponding transmission path in the Game Object 3D Viewer. If the source of the transmission loss is from geometry, a hit point is indicated, with the accompanying transmission loss percentage. If the source of the transmission loss is from a room, the transmission loss percentage is displayed with the text "(Room)" appended below.

Portal에서와 같이, Diffraction 값은 리스너에서 이미터가 직접적으로 보이는 곳에 있을 경우 0을 기준으로, 이미터가 음영 영역(shadow zone)으로 들어감에 따라 증가합니다 ( Diffraction (회절) 참고). Built-in Diffraction Game Parameter vs. Obstruction에 대한 논의 및 음영 영역에 대한 더 자세한 내용은 Room과 Portal의 Diffraction 을 참고하세요.

Direct Path Diffraction Interaction with Spatial Audio Rooms and Portals

Spatial Audio Room과 Portal (Rooms and Portals)에서, Portal은 인접한 공간 내 직접음의 회절을 모델링하기도 합니다. 리스너와 다른 공간에 있는 이미터에는 지오메트리에 따른 회절 경로가 없다는 점에서 두 시스템은 서로를 보완합니다. Room과 Portal이 지오메트리보다 훨씬 더 효율적으로 계산할 수 있기 때문에, 복잡한 계산을 줄이기 위해 이 두 시스템을 함께 사용하는 것이 좋습니다.

Geometric Diffraction of Early Reflections

위에서 언급한 것과 같이, 초기 반사는 모서리에서 회절될 수 있으며, Spatial Audio는 이미터가 Wwise Reflect로 라우팅될 때 이 현상을 모델링할 수 있습니다.

자세한 방법을 설명하기에 앞서, 가시 영역 (view zone) 회절의 정의에 대해 살펴보겠습니다.

아래 그림을 보세요. 이미터는 리스너가 바로 보이는 곳에 있지만, 리스너가 정반사되지는 않습니다. 즉, 리스너는 가시 영역 (view zone) 안에 있습니다. Diffraction (회절) 에서 설명했듯, 회절은 가시 영역에서도 발생합니다. 그러나 Wwise Spatial Audio에서는, 직접 경로 모델의 Geometric Diffraction이나 Room과 Portal 둘 중 어느것도 가시 영역의 회절을 고려하지 않습니다. 실제 직접 경로에 비해 매우 미미하기 때문입니다. 그러나 반사의 경우 가시 영역 회절이 매우 큰 영향을 끼칩니다. 회절 없는 경우, 초기 반사는 순전히 정반사 영역에서만 들립니다. 리스너가 가시 영역으로 들어오는 순간 반사는 사라집니다. 회절이 있는 경우, 모서리가 관여해 반사된 곡선을 회절시킵니다. Thus, the listener perceives the reflection, albeit with additional filtering and attenuation as they go around and away from the reflection zone.

반사 영역 안에서, 회절된 경로가 없으면 대신 정반사가 있다고 가정하고 아무런 회절 값도 계산되지 않습니다. 반사 영역과 가시 영역 사이 경계의 모서리에 대해 계산된 가시 영역 회절은 0이며, 가시 영역과 음영 영역 사이 경계의 모서리에서는 회절이 100가 됩니다.

높은 차순의 초기 반사에서는 가시 영역 회절과 음영 영역 회절 모두 작용합니다.

Enable Reflections on Applicable Sounds

Wwise Authorign Tool에서, 반사를 필요로 하는 모든 사운드에 대해 Wwise Reflect가 있는 보조 버스로 원하는 초기 반사를 전송합니다. 더 자세한 내용은 Wwise project setup 을 참고하세요. 반사의 회절에 대해서는, 해당 지오메트리에 회절을 활성화시키는 것 외에 특별히 설정할 것은 없습니다.

Settings in Wwise Reflect

회절 효과에 의한 반사는 Wwise Reflect에서 허음원 (image source)으로 나타납니다. 반사에서의 회절 효과는, 회절의 Diffraction Attenuation (회절 감쇠), Diffraction LPF (회절 저역 통과 필터), Diffraction HPF (회절 고역 통과 필터)에 따른 세 곡선으로 디자인할 수 있습니다. 더 자세한 내용은 Wwise Reflect 문서를 참고하세요.

Combining the Geometric APIs with Rooms and Portals

Rooms and portals in Wwise Spatial Audio work in conjunction with the geometric APIs for reflection and diffraction. Rooms and Portals 네트워크는 주변 지오메트리의 고위 개념(또는 자세한 버전의 하위 개념)이라고 보면 됩니다. 잘만 다루면 Rooms and Portals와 레벨 지오메트리의 조합은 매우 섬세하면서도 효율적인 음향 시뮬레이션을 이끌어낼 수 있습니다.

Geometric Diffraction Through Portals

이미터가 리스너와 같은 공간에 있지 않은 경우 (이 때 이미터는 지오메트리 회절이 올바르게 설정된 사운드를 재생한다고 가정. Setting up a Sound for Diffraction and Transmission 를 참고), 지오메트리 경로는 다음과 같이 계산됩니다.

  • 이미터로부터 리스너까지의 소리 전달 경로는 Rooms and Portals 네트워크를 이용해 계산됩니다.
  • 각 경로에 대해, 이미터와 그 이미터에서 가장 가까운 포털 간 경로의 구간은 포털이 리스너라고 간주하여 지오메트리 회절 알고리즘을 이용해 계산됩니다. 이미터가 리스너에서 봤을 때 한 포털 바로 뒤에 있지 않는 한, 지오메트리 경로는 단 하나만 계산됩니다 (가장 짧은 구간). 이미터와 포털 간 추가 경로를 계산해도 고유 가상 위치를 만들지는 않으므로 별도의 계산이 필요하지 않습니다.
  • 두 포털 사이에 서로 직접적으로 보이는 선이 없을 경우, 이 둘의 경로 구간 역시 지오메트리 회절을 이용해 계산됩니다. 이 계산은 지오메트리나 포털이 씬에 추가되거나 제거될 때마다 실행되며, 필요시 재사용됩니다. 대부분의 경우, 두 포털 간 경로 중 가장 짧은 경로만 사용됩니다. 포털 중 하나의 바로 뒤에 리스너가 있는 예외적인 경우, 복수의 경로를 사용해 포털을 통과하는 리스너 전환의 불연속성을 방지합니다.
  • 각 경로에 대해, 리스너와 그 리스너에서 가장 가까운 포털 간 경로의 구간은 포털이 이미터라고 간주하여 지오메트리 회절 알고리즘을 이용해 계산됩니다.
  • 이에 따른 경로는 그 위 경로의 조합으로 간주되어 필요한 곳에 갈라지거나 연장된 경로를 만들어냅니다.

Reflections Through Portals

포털의 열린 부분을 교차하는 면이 최대 두 개까지 있어도 반사가 포털을 통과할 수 있습니다. 포털 자체가 음향의 열린 부분을 뜻하기 때문에 사운드가 통과하도록 지오메트리에 굳이 '구멍을 뚫지' 않아도 됩니다. 만약 그래야한다면 삼각형의 개수가 너무 많아질 것입니다. 지오메트리가 상자 형태로 묘사되는 공간을 예로 생각해봅시다. 상자의 각 여섯 면에 두 개의 삼각형이 있다고 가정합시다. 상자 밖에서 소리를 전달하도록 만들려면, 간단히 포털 하나를 추가해 해당 포털의 z 축을 따라 있는 벽 하나를 교차시키면 됩니다. 항상 그렇듯, 게임은 AK::SpatialAudio::SetGameObjectInRoom 를 사용해 어느 게임 오브젝트가 공간 안에 있으며 어느 것은 밖에 있는지 구분하는 역할을 합니다 ( Rooms and Portals Overview 참고). 이미터가 리스너와 같은 공간에 있지 않으며 사운드가 소리 전달 네트워크 상에서 닿을 수 있는 한, 반사 시뮬레이션이 실행됩니다 (이 때 이미터는 반사가 올바르게 설정된 사운드를 재생함. Wwise project setup 참고). 반사는 다음과 같이 계산됩니다.

  • 이미터와 그 이미터의 공간에 연결된 각 포털 사이에서 반사가 계산되며, 이 때 포털은 리스너로 간주됩니다.
  • 포털과 리스너 사이 회절 경로는 Geometric Diffraction Through Portals 에 나와있는 대로 계산되며 포털과 이미터 사이 반사 경로에 추가됩니다.
  • 회절 경로가 100% 회절을 초과하면 반사 계산이 처리되지 않으며 어느 지점에서건 발생하는 곳에서 해당 계산이 버려집니다.

Tips for Orienting Portals Between Rooms with Geometry

The following image shows an example of a correctly oriented portal.

  • Geometry cut-outs allow reflection and diffraction paths to pass through the portal.
  • A rectangular opening is subtracted from up to two planes overlapped by the portal. A single plane is defined by one or more coplanar triangles, passed to the Spatial Audio Geometry API.
  • Geometry cut-outs are drawn in the Game Object 3D Viewer with a dark green outline.
  • For correct cut-out detection, the two planes must be non-intersecting (but not necessarily parallel), and they both must span the entire width (X) and height (Y) of the portal.
  • A gap is permitted between the two planes, as well as between the two rooms joined by the portal. However, a game object is only permitted to enter a portal if it was previously in one of the adjoining rooms.
  • When a game object is transitioning through a portal, the room containment result passed to AK::SpatialAudio::SetGameObjectInRoom is used only as a hint. The exact room is determined by projecting the game object's position onto the portal's Z-axis, and then testing if the game object is in the front-half or back-half of the portal, corresponding to the front and back rooms respectively.
  • The portal does not need to be perfectly aligned and centered between the two rooms.
  • The middle of the portal is always the transition point between the two rooms.
  • Ensure that a portal is deep enough along the Z-axis to allow for a smooth transition between two rooms.
  • Abrupt transitions between two rooms can often be resolved by lengthening the portal along the Z-axis.

Tagging Geometry for Specific Rooms.

레이와 삼각형 간 교차 검사와 반사를 생성할 수 있는 표면의 검색 공간을 제한하는 최적화를 위해 지오메트리를 특정 공간에 수동으로 할당할 수 있습니다. 그러려면 AkGeometryParams::RoomID 를 특정 공간의 ID에 설정하세요. 이는 Spatial Audio에게 해당 공간 안의 지오메트리가 다른 공간에서 포털을 통해서만 보이고 직접적으로는 보이지 않는다는 것을 알려줍니다. 단일 지오메트리 세트는 오직 하나의 공간 ID와 연관될 수 있으므로, AkGeometryParams::RoomID 를 유효하지 않게 두지 않는 한, 하나의 공간은 다수의 공간에서 보이는 지오메트리를 가질 수 없습니다. 또한 어떤 지오메트리 세트든 특정 공간 ID와 연관돼있다면 이 공간에서는 여기에 명시적으로 연관돼있지 않은 지오메트리를 더 이상 볼 수 없습니다. 한 지오메트리 세트를 공간에 할당한 이후에는 Spatial Audio가 이 공간 안에서 일어나는 반사와 회절을 시뮬레이션할 때 특별히 이 공간 ID와 연관돼있는 지오메트리만 사용합니다.


이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요