Show HN: AudioNimbus – Steam Audio's immersive spatial audio, now in Rust
github.comHi HN! I’m excited to share AudioNimbus, a Rust library that brings the powerful spatial audio capabilities of Steam Audio to the Rust ecosystem. Whether you’re building games, VR/AR experiences, or simulations, AudioNimbus makes it easier to integrate realistic, immersive audio into your projects.
Steam Audio is a toolkit for spatial audio, developed by Valve. It simulates realistic sound propagation, including effects like directionality, distance attenuation, reflections, and reverb. It’s used in games like Half-Life: Alyx and Counter-Strike 2.
Rust is increasingly being adopted in game development, but there’s a need to bridge the gap with industry-proven tools like Steam Audio. AudioNimbus aims to fill that gap, making it easier to integrate immersive audio into Rust projects.
AudioNimbus supports a variety of spatial audio effects, including:
- Head-Related Transfer Function (HRTF): Simulates how the listener’s ears, head, and shoulders shape sound perception, providing the acoustic cues the brain uses to infer direction and distance.
- Ambisonics and surround sound: Uses multiple audio channels to create the sensation of sound coming from specific directions.
- Sound propagation: Models how sound is affected as it travels through its environment, including effects like distance attenuation and interaction with physical obstacles of varying materials.
- Reflections: Simulates how sound waves reflect off surrounding geometry, mimicking real-world acoustic behavior.
The project is open-source on GitHub: https://github.com/MaxenceMaire/audionimbus
It includes code snippets and examples to help you get started. Contributions and feedback are welcome!
I’d love to hear your thoughts and see what you build with AudioNimbus. Feel free to share your projects, ask questions, or suggest improvements.
Happy hacking!
This sounds really cool, although I have no idea how it works (does it involve 3d geometry? pbr textures or something?). Two questions I had: Does steam audio require integration with the steam client? Are there additional licenses?
https://valvesoftware.github.io/steam-audio/
Looks like it uses emitter positions and a virtual head. It also has the ability to utilize untextured scene geometry.
> Does steam audio require integration with the steam client?
No, Steam Audio is a standalone library and does not require integration with the Steam client.
> Are there additional licenses?
Steam Audio is released under the Apache 2.0 license, which is permissive and allows for both open-source and commercial use.
As for how it works: some effects, like ambisonics or HRTF-based spatialization, don’t require 3D geometry and work purely based on the direction and distance of sound sources relative to the listener.
Other effects, like occlusion, reflections, and reverb, rely on a scene description (the 3D geometry and material properties of objects in the environment). For example, sound waves can reflect off walls or be absorbed by soft materials.
Simulating these effects in real-time can be computationally expensive, especially for complex scenes. To optimize performance, effects like reflections can be pre-baked using probes placed throughout the scene.
Steam audio is apache v2 https://github.com/ValveSoftware/steam-audio/blob/master/LIC...
Tracing against 3d, or bake to a field of probes.
Rust deserves some good libraries like these!
Thank you! I’m excited to see how Rust evolves in the game dev scene in the coming years. While I think the ecosystem isn’t quite mature enough yet for widespread adoption by larger studios, it’s growing rapidly, and I believe Rust offers some really interesting advantages that make it a strong contender for the future of game dev. Let me know if you ever build something cool in this space!
[dead]