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 (브래들리 메이어)

Wwise 2019.1 출시!

Wwise 2019.1이 출시되었습니다. Wwise 런처에서 새로운 Wwise를 다운로드하세요. Wwise 2019.1 버전에는 GDC 2019에서 가장 뜨거운 관심을 받았던...

2.4.2019 - 작성자: Audiokinetic (오디오키네틱)

Wwise 개발팀이 직접 전해드리는 팁!

이 글은 주로 Wwise 고급 사용자에 초점을 맞춰, 몇 가지 팁을 통해 비교적 덜 알려진 Wwise 기능을 다루고 있습니다. 여러분의 지식 수준에 따라 일부 섹션은...

30.4.2019 - 작성자: 베르나르 로드리그 (Bernard Rodrigue)

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

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

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

Wwise와 Unity로 12일만에 상호작용 폴리 디자인하기

버튼을 누를 때마다 캐릭터의 외모, 태도, 자세가 끊임없이 새로워지는 캐릭터가 걷는다는 것은 폴리 아티스트에게 정말 꿈만 같으면서도 동시에 악몽이기도 하죠. 꿈이든 악몽이든,...

24.9.2019 - 작성자: 피에르-마리 블랑 (Pierre-Marie Blind)

게임의 사회성에 큰 역할을 하는 음성 채팅: Wwise GME 서비스 시작!

상호작용 요소가 많은 인기 게임의 사운드는 잘 만들어진 게임 자체의 '개별적인 캐릭터'를 뒷받침해줄 뿐만 아니라 더 풍부한 플레이 경험을 제공하고 게임 시스템을 강화하는 데 큰...

8.1.2020 - 작성자: 시몽 아슈비 (Simon Ashby)

다른 글

Wwise에서 템플릿 사용하기

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

Wwise 2019.1 출시!

Wwise 2019.1이 출시되었습니다. Wwise 런처에서 새로운 Wwise를 다운로드하세요. Wwise 2019.1 버전에는 GDC 2019에서 가장 뜨거운 관심을 받았던...

Wwise 개발팀이 직접 전해드리는 팁!

이 글은 주로 Wwise 고급 사용자에 초점을 맞춰, 몇 가지 팁을 통해 비교적 덜 알려진 Wwise 기능을 다루고 있습니다. 여러분의 지식 수준에 따라 일부 섹션은...