Audiokinetic 업무가 한국 표준시 2019년 12월 24일 오전 5시부터 휴무에 들어가 2020년 1월 3일 오후 11시에 재개됩니다 (동부 표준시 2019년 12월 23일 오후 3시 ~ 2020년 1월 3일 오전 9시). 더 자세히 보기.

Audio Tools and Experiments in UE4, using Wwise: A Spline Based Audio Emitter / Volumetric Audio Emitter For Custom Shapes

사운드 디자인 / Wwise에 대한 팁과 도구

 

Hello people! This is the first entry in a series of small blog posts about audio tools, experiments, and fun using Unreal Engine 4 in combination with Wwise. Hopefully they can get us all thinking and talking, and in the end become better developers. I really want to just share stuff with the community and I’d LOVE to hear you folks' opinions on the topics that we touch upon. As this is the very first entry from my series, I find it appropriate to very briefly introduce myself. My name is Troels, and I’m what you would probably refer to as a technical sound designer, and I am also composer.

Over the last year and a half, I’ve spent countless evenings and weekends learning Unreal Engine 4, making game prototypes, and working on very non-commercial projects, and I just can’t stop! Now, I also started picking up Unreal Blueprint in my professional work and some of the things that I have learnt have been related to audio tools, which (among other things) made we want to write this blog. So here I am!

Now let’s unveil the first topic! I present to you...

The Spline Based Audio Emitter, probably better known as a Volumetric Audio Emitter.

My colleague and I started creating this tool because we couldn’t find an existing tool or solution for creating custom audio emitting area shapes in UE4.

 

Spline

What is it useful for?

The tool makes it easy to block out large, non-cubic, boxy, or spheric areas in UE4, inside or outside of which you’d like to add audio, such as a forest or swamp area. Please note, a simple shape version can easily be derived from the Spline based version and already exists.

Why would anyone use this?

Because you can make your ambience sounds fade in / out the closer you get to an area shape that you have defined, and so you aren’t tied to using basic shapes only. It can save lots of time, especially when prototyping and when the level / environment is changing rapidly. Additionally, if you have an encapsulated area with entrances, and the AkComponent has occlusion enabled, it will also make the inside / outside ambience play through the entrance without playing through the walls, so more convincing. Also, it only uses one emitter, and this can potentially keep your voice count down as well. Here’s a video on how it works. Note that this video is a very brief overview of its core functionality. Additional functionality not covered: inside / outside States, follow player height, and area fade distance RTPC for use with 2D or 3D sounds with user-defined position source.

 

What it does:

  • The Spline Based Emitter uses a closed spline loop. It locates the point on the spline curve closest to the player and places an audio emitter at that point. The audio emitter location is updated continuously.
  • The Spline Based Emitter has two states: Outside State and Inside State. When the player moves into the closed loop, the State changes to Inside and from that point the audio emitter location is now set to follow the listener as well as its orientation. The moment the player moves outside the spline loop, then State changes to Outside and the location of the audio emitter is once again “attached” to the spline curve and is continuously set to be positioned at the point (on the curve) closest to the player.

How it works:

To get an understanding of how the tool works, you could go through the Blueprint in UE4 - it’s thoroughly documented. Note that the tool also has several publicly exposed variables that makes it a bit more versatile. You can download it here.

The two main ingredients / node functions this tool relies on are:

  • Get closest point on spline curve (for emitter location).
  • Dot product (for knowing if we're inside or outside our closed spline loop).

 

How to use it:

  • Place the Blueprint in your scene and create the shape you need. Personally, I prefer to change to Top view during this process.
  • In the exposed variables in the details panel, add your sound and inform the Blueprint what RTPC you use for Area Fade.

You need to be aware of two points that might break the tool:

  • V / concave shapes can be troublesome if the emitter attenuation is too long. I really want to come up with a solution to this issue. If you make a concave shape and locate the listener in the center between the two sides (as seen in the image below), you’ll end up with the emitter immediately jumping from one side to the other when the player moves across or within in the V shape.
  • Make sure not to make any points in the spline loop cross one another. The relationship between the spline points’ rotation is essential for the Inside / Outside State to work.

 

Image 2 ConcaveNotGood

Optimization:

Since I expect the CPU time for this Blueprint to be considerably longer compared to the already existing ambience shapes / tools, we added a little optimization to it. When the player / listener gets X distance away from the closest point on the spline curve the tick rate of the Blueprint is drastically reduced.

Troels Nygaard

Technical Sound Designer and Composer

Investigate North

Troels Nygaard

Technical Sound Designer and Composer

Investigate North

Troels Nygaard is a technical sound designer and composer with a BA in Sound Design (2014) and a MSc in game design with focus on audio integration and user experience (2016). Additionally, Troels is a Wwise Certified Instructor, and music producer.

nordictones.com

댓글

JungKun Park

August 02, 2018 at 02:38 am

That's Cool! I'm just sparking my curiosity about knowing if the listener is inside or outside. Could you tell me more how to work it?

Benjamin Von Cramon

May 11, 2019 at 01:48 pm

Sorry if I'm not following protocols here, but I'm new to WWise, found my way in while searching for a spline-based volumetric audio emitter, thought I'd ask here how to kick it into second gear. I have WWise installed and BP shows up in my project, drug bp_ac_AkVolumetricStaticMesh to the Canvas, read here how I'm to create a spline shape, but see no instructions how to do that. The GUI appears to be the Viewport tab within the Blueprint, so now what? Thanks for throwing a newb a bone. Benjy

Parag Oswal

August 02, 2018 at 02:40 am

Nice One!!!!

Troels Nygaard

August 02, 2018 at 02:49 pm

Hi Jungkun, yes! :) Though I'd suggest you had a look at the BP itself. You can download it from the article. Inside is determined by the value of a Dot product function (it's a node function in UE4 BP) The Dot Product takes the relationship between to vectors (Player and Spline point's right (y) vector) and returns a number between -1 and 1. 1 means left of the point and therefore inside and -1 means on the right side of the spline point's right vector and therefore outside. 0 would be exactly on top of each other. Please don't ask me about the details on how it's calculated, I'm not that good at the math ! :0)

Zac S

August 02, 2018 at 04:12 pm

What version is this being implemented in?

Troels Nygaard

August 06, 2018 at 07:49 am

We've been using this tool in both UE4.18, 19. The initial tool was created in UE4.18. The BP and content was migrated from 4.19.1. It won't work OOB, you'll have to replace some cast nodes and character references to fit with your game :) Don't worry, it will complain until all of that has been fixed and it's pretty straight forward

Hannah Lee

August 06, 2018 at 09:19 pm

This was extremely helpful! Thank you. :) I've checked out the uploaded BP and it was quite easy to understand too, thanks to the detailed comments. I do have one question though.. When the player is outside of the spline curve and you set the emitter to follow player's elevation, it seemed like the emitter location is set to the pawn's exact location instead of the closest spline curve location. Is this maybe to give it sort of a 2D effect?

Mitchell Kenny

August 08, 2018 at 10:55 am

Any advice on how to import the .uassets into a project? Unreal seems to not recognise its own file format.

colin bale

August 09, 2018 at 10:55 am

does this work on the Z plane as well as X and Y please? i.e is it always directional when outside of it even when above or below? I wonder how useful it would be for a game where you can float around for example. thanks

Hannah Lee

August 21, 2018 at 08:07 pm

You can put the file into the desired folder using windows explorer and it will work immediately.

Troels Nygaard

August 24, 2018 at 06:20 am

Hi Colin, sorry about the slow response. In the details panel of the BP there's a checkbox 'Follow player elevation'. The intention of this is to set the emitter's Z world location to be the same as the player's. So, X + Y follow the spline curve, while it elevates with the player's Z location. However, HANNAH LEE made me aware that I might made a mistake in the BP and the checkbox 'Follow player elevation' will unintentionally set the location of the emitter to the player's exact location. Later today I'll research this and if it's broken I'll fix it. Please let me get back to you on this (will do as a response here). Have a great day

Troels Nygaard

August 24, 2018 at 06:28 am

Hey Mitchell, as Hannah suggests you should be able to use it if you copy it to the Content folder of your UE4 project. Please note that if you're using an older version of UE4 (Below 4.18) It might not want to load as intended

Troels Nygaard

August 24, 2018 at 06:33 am

Hi Hannah, so sorry about the slow response here. It is possible that I made a mistake and the location is set to the player's exact location. It could also be that only the debug speaker is on the exact location and the emitter is actually at the correct location on the spline curve's X+Y. As I mentioned to Colin I'll check later today and then I'll get back to you with a solution and link to an updated generic BP that will work with any character. Regardless what is going on it should be a relatively easy fix I think :)

Troels Nygaard

August 24, 2018 at 03:08 pm

Hi again Hannah, it appears that I made a mistake in the BP, sorry about that. However, the fix was very simple, just 2 connections need to be replaced from already existing nodes. Here's an image that shows the correct setup: https://www.dropbox.com/s/0ixftzohgi3naes/Correction.JPG?dl=0 And the updated version of the BP + a static mesh based version can be downloaded from my Dropbox (I'll also ask Audiokinetic to update the link in the blog): https://www.dropbox.com/s/tf6txyb6fimcok3/UpdatedSplineEmitterPlusMeshEmitter.zip?dl=0

Troels Nygaard

August 24, 2018 at 03:10 pm

Hi again Collin, please download the new fixed version with working 'Follow player elevation' here. Appears that I made a mistake related to the bool, sorry about that: https://www.dropbox.com/s/tf6txyb6fimcok3/UpdatedSplineEmitterPlusMeshEmitter.zip?dl=0

Hannah Lee

August 26, 2018 at 10:23 pm

Hi Troels, thanks a lot for the update!

Russell Shaw

February 07, 2019 at 08:10 am

Excellent post, Troels. I designed something along these lines myself a good few years back for Fable. We implemented a paintable layer in Unreal using different colours for different ambience types (forest, running water, shoreline, scrubland, desert etc.) when the camera was directly over a coloured block I made the associated ambience head-relative which took care of immersion.

Luka Loncaric

June 11, 2019 at 01:44 pm

Does this work with UE 4.22?

Chris Terry

June 28, 2019 at 04:57 pm

Can this be used for rivers and does it still work for 4.22

Alexander Smiths

August 16, 2019 at 02:45 am

Hello, could you help with following: your Blueprint stopped working. It doesn’t calculate Ampient sound correctly. It defines zones correctly. The condition of trigger’s turning on works correctly on debug regime, everything is calculated right, but all the time the sound follows the player without attenuation outside of designated zone. In what can the mistake be? Thank you in advance!

댓글 달기

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

다른 글

Wwise에서 템플릿 사용하기

게임 개발자의 도구 상자에 있는 수많은 도구와 마찬가지로 Wwise역시 심도 있고 복잡한 프로그램이며, 웬만한 소설보다도 긴 문서를 제공하고 있습니다. 요즘 이 문서를 완전히...

13.3.2019 - 작성자: Bradley Meyer (브래들리 메이어)

오브젝트 기반 오디오 작업하기

오브젝트 기반 사운드 시스템 몰입형 오디오 경험에 대한 시장의 요구는 7.1을 훨씬 뛰어 넘어 수직적 규격뿐만 아니라 평면적 수용력도 향상시킨 스피커 배열 구성을 개발하도록...

13.3.2019 - 작성자: LOUIS-XAVIER BUFFONI (루이-자비에 뷔포니)

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

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

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

잔향도 공간화가 필요합니다: Wwise Spatial Audio의 Room과 Portal 가이드

최근에 공간 음향에 대한 관심이 아주 뜨거워졌습니다. 하지만 사실 '공간 음향'이 의미하는 것은 매우 다양할 뿐만 아니라 사용할 수 있는 옵션이 너무 많아 어렵게 느껴질 수...

6.8.2019 - 작성자: 네이튼 해리스 (NATHAN HARRIS)

Wwise 오디오 플러그인을 제작하는 간단한 과정

Wwise용 오디오 플러그인을 개발하는 것은 디지털 오디오 편집 프로그램 (DAW)에서 플러그인을 개발하는 것과 꽤 다릅니다. Wwise는 상호작용적이며 수많은 플랫폼을 지원하기...

27.8.2019 - 작성자: 조엘 로비쇼 (Joel Robichaud)

Wwise를 사용한 음향 시뮬레이션

최근에 작업한 프로젝트에서 저희 회사는 어느 고객의 미래 사무실 공간 음향 시뮬레이션을 Wwise를 사용해 포로토타입할 기회가 있었습니다. 새로운 건물에서 음향이 어떻게 들릴...

2.10.2019 - 작성자: 에길 샌드펠드 (Egil Sandfeld)

다른 글

Wwise에서 템플릿 사용하기

게임 개발자의 도구 상자에 있는 수많은 도구와 마찬가지로 Wwise역시 심도 있고 복잡한 프로그램이며, 웬만한 소설보다도 긴 문서를 제공하고 있습니다. 요즘 이 문서를 완전히...

오브젝트 기반 오디오 작업하기

오브젝트 기반 사운드 시스템 몰입형 오디오 경험에 대한 시장의 요구는 7.1을 훨씬 뛰어 넘어 수직적 규격뿐만 아니라 평면적 수용력도 향상시킨 스피커 배열 구성을 개발하도록...

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

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