버전

menu_open
Wwise SDK 2023.1.3
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 참고)를 사용하는 게 좋습니다.

Geometric diffraction can be used to affect the direct sound propagation path between the emitter and listener, but also the path of its early reflections, when used in conjunction with 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 a value between 0 and 1. The transmission loss is converted to a percentage and then used to evaluate Wwise curves. The final volume attenuation and filter value applied to a sound with a given transmission loss will depend on the curves defined in the project. By default, the project occlusion curve is used. Custom transmission curves can be created in the Attenuation ShareSet added to the sound. Transmission loss may also be applied as a built-in parameter and can be mapped to an RTPC.

Geometric Diffraction of the Direct Path

Refer to the Geometric Diffraction demo and its code in the Integration Demo 예제 (in SDK/samples/IntegrationDemo) for an example of using geometry for the purpose of geometric diffraction of the direct path. Look for Spatial Audio Demos > Geometry Demo.

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 curves according to the diffraction coefficient and the transmission loss coefficient.

By default, the project obstruction curves are used for diffraction and the project occlusion curves are used for transmission. If the game has also set an obstruction or occlusion value via AK::SoundEngine::SetObjectObstructionAndOcclusion, the values will be added.

Custom curves for diffraction and transmission can be created by adding an Attenuation ShareSet to the sound. Use the Attenuation Editor to create custom curves on Volume, LPF and HPF and fine-tune them while monitoring. For more information, refer to the Applying Attenuation section of the Wwise Help.

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).

이미터에서 리스너로의 경로에 대해 계산된 회절 인자는 각 회절 모서리에 대해 표시됩니다. 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 (회절) 참고). Also, please refer to Rooms and Portals' Diffraction for more details on shadow zone diffraction and for a discussion about using curves versus the Built-in Diffraction Game Parameter.

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

Refer to the Reflect Diffraction demo and its code in the Integration Demo 예제 (in SDK/samples/IntegrationDemo) for an example of using geometry for the purpose of geometric diffraction of Early Reflections. Look for Spatial Audio Demos > Reflect Demo.

As was noted above, early reflections may diffract off of edges, and Spatial Audio supports modeling this phenomenon when emitters are routed to 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.

In the reflection zone, there is no diffracted path and, therefore, no diffraction value is calculated, because the specular reflection is assumed to take over. 반사 영역과 가시 영역 사이 경계의 모서리에 대해 계산된 가시 영역 회절은 0이며, 가시 영역과 음영 영역 사이 경계의 모서리에서는 회절이 100가 됩니다.

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

Enable Reflections on Applicable Sounds

In the Wwise Authoring Tool, set the desired early reflections send to an aux bus containing Reflect for all sounds requiring reflections. 더 자세한 내용은 Wwise project setup 을 참고하세요. 반사의 회절에 대해서는, 해당 지오메트리에 회절을 활성화시키는 것 외에 특별히 설정할 것은 없습니다.

Settings in Reflect

Reflections that undergo diffraction effects will appear as image sources in Reflect. 반사에서의 회절 효과는, 회절의 Diffraction Attenuation (회절 감쇠), Diffraction LPF (회절 저역 통과 필터), Diffraction HPF (회절 고역 통과 필터)에 따른 세 곡선으로 디자인할 수 있습니다. See Reflect's documentation for more details.

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

Reflections can pass through portals and can reflect off of walls on either or both sides of the portal. Reflections can pass through more than one portal, possibly reflecting on surfaces between them if the reflection order is high enough (refer to AkSpatialAudioInitSettings::uMaxReflectionOrder). To ensure smooth reflections through portals, we recommend that you set AkSpatialAudioInitSettings::uDiffractionOnReflectionsOrder to at least 2, but be aware that increasing this setting also increases CPU usage.

Because the portal itself describes an acoustic opening, it is not necessary to also "cut holes" in the triangle geometry to allow a sound to pass through, which would greatly increase the number of triangles. A portal box represents negative space, so remember that any geometry that intersects a portal is effectively ignored, for example in a room where the geometry is described by a box, with two triangles for each of the six sides. To ensure that sound can propagate outside the box, add a portal that intersects one of the walls along the portal's z-axis.

주의:
For reflections to be accurately calculated on each side of a portal, set AkGeometryInstanceParams::RoomID to an invalid AkRoomID. Unlike diffraction, reflection paths through portals are not calculated independently for each room and then later combined. Instead, reflections are calculated exactly as if the emitter and listener were in the same room, and the portal is treated as a hole in the geometry.

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 any geometry overlapped by the portal.
  • Geometry cut-outs are drawn in the Game Object 3D Viewer with a dark green outline.
  • For correct cut-out detection, the planes intersected by the portal 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 transition point between two rooms is the center of the cut-out. When there is a gap between the two planes, the transition point is the center of the area between the two cut-outs.

  • 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 (Diffraction Only).

주의:
AkGeometryInstanceParams::RoomID is deprecated and the parameter will be removed in a future version. We recommend that you do not use RoomID, and instead leave it set to the default value (-1).

As an optimization, assign AkGeometryInstanceParams::RoomID if all of the following conditions apply:

  • Geometry is physically located in one room exclusively.
  • Portals are used primarily for diffraction and sound propagation of reverb.
  • Having accurate reflections pass through portals is not required.
  • The Room referenced by AkGeometryInstanceParams::RoomID is not a Reverb Zone, nor is it a parent room of a Reverb Zone. In this case, AkGeometryInstanceParams::RoomID is ignored. For more information about Reverb Zones, refer to Using Reverb Zones.

To limit the search space for ray-triangle intersection tests, you can manually assign geometry to specific rooms. To do so, set AkGeometryInstanceParams::RoomID to the ID of a particular room. This indicates to Spatial Audio that the Geometry Instance in that room is only visible from other rooms through portals and not directly. Because a single Geometry Instance can only be associated with one room ID, a room cannot have geometry that is visible in multiple rooms unless AkGeometryInstanceParams::RoomID is invalid. Also note that if any geometry set is associated with a particular room ID, then that room can no longer "see" geometry that is not explicitly associated with that room. After you assign a Geometry Instance to a room, Spatial Audio only looks for geometry that is specifically associated with that room ID when it simulates reflection and diffraction in that room.


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

지원이 필요하신가요?

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

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

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

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

Wwise를 시작해 보세요