Home Creators Posts Import Register Favorites Logout

Content

The first version of the Raytraced Audio Demo can be downloaded here.

This demo is only available to Patrons at the moment. Testers who signed up via https://vercidium.com/audio will gain access next week.

Download and extract the zip file above, then run sectorsedge.exe. This demo is built using my old game Sector's Edge, hence the file name.

Edit: the texture issues on AMD cards has been fixed and a new version uploaded to the Dropbox folder above

Setup

The game will prompt you to select a graphics preset when you first run it. If you're facing crashes or performance issues, select ' Toaster'.

Settings are saved to AppData / Roaming / vercidiumaudio

You'll then be dropped straight into the level. The controls are:

WASD to move around

Shift to sprint

Space to jump

Q, E to build and destroy blocks

Z to place walls/floors

Right click to rotate structures

1, 2 to change weapons

Left click to shoot

G to throw a grenade

Controls can be changed in Settings > Keybinds in the top right

Debug UI

The UI in the bottom left of the screen shows wind direction, reverb properties, and keybinds

Voices

A voice is a sound 'trigger' or 'spawner'. Press F2 to create one where your character is currently standing.

Then click the UI popup and press any key on your keyboard.

If you need to release your mouse cursor, press escape

Then select a sound type, e.g. ExplosionGrenade from the dropdown menu.

Now you can press N (or the key you chose) to play a sound at this location. You can change the keybind or select a different sound at any time.

When a sound is playing, click the lock icon on the right to view stats

LOS = line-of-sight. Each vertical green bar represents how much energy each ray has when it discovered this voice

PER = permeation. Each vertical orange bar represents how much energy each ray has left after travelling directly through walls to the voice.

The VercidiumVoice sound plays for about 8 minutes. If you want to stop it, click the pause icon on the top-left of the voice

Settings

Press escape to show the top-left settings menus. Here you can change between maps, alter the weather, change reverb parameters, and alter formulas (more on this below).

The reverb settings allow you to adjust the room size, and select different reverb presets. To mute all sounds and hear only the reverb, enable the 'Reverb Only' setting

Formulas

If you click the Variables tab in the top left, you'll see these two graphs:

These graphs are controlled by the voice_formulas.cs file, which is in the same folder as sectorsedge.exe:

These formula files allow you to directly change some of the C# code within the raytraced audio system. This is only available for developers, and will not be shipped with your actual products. As an example, this code changes the muffle graph to be a sin wave (unrealistic but demonstrates how the graph works):

For reverb_formulas.cs, you MUST write to these 5 variables:

averageReturningRayLength

roomSizePercent

returningRayPercent

outdoorLerp

reverbLerpSpeed

Any syntax or runtime errors will be saved to these files:

voice_formulas_error.txt

reverb_formulas_error.txt

Variable Reference

Within both files, you have access to these variables:

RAY_COUNT - the number of rays that are cast outwards. At the moment this is 960 and can't be changed (yet)

MAX_RAY_BOUNCES - the number of times that a ray can bounce. At the moment this is 8 and can't be changed (yet)

Within voice_formulas.cs, you have access to these variables:

OCCLUSION_TOTAL - the total amount of times that all rays obtained line of sight with the voice. Ranges from 0.0 to (RAY_COUNT * MAX_RAY_BOUNCES)

PERMEATION_TOTAL - the total amount of voxels that all rays passed through. Ranges from 0.0 to infinite

Within voice_reverb.cs, you have access to these variables:

DISTANCE_TOTAL - the accumulated distance of all returning rays. Ranges from 0.0 to infinite

RETURNED_TOTAL - the total amount of times that all rays obtained line of sight with the listener. Ranges from 0.0 to (RAY_COUNT * MAX_RAY_BOUNCES)

OUTSIDE_TOTAL - the total number of rays that escaped. Ranges from 0.0 to (RAY_BOUNCE * MAX_BOUNCES)

If a ray escapes without bouncing, it adds MAX_RAY_BOUNCES to this number

If a ray escapes after bouncing once, it adds MAX_RAY_BOUNCES - 1 to this number

If a ray escapes after bouncing twice, it adds MAX_RAY_BOUNCES - 2 to this number

If a ray never escapes, it adds 0 to this number

ROOM_SIZE_MIN - the smallest a room can be, e.g. 400.0

ROOM_SIZE_MAX - the largest a room can be, e.g. 1600.0

ELAPSED_MILLISECONDS - the number of milliseconds that passed since the last time this formula ran, e.g. 16.6

Tech Support

If you're facing issues running the demo, please send me your log files from this folder. You can reach me via email at mitchell@vercidium.com, via our Discord server, or send me a message here on Patreon.

I've only tested this demo on Windows, but it may run on Linux under Wine/Proton. A native Linux version is on my roadmap, it should be pretty simple now that everything is cross platform (.NET 8, Silk.NET, etc)

Demo V2 Roadmap

This is version 1 of the demo and is missing a few features like Deaf Visualisation.

Version 2 of the demo will be released some time this week and will contain:

Deaf visualisation

Ambient directions - they aren't working correctly in V1, they seem to drop off very quickly when entering buildings

Microphone input - hear your voice in the current environment

Custom sound files (MP3/WAV/OGG)

More variables to adjust - ray count, max bounces, etc

Ability to change sample rate. Currently it's forced to 48000Hz

View all reverb parameters in real time (decay, delay, density, diffusion, etc)

Ability to create custom reverb presets

Godot Roadmap

The last two weeks - create an interactive Raytraced Audio demo that lets you position sound sources around an environment, tweak the variables and formulas behind muffling/permeation/reverb, and hear the audio update in real time

Today - release the demo for Patrons, to get early feedback

Next week - release the demo for testers (those who submitted the sign-up form)

Next few weeks - create a C# SDK for Raytraced Audio and release it for testers and Patrons

Next few months - create the Godot plugin, iterate and improve the C# SDK

Milestone 1 - release the paid Godot plugin

Next few weeks/months - tech support for Godot devs

Unreal Roadmap

A couple weeks - Convert C# SDK to C SDK and release it for Patrons and testers to get early feedback

Next few weeks - iterate and improve the C SDK based on feedback

Next few weeks/months - create Unreal plugin, iterate and improve the C SDK

Milestone 2 - release the paid Unreal plugin

Next few weeks/months - tech support for Unreal devs

Files

Comments

Dmitry Garkavenko

Thanks for sharing! Couldn't really achieve what I wanted in this demo: With two adjacent rooms connected via hall I reduced permeation to near 0 and tried to get the direction feel to be towards the door that leads to a hall. Instead it was my ears steered me towards the actual source direction. Any suggestions how can I achieve that?

KyleRoxy

kinda ran around and fucked around ngl, played with all the preset sounds in different places and made small situations that you would hear in like in a active raid or fight in war. It really nails the spot on it honestly.

vercidium

That's awesome to hear, thanks for sharing

vercidium

My original raytracing system did that - altered the position/direction of the sound sources - but it was confusing especially when there are multiple pathways (doors, windows, etc) to a sound. Rainbow 6 Siege did that originally as well and it wasn't well received In real life our ears would receive the high frequency sound from the doorway, and the low frequency sound directly through the wall, but there are many more nuances our brains factor in to make it 'feel' like the sound is coming from its actual 3D location. These nuances aren't fully understood yet - our brains are advanced - which is why the R6 Siege approach of simply changing the sound's high-frequency location didn't work. It conflicted with how our brains process sound. HRTF / Binaural Audio is one thing we have figured out and simulate well. These other nuances (high/low frequencies, timing differences, echo) *can* be simulated with raytracing, but a lot more research needs to be done to make it match real life, and therefore make sense to our brains. For now I think it's best to keep the sound in its original position, and pretend our brain 'figured' out that that's where it should be. Ambient sounds are an exception - I change the direction you hear it from based on the direction of the escaping rays - but this changes the direction of both its high and low frequencies. This wouldn't work for a 'critical' sound like an enemy's gunfire. In future once we understand these nuances more, I think we could achieve it with OpenAL by: - playing the same sound twice - once with a high pass filter and once with a low pass filter - raytrace against that sound to figure out where the doorway is - move the position of the high frequency sound to the doorway - slightly delay the high frequency sound based on the length of the rays (i.e. simulating the speed of sound) Just thinking - if a wall is really thick and you know you should only be hearing the high frequencies from the doorway, then you could mute the low frequencies, reduce its volume, and move it to where the doorway is. I'm not sure how good that would sound - maybe you should only be hearing the echo from the doorway? I don't support directional echo per-sound though due to performance limitations. Currently only one reverb effect is used and it affects all sounds.

Apermesa

I found that Dolby Atmos for Headphones is taking effect, did you add Dolby support or Dolby is just doing the job on its own? With Dolby enabled, the sound localization is so much more realistic thanks to HRTF.