Skip to content

ATG-Simulator/VehicleNoiseSynthesizer

Repository files navigation

Vehicle Noise Synthesizer

VNS is an open-source free audio addon primarily designed for Unity to simulate vehicle sounds based on engine rpm similar to a granulator without dependencies such as FMOD.

Watch the video

Demo 1 - Car

Demo 2 - Boat

An Enhanced FM4-Inspired Vehicle Sound Synthesizer

Can be used for:

☑️ Engine

☑️ Intake

☑️ Exhausts

☑️ Transmission⁰

☑️ Differential⁰ (and alike)

ℹ️ This uses real audio clips per Engine RPM and Engine Load to create realistic sound/noise

Pros: Some of the main reasons for devising this asset:

✅ Lightweight (Async Calculations - per fixed delta time)

✅ Uses only Unity, Optionally supports Unity Audio Mixer. Thus it's possible to build WebGL projects.

✅ Auto setups audio clips and procedural Audio Source creation make it user-friendly for modding

Cons:

❌ Needs separate audio files per RPM¹

❌ Does not respect engine piston cycle frequency for fading audio clips Or in other words, it fades audio clips linearly smoothly which is not "always" good

🔁How to loop?

These are useful to compose loop audio for your vehicle sound simulation.

⚠️Alternatives?

Although this asset was done with the idea of using it in my passion project ATG Simulator, I would say the paid ones might be easier to work with, below is a list of assets and plugins that you can use instead of this one for your projects - the prices are valid at the time of writing this text:

Note that with DAW or standalone apps and plugins you may record looped audio clips for this (or the other assets) for simulating your audio in real-time.

ℹ️ How to use it?

Either download the unitypackage or a zipped archive of this repo. And import them into a new Unity project. Note that this asset has a pair of demo scenes that need NWH Vehicle Physics and NWH Dynamic Water Physics. To be able to use any of the two demo scenes you will need to import the said assets into your project first, then import this GitHub project. You shall have none of the NWH assets, one of them or all of them to use this asset. Just study the important codes which are commented line-by-line, And delete the scripts that are not related to your project - e.g. NWH Input demo samples if no NWH Asset is used.

ℹ️ How does it work?

How does this asset work, Simplified in an image.

ℹ️ Why the heck am I sharing this freely?

I expect people happily use this but also improve it and share an enhanced version of it with others. Happy coding! :)

©️ Dan. The original script and its idea were inspired by several internet sources and GitHub Repositories like Keijiro Takahashi, CombatWombatZockchster, manueleisl, and others. The original idea was published as a GitHub repo to recreate a Forza Motorsport 4 type of audio simulation for cars - which unfortunately I lost its URL².

Thanks for your attention.

Check the social media of my passion project called ATG Simulator please:


Footnotes:

⁰ Transmission and differential sounds from the video are not by this script, Also blow-off and other sounds are not part of this asset as they are not intended to be.

¹ This script is also inspired by this video of the Turn10 Audio Engineer: https://youtu.be/UNvka9GL-9k. Same as Forza Horizon 3 or Forza Motorsport 7, it needs audio clips based on different rpm speeds. E.g Ferrari458Engine_Accelerating_at_the_rpm_speed_of_5000.wav and it needs at least one accelerating audio clip though very few and too many clips may result in subpar quality.

² In case you know the repository, feel free to let everyone know by adding a comment in the main GitHub repository.