NWH Vehicle Physics 2 Documentation
Docs » NWH:VehiclePhysics2:Sound:index

Sound

About

Sound system in NVP2 consists of SoundManager and multiple SoundComponents. Disabling SoundManager also disables all the SoundComponents.

  • SoundComponent and SoundManager are VehicleComponents. Check VehicleComponent page for more info.
  • Each SoundComponent (type of Vehicle Component) is responsible for one sound, e.g. EngineRunningComponent or EngineStartingComponent.
  • AudioSources are not added manually but are instead generated by the script when the scene is started. Some SoundComponents can have more than one AudioSource - e.g. wheel related SoundComponents have one AudioSource for each wheel.
  • Each field affects only the vehicle to which the script is attached. To modify the audio output for all the vehicles VehicleAudioMixer (VehicleAudioMixer.mixer) can be used.
Requirements
  • Mixer field must have AudioMixer assigned. By default VehicleAudioMixer will be used.

Sound Component

SoundComponent inherits from VehicleComponent.
Check VehicleComponent page for more info.

2023/05/14 16:35

Sound Manager

SoundManager inspector.

SoundManager is the main class for handling sound. It contains all the global sound settings and also manages individual SoundComponents.

Also check the Sound page.

Master Settings

Master settings affect all the SoundComponents

Equalizer

Each sound component belongs to one of the Audio Mixer groups: Engine, Transmission, SurfaceNoise, Turbo, Suspension, Crash or Other. Here you can add additional effects and modify the sound. One example of this is distortion which is added to the engine sound based on load through the Audio Mixer.

VehicleAudioMixer
2023/05/14 16:35

Blinker Component

BlinkerComponent inspector.
  • Click-clack of the working blinker.
  • Accepts two clips, first is for the blinker turning on and the second is for blinker turning off.
2023/05/14 16:35
 

Crash Component

CrashComponent inspector.
  • Sound of vehicle crashing.
  • Supports multiple audio clips of which one will be chosen at random each time this effect is played.
  • Volume is dependent on collision intensity. This can be adjusted through Velocity Magnitude Effect.
  • Pitch is random. Randomness can be adjusted through Pitch Randomness field.
2023/05/14 16:35

Engine Fan Component

EngineFanComponent inspector.

EngineFanComponent is used to imitate engine fan running, the sound especially prominent in commercial vehicles and off-road vehicles with clutch driven fan.

  • AudioSource of EngineFanComponent is positioned at Engine Position (Settings tab).
2023/05/14 16:35

Engine Running Component

EngineRunningComponent inspector.

EngineRunningComponent is a SoundComponent responsible for the engine sound. A pitch based approach using a single pre-recorded engine sound clip is used along with filters to achieve relatively realistic sound.

Big upside of this approach is that only a single clip is required which is ideal for small game studios, as opposed to layering approach where usually tens of clips of engine at different loads, positions and RPMs are used to achieve the engine sound effect. Of course, the downside is that realism suffers.

If you need the layering feature please make a feature request through support.

  • AudioSource of EngineRunningComponent is positioned at Exhaust Position (Settings tab).

Notes

Distortion affects volume so when high levels of distortion are used it is usually a good idea to reduce volume range proportionately.

2023/05/14 16:35

Engine Start Stop Component

EngineStartStopComponent inspector.
  • EngineStartStopComponent plays while the starter is active.
  • First sound clip in the list will be used for engine starting sound.
  • If the second clip is added to the list it will be played after the engine stops as an engine stopping sound.
  • Starter settings can be adjusted under Powertrain ⇒ Engine tab.
  • AudioSource of EngineStartComponent will be positioned at Settings ⇒ Engine Position.
2023/05/16 09:06 · nwhcoding

Gear Change Component

GearChangeComponent inspector.

Sound of changing gears.

  • Supports multiple audio clips of which one is chosen at random each time the effect is played.
  • AudioSource of GearChangeComponent is positioned at Settings ⇒ Transmission Position.
2023/05/14 16:35

Horn Component

HornComponent inspector.
  • Vehicle horn sound.
2023/05/14 16:35

Reverse Beep Component

ReverseBeepComponent inspector.
  • Beeping sound commercial vehicles make when driving in reverse.
2023/05/14 16:35

Suspension Bump Component

Sound of tire going over obstacle.
Each time the clip is played volume and pitch are changed to reduce repetitiveness. Multiple clips can also be used for the same reason.

2023/05/14 16:35

Transmission Whine Component

TransmissionWhineComponent inspector.

Sound of vehicle transmission. Most prominent on rally and racing cars with straight cut gears in the gearbox.

  • AudioSource of TransmissionWhineComponent is positioned at Settings ⇒ Transmission Position.
2023/05/14 16:35

Turbo Flutter Component

TurboFlutterComponent inspector.

Sound of a wastegate releasing air on turbocharged vehicles.

  • Gets triggered after releasing throttle if there is adequate boost build up in ForcedInduction.
  • AudioSource of TurboFlutterComponent is positioned at Settings ⇒ Engine Position.
2023/05/14 16:35

Turbo Whistle Component

TurboWhistleComponent inspector.

Imitates high-pitched sound of forced induction.

  • Can be used for both turbocharger and supercharger sound.
  • Sound depends on EngineComponent.ForcedInduction.
  • AudioSource of TurboWhistleComponent is positioned at Settings ⇒ Engine Position.
2023/05/14 16:35

Wheel Skid Component

WheelSkidComponentInspector
  • Sound produced by slipping/skidding over a surface.
  • WheelSkidComponent gets clips, volume and pitch settings from active SurfaceMap. TODO
  • An AudioSource gets generated for each WheelComponent.
2023/05/14 16:35

Wheel Tire Noise Component

WheelTireNoiseComponent
  • Sound produced by tire rolling over a surface.
  • WheelTireNoiseComponent gets clips, volume and pitch settings from active SurfaceMap. TODO
  • An AudioSource gets generated for each WheelComponent.
2023/05/14 16:35
Previous Next

NWH Vehicle Physics 2 Documentation

Table of Contents

Table of Contents

  • Sound
    • About
    • Sound Component
    • Sound Manager
      • Master Settings
      • Equalizer
    • Blinker Component
    • Crash Component
    • Engine Fan Component
    • Engine Running Component
    • Engine Start Stop Component
    • Gear Change Component
    • Horn Component
    • Reverse Beep Component
    • Suspension Bump Component
    • Transmission Whine Component
    • Turbo Flutter Component
    • Turbo Whistle Component
    • Wheel Skid Component
    • Wheel Tire Noise Component
  • About
  • Setup
  • Input
  • Vehicle Controller
  • Wheel Controller
  • NWH Common Scripts
  • Trailers
  • GUI
  • Multiplayer
  • Render Pipelines
  • Add-ons
  • FAQ
  • Troubleshooting
  • Demos
  • Changelog
  • Upgrade Notes
  • Support