SamuKata
vercidium
vercidium

patreon


Raytraced Audio

UPDATE: you can now register your interest in Raytraced Audio here.

My latest YouTube video on Raytraced Audio is finally published!

If you've come from YouTube - the GitHub repository will be updated with the latest animations and models soon. I need to sleep first :)

If you've recently joined my Patreon, read the instructions for accessing the code on GitHub here

Overview

Raytraced Audio was one of the key features of Sector's Edge, because it had a destructible environment. It was difficult to know if a player was inside or outside, or which sounds should be muffled, because everything could be destroyed.

So I switched to a raytraced approach, which casts rays outwards from your player to learn about the environment around you. In true Vercidium style I optimised it as much as I could, so that it could keep up with the real-time destruction of Sector's Edge.

Along the way I also created an accessibility feature that paints sound on the walls around you, allowing deaf players to see sound.

My plan - and current work - is to extract this raytraced system out of Sector's Edge and into a standalone, paid plugin that other game developers can use.

I'm looking for developers that are working on games in Unreal Engine or Godot, who would be willing to test out this plugin when it's in Alpha.

You don't need to join my Patreon - although it would be appreciated! - just send me an email. My email address can be found by clicking 'more' at the top of my YouTube page.

Raytracing Features

Muffling
In real life, sounds travel a very long distance. But if you have realistic volume falloff in games, you'll hear everything around you. Raytraced Audio determines how 'reachable' every sound is, and sounds that are less reachable will be muffled. This mimics real life, and helps you as a gamer focus on the sounds that matter.

Echo
Raytraced Audio figures out the size of the room you're in, as well as how much sound returns back to your ears. This means the correct echo effects can be applied to sounds, to create a distinct difference between indoor and outdoor environments.

Directional Ambience
When indoors, you'll hear muffled rain all around you. But if you open a window, you'll hear the rain from that window specifically. Raytraced audio identifies the areas where indoors meets outdoors - like doors and windows - and creates seamless transitions between environments of different sizes.

Permeation
Not all environments are alike. Some may be composed of thick concrete walls, and others paper thin houses. Raytraced Audio determines how much 'mass' is between the listener and each sound, so that they can be muffled correctly.

Deaf Visualisation
Deaf gamers are at a huge disadvantage in 3D games, because so much information is conveyed through audio. In the early days of working on Raytraced Audio, I had a debug overlay that showed where rays travelled and where they bounced. This has been turned into an accessibility feature that paints spatialised sound on the environment around you. This allows deaf gamers to hear 'around the corner', and quickly tell where the action is.


What's Next
Materials have been on my list for a long time, as they can improve the realism of echo and permeation. This is next on my list and will allow echo properties to be calculated in real time, with no need to define reverb presets.

4K versions of the above images are available here

Raytraced Audio

Comments

Helldivers 2 had excellent audio, I'm glad to have you here! It would be great to get your feedback on the demo, I'll be sharing it here shortly

Vercidium

To add, radio and antenna engineers would likely also be great minds to probe and have reflect on implementations.

Joshua Lewis

Hi! I love this concept and believe it will eventually become a core part of modern AAA games. After watching, the first thought that came to mind as a natural extension of this concept (albeit likely different in implementation) was low frequency sounds. Specifically, positive and negative interference patterns causing variations in volume . Another concept to include could be conduction. A helmet would be a great example, but also would be a great use of occlusion . I think that a lot of the "problems" that sound, audio, speaker, and microphone engineers encounter and attempt to mitigate in the real world could spark similar solutions / concepts / implementations in game sound engines. I suspect that instead of constant high resolution computation, these facets could be applied with much lower resolution to achieve relatively high fidelity.

Joshua Lewis

Nice and clean presentation! I was making audio systems (propagation, obstruction, indoor/outdoor, etc) for Escape From Tarkov and then worked on Helldivers 2 audio as well. Not an audio programmer though! But I would be really interested trying the UE solution!

Dmitry Garkavenko

Hi :) I currenly work on a game in UE5.5 and I'd love to test this out!

Krzysztof Chodkiewicz

Hey thank you for the offer! I'll send you a DM

Vercidium

Hey- I’m working on a FNAF fan game and would love to implement this as a case use and testing of it! I would love to help work on it and help you test it! (I use Unreal Engine 5.5)

Cyb3r Gamez

You would need a bridge or invoke to support going between the languages with a 3rd party tool, which will lose performance in general, plus the type support between the 2.

Rareden

As a side note, is there a good email I can reach you at? I run a UE development studio and would love to get in touch.

Blake Thomas

Porting it to c++ wouldn’t be necessary. You would just need to build dlls and call that from a header only library which could sit in your uplugin. The scene voxelization code would need some porting if you want to support real time.

Blake Thomas

That would be excellent, thank you! The code for raytraced audio is only ~3000 lines of code, so it shouldn't be a massive task porting it to C++. I'm also curious what the performance difference would be between C# and C++ Integrating it with Unreal would be the next challenge

Vercidium

Thank you, I'd appreciate your help! I'll let you know soon how I'm planning to attack this, but since it's all C# I think it'll integrate nicely

Vercidium

I'd definitely love to help out with testing and developing a GDExtension or Godot C# plugin.

J19

Hey there, very interesting solution. Im a UE c++ dev, id love the help out with a plugin

Rareden


More Creators