Event-Based Packaging Process Overview

게임 오디오 / Wwise에 대한 팁과 도구

What is Event-Based Packaging?

Not long ago, the UE4 Integration of Wwise 2019.2 launched a new asset management workflow called Event-Based Packaging, or EBP for short. Compared with the traditional SoundBanks workflow, this new pipeline is characterized by event packaging, that is, the resources of each event are packaged into an individual SoundBank.

Why would you want to do this? The reason is that in Wwise's traditional pipeline, the user is left to decide how to organize SoundBanks. In larger projects, this organization often takes a lot of time. And because it is manually organized and managed, redundancy is almost inevitable when loading resources. In the new EBP workflow, the resources corresponding to each event are automatically packaged into a SoundBank and stored in the .uasset of the event. When the event is called, only the corresponding media resources are loaded, effectively only loading as many resources as needed. This also means that the occurrence of resource redundancy is fundamentally eliminated. And since each SoundBank only contains the resources of one event, they can be flexibly unloaded without worrying about other events losing access to a resource.

This article will introduce some key resources used in the EBP workflow and their loading process, helping everyone better understand the new pipeline.

EBP and WAAPI

To make automatic packaging based on events in UE4 work, it is necessary to obtain the Event and the corresponding relationship between the Event and the sound media. In this process, the EBP pipeline is dependent on WAAPI. WAAPI means Wwise Authoring API, which is an API that allows external applications to communicate with the Wwise Authoring tool. Users can control the Wwise Authoring tool by calling these APIs, so WAAPI can also be understood as a bridge between the UE4 project and the Wwise project.

When you create an Event in the Wwise authoring tool, the UE4 integration will automatically create the corresponding event.uasset after receiving the operation instruction through the registered callback function. Similarly, when the user clicks the Generate Sound Data button in the WAAPI Picker panel in UE4, the Generate SoundBanks operation will be executed in the Wwise Authoring tool. In the EPB workflow, WAAPI is used to ensure that UE4 and the Wwise project are always synchronized.

Connecting Wwise through WAAPI to generate SoundBanks is the preferred but not the only way to generate Sound Data. If you cannot use WAAPI to connect to the Wwise Authoring tool, you can click the Generate Sound Data button in the Wwise Picker window to start the generation process using Wwise Console. The generation speed is slower compared to WAAPI because it uses more system I/O calls, but the resulting assets are the same. You can also reach the Generate Sound Data dialog in Unreal's Build menu in the Audiokinetic section.

Wwise resources in UE4

In the sound development process, users can use the Event, State, Switch, RTPC, Bank, Auxiliary Bus, and Media resources in Wwise to construct and weave the sound world in the project. In UE4, these resources all exist in the form of .uasset and are stored in the Content/WwiseAudio/ folder by default. The location of the project’s Wwise resources can be configured in the Wwise Integration Settings section of the UE4 Project Settings, by modifying the “Wwise Sound Data Folder” setting.

The following table lists the corresponding classes of Wwise resources and where they are stored in the UE4:

TYPE CLASS PATH
Bank UAkAudioBank Content/
RTPC UAkRtpc Content/WwiseAudio/Game_Parameters/
State UAkStateValue Content/WwiseAudio/States/
Switch UAkSwitchValue Content/WwiseAudio/Switches/
Event UAkAudioEvent Content/WwiseAudio/Events/
InitBank UAkInitBank Content/WwiseAudio/
Auxiliary Bus UAkAuxBus Content/WwiseAudio/Master-Mixer_Hierarchy/
AcousticTexture UAkAcousticTexture Content/WwiseAudio/Virtual_Acoustics/
Media UAkMediaAsset Content/WwiseAudio/Media/
ExternalSource UAkExternalMediaAsset Content/WwiseAudio/ExternalSources/
Localized UAkLocalizedMediaAsset Content/WwiseAudio/Localized/

 

Wwise

Derived from the above resources, these derived classes need to be reserialized to turn themselves into objects. Deserialization refers to the process of converting a byte stream into an object in memory. The following figure is a class diagram of all Wwise resources. You can see the derivation of all resources:

In the game, developers can load these through resource references and C++ code. For objects dragged and dropped in the scene or resources referenced through the Component property, when the Component object is instantiated, the Wwise resources in it will also be loaded. In addition, these resources can also be loaded by calling the LoadObject() function in the UE4.

In the editor, the task of loading resources derived from the UAKAudioType class is completed by the AkAssetDatabase class, and its constructor will register the three events onAssetAdded, onAssetRemoved, and onAssetRenamed. Among them, onAssetAdded is responsible for handling the loading of all resources. In fact, when you open the UE4 engine editor, all Wwise resources for the current map are loaded.

The loading of a media.uasset is carried out with the instantiation of an event.uasset. We will discuss in detail the loading process in a later section. Next, let’s take a look at the two most important resources, which are events.uasset and media.uasset.

Event-Based Packaging Process Overview

The resources that users interact with the most are the various events in the game. There is a one-to-one relationship between events in the Wwise Authoring tool and event.uasset resources in the UE4 project. Events are used to perform actions such as playing, pausing, setting a Switch or a State. In EBP, each event.uasset contains an Event’s content for all platforms defined in the Wwise project. The key information is the SoundBank and media resource paths that the Event depends on. There is only Event and Structure data in the SoundBanks, not the media resource itself, so the event.uasset file size is only a few KB. The media resource path is the basis for finding and loading media resources.

The content of media.uasset

Different Events sometimes refer to the same audio file. This is very common, but it can lead to resource redundancy. In order to implement the sharing of sound files between event.uasset, all the media are stripped from SoundBanks and are stored separately in the Content\WwiseAudio\Media\ folder by default. According to the organization method used in the Wwise Authoring tool, each Audio Source that the Event depends on corresponds to a media.uasset file. As described for event.uasset, media.uasset files include the contents for all platforms in one file. When the user adds a new platform, the file size of media.uasset will increase as that platform’s media is added to the file.

Media resources are named by ID. If you want to find the corresponding MediaName, you can browse Content\WwiseAudio\Media in UE4's Content Browser and display it in Columns.

The loading process of Wwise resources

Now that we understand the contents of the two most important resources, event.uasset and media.uasset, let’s take a look at the steps taken to load them. Since SoundBanks and media have been stored separately, when loading resources, you need to load the SoundBank first, and then load the media it references.

Loading the Soundbank 

When using Wwise, the SoundBank that the event depends on must be loaded before PostEvent is called, and the same is true in EBP. During the loading process of event.uasset, the SoundBank will be automatically loaded, that is, all Event and Structure will be loaded. One thing to note is that in EBP, when the event.uasset is instantiated, the SoundBank has already been loaded into the memory, which means that the loaded SoundBank is in UE4’s reserved memory, not the memory reserved by Wwise. The Sound Engine will receive the memory address as an argument to the AK::SoundEngine::LoadBankMemoryView() function that loads the SoundBank.

Loading the required Media

Once SoundBank loading is complete, the media.uasset will also be loaded. This step consists of loading the media through the media resource path saved in the event.uasset. Therefore, it is located in UE4’s reserved memory like the SoundBank.

The EBP pipeline does not use PrepareEvent to load media. Instead, it provides the memory location of the media resource to the SoundEngine through the SetMedia() function. Each media.uasset will only be instantiated once, so there is no need to worry about data being loaded redundantly. 

Summary

This article briefly introduced the main resources used in the EBP asset management workflow and their loading process, hoping to help readers understand the organization of this pipeline. Being relatively new, the EBP pipeline will be updated and improved upon in subsequent releases, and hence, the contents of this article may be subject to change. Nevertheless, I believe that the automated management of SoundBanks can save considerable time and cost for the game audio development process. It is expected to become more mature and stable in the near future, bringing benefits to more game development teams.

Fan Runpeng

Field Engineer - Greater China • R&D

Audiokinetic

Fan Runpeng

Field Engineer - Greater China • R&D

Audiokinetic

A passionate advocate for topnotch middlewares and optimized workflow, who also strives to provide solutions that are feasible. At the same time, he is a field engineer who is obsessed with cooking, and loves to see technologies being shared the same way as delicacies.

댓글

댓글 달기

이메일 주소는 공개되지 않습니다.

다른 글

예산 규모가 큰 게임을 작업할 때 미들웨어를 사용하는 것이 왜 중요할까요?

이 글은 고예산 게임을 제작할 때 제가 생각한 Wwise 사용의 장점을 간략하게 설명하고 있습니다. 먼저 프로젝트에서 오디오 미들웨어 사용의 장점을 요약해볼까요. 프로젝트...

18.6.2019 - 작성자: 새미 엘리아 콜롬바노 (Samy Elia Colombano)

Wwise / Unreal Engine 4 / Unity 3D를 사용해 발자국 소리의 표면 관리하기

사전 제작의 초기 단계에서 사운드 디자이너는 많은 시스템을 프로토타입화해야 하는데, 이를 도와줄 오디오 프로그래머가 없는 경우도 있죠. 다행히도 Wwise는 Unreal...

17.7.2019 - 작성자: 세바스티앙 겔라르 (Sébastien Gaillard)

ABZÛ - 도전! 물고기 10,000 마리의 게임 오디오 만들기

이 이미지를 가장 처음 봤을 때 여러분은 어떤 생각이 먼저 드나요? 저는 어떻게 하면 이 월드에 현실적이고 진짜 같은 사운드를 만들 수 있는지, 그리고 이 장면의 중심으로 헤엄을...

30.7.2019 - 작성자: 스티브 그린 (Steve Green)

Mastering Suite(마스터링 스위트)의 비하인드 스토리: 게임 내 오디오 마스터링

Mastering Suite 는 게임 산업의 크리에이티브와 엔지니어들이 일련의 협력을 통해 얻은 결과입니다. 수년간 PlayStation은 게임 오디오 개발자 커뮤니티와 협력하여...

23.7.2020 - 작성자: 단젤리 솀브리 (DANJELI SCHEMBRI )

Wwise를 사용하여 보다 복잡한 MIDI로 제어되는 샘플 악기만들기

MIDI 기반 음악으로 되돌아가는 데에 관심이 있는 사람들은, PS4의 내장 신디사이저를 이용할 수 없으며(존재하지 않음) PC 사운드카드의 GENERAL MIDI에 의존할 수도...

28.7.2020 - 작성자: 다니엘 벡 (DANIEL BECK)

Wwise 2021.1 새롭게 제공되는 것들 | Beta

내년 초에 Wwise 2021.1을 출시 할 예정이며, 공식 출시에 앞서 Wwise 2021.1 베타를 손에 넣게되어 기쁩니다. 다음은 사용 가능한 기능에 대한 요약입니다....

18.12.2020 - 작성자: Audiokinetic

다른 글

예산 규모가 큰 게임을 작업할 때 미들웨어를 사용하는 것이 왜 중요할까요?

이 글은 고예산 게임을 제작할 때 제가 생각한 Wwise 사용의 장점을 간략하게 설명하고 있습니다. 먼저 프로젝트에서 오디오 미들웨어 사용의 장점을 요약해볼까요. 프로젝트...

Wwise / Unreal Engine 4 / Unity 3D를 사용해 발자국 소리의 표면 관리하기

사전 제작의 초기 단계에서 사운드 디자이너는 많은 시스템을 프로토타입화해야 하는데, 이를 도와줄 오디오 프로그래머가 없는 경우도 있죠. 다행히도 Wwise는 Unreal...

ABZÛ - 도전! 물고기 10,000 마리의 게임 오디오 만들기

이 이미지를 가장 처음 봤을 때 여러분은 어떤 생각이 먼저 드나요? 저는 어떻게 하면 이 월드에 현실적이고 진짜 같은 사운드를 만들 수 있는지, 그리고 이 장면의 중심으로 헤엄을...