Raytraced Audio now understands the difference between indoors and outdoors, as well as small vs large rooms.
Vercdad and I took everything out of the garage so it could be cleaned, and I noticed it had an echo it didn’t have before. This made me realise I was doing audio raytracing wrong this whole time.
I realised the garage now had an echo because every surface of the garage was reflecting sound back to me, i.e. no sound waves were getting lost behind the car, fridge or boxes that were there before.
The problem with the old raytraced audio system was that it only used two reverb presets:
- small wooden room, modified to have a longer decay time
- outdoor plains
It would then interpolate between the two based on the size of the room around the player.
This meant the smaller the room around the player, the longer and stronger the reverb was. I then left the garage, walked into the kitchen, and there was no echo, even though the kitchen is smaller than the garage. I had it all wrong!
The kitchen didn’t echo because sound was able to leave the room and disperse into other rooms. This means I had to control reverb based on how much sound came back to the player, and how far it travelled before it came back.
Each time an audio ray bounces, it checks for line of sight back to the player. The first bounce always has line of sight as it originated from the player, then the subsequent 7 bounces perform a raycast back to the player.
Each time it bounces and reaches the player, the total distance from that surface to the player is accumulated. If the ray reaches the edge of the map, it is marked as an ’outdoor’ ray and treated as lost energy. The ’Room Size’ and ’Outdoor %’ variables at the bottom of the screen reflect this.
The average distance that every ’indoor’ ray travelled is used to interpolate between two reverb presets:
- small wooden room
- large factory hall
Finally, this is interpolated with the outdoor plains preset based on the percentage of rays that are ’outdoor’ rays.
All raytracing is continuously performed on a background CPU thread as the player moves around and/or the environment gets destroyed.
You can try it out on our beta branch by entering the code betabetabeta on Steam:
2 views
15
4
2 months ago 00:00:55 1
Fallout: London - 1 Million Announcement
2 months ago 00:10:51 1
Fallout: London - Official Patch Announcement
3 months ago 00:03:11 1
Marvel’s Spider-Man Remastered - Ray Tracing ON vs OFF Comparison
3 months ago 00:00:15 1
Surely the PS5 isn’t that good? 😭
4 months ago 00:06:03 5
Control - Ray Tracing ON vs OFF Comparison
4 months ago 00:28:36 2
RTX 4060 vs 4070 in 2024 is it worth an extra $250?!?!?
4 months ago 00:03:06 1
Fallout London - Official Launch Trailer
5 months ago 00:18:57 1
Evolution of PCs
5 months ago 00:13:26 1
Fallout London - Official Release Announcement
5 months ago 00:22:12 4
RTX 4070 Super + Ryzen 5 7600 : Test in 20 Games | 4K
5 months ago 00:10:43 1
RX 6600 8GB + Ryzen 5 5600 : Test in Hogwarts Legacy, COD WARZONE, Overwatch 2