Search Unity

[V2 Released] Realistic Engine Sounds

Discussion in 'Assets and Asset Store' started by slaczky, Jun 22, 2017.

  1. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
  2. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    can i use it with the "unity car physics"? i think it should, because i just need constant looping engine sounds... but do i NEED to use your engine Sound script?
     
  3. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    You can use it with Unity Standard Assets Car. You don't need to use my script. If you want, you can use only the looped wav files, but my script gives you mutch better results than original unity car audio script. Here is a video that show how simple is to use my controller script with unity car:


    This video is from older RES, I writed a new RES controller script for unity car, which have a feature for release gas pedal at shifting. This produce mutch better engine sound for unity car. Soon I submit this update for RES Lite and Plus (Pro already have this new controller script).

    I have two free engine packs wich contain only wav files. This can help you decide does it sound good with unity car if you only use my looped audio clips:
    German i6 Free: http://u3d.as/11Fm
    Rotary x8 Free: http://u3d.as/11Jw
     
  4. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
  5. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    I don't have this asset and the free version is not yet released.
    If you can provide me an example from the car controller script I can write a controller script for RES.
    I need the car controller script's exact name and following public variables name:
    Car's current rpm, max rpm, current speed, max speed, when gas pedal pressed, when car is changing gears and when car is reversing (or current gear).

    If any of this variables are not public, then it's going to be a little tricky and complicated.
     
  6. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    Unfortunately, I don't have a source code for that.
     
  7. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    I contact the developer if he can provide me the required value's name or early release of free version.
     
  8. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,508
    Hello,

    I think you have all the information you need here:
    https://vehiclephysics.com/advanced/databus-reference/

    Here's the file with the definitions for your convenience. I have no problem on this file being public, as it can be useful for others to develop add-ons:
    Code (CSharp):
    1. //--------------------------------------------------------------
    2. //      Vehicle Physics Pro: advanced vehicle physics kit
    3. //          Copyright © 2011-2017 Angel Garcia "Edy"
    4. //        http://vehiclephysics.com | @VehiclePhysics
    5. //--------------------------------------------------------------
    6.  
    7. // Databus: Generic communication bus inspired in the ODB-II standard
    8. //
    9. // http://en.wikipedia.org/wiki/OBD-II_PIDs
    10. //
    11. // Features:
    12. //
    13. //  - Inmmediate access O(1)
    14. //    - Direct, non-blocking read/write access from all clients
    15. //    - Transport only: no error control, no range checking
    16. //    - Exact data only: integers. Float values are represented as fixed-resolution decimals (ie: 1.0 = 10000)
    17. //    - NaN is gracefully supported as integer: (int)NaN = -2147483647
    18. //    - Extensible
    19. //
    20. // Note: The write only / read only hints below refer to intended usage of the bus as seen from
    21. // outside of the vehicle controller. Internally values are all read/write, but using them in a
    22. // different way than specified might have unexpected results.
    23.  
    24.  
    25. namespace VehiclePhysics
    26. {
    27.  
    28. public struct Channel
    29.     {
    30.     public const int Input            = 0;        // Write only. States of the standard input elements.
    31.     public const int Vehicle        = 1;        // Read only. Standard values of the vehicle.
    32.     public const int Settings        = 2;        // Read/write. Common configuration settings. Optionally implemented.
    33.     }
    34.  
    35.  
    36. // Input channel (write only)
    37.  
    38. public struct InputData                // PID            DESCRIPTION                            RESOLUTION        EXAMPLE
    39.     {
    40.     public const int Steer             =  0;        // Steering wheel position in ratio            10000        -10000 (full left), 0 (center), +10000 (full right)
    41.     public const int Throttle         =  1;        // Throttle pedal position in ratio            10000        10000 (= 1.0 = 100%)
    42.     public const int Brake            =  2;        // Brake pedal position in ratio            10000       5000 (= 0.5 = 50%)
    43.     public const int Handbrake        =  3;        // Handbrake position in ratio                10000
    44.     public const int Clutch            =  4;        // Clutch pedal position in ratio            10000
    45.     public const int ManualGear        =  5;        // Stick position for manual gears: -1 (R), 0 (N), 1, 2, 3... Might be used together with AutomaticGear in Manual (M) mode.
    46.     public const int AutomaticGear    =  6;        // Stick position for automatic transmission: 0, 1, 2, 3, 4, 5 = M, P, R, N, D, L
    47.     public const int GearShift        =  7;        // Incremental value for gear shifting: +1, -1. The vehicle sets this value back to 0 when acknowledged.
    48.     public const int Retarder        =  8;        // Stick position for the retarder brake: 0 (disabled), 1, 2, 3...
    49.     public const int Key            =  9;        // Ignition key position. -1 = off, 0 = drive, 1 = ignite.
    50.  
    51.     public const int _STDINPUT_SIZE    = 10;
    52.     }
    53.  
    54.  
    55. // Vehicle channel (read only)
    56.  
    57. public struct VehicleData            // PID            DESCRIPTION                            RESOLUTION        EXAMPLE
    58.     {
    59.     public const int Speed            =  0;        // Vehicle's longitudinal velocity in m/s    1000        14500 (= 14.5 m/s)
    60.     public const int EngineRpm        =  1;        // Engine RPMs                                1000        1200000 (= 1200 rpm)
    61.     public const int EngineStalled    =  2;        // Is the engine stalled? 0 = no, 1 = yes
    62.     public const int EngineWorking    =  3;        // Is the engine up and running? 0 = no, 1 = yes
    63.     public const int EngineLimiter    =  4;        // Is the rpm limiter cutting engine power? 0 = no, 1 = yes
    64.     public const int EngineLoad        =  5;        // How much load is demanded in ratio        1000        200 (= 0.2 = 20%)
    65.     public const int EngineTorque    =  6;        // Torque at the engine crankshaft in Nm    1000        200000 (= 200 Nm)
    66.     public const int EnginePower    =  7;        // Power developed by the engine in kW        1000        10000 (= 10 kW)
    67.     public const int EngineFuelRate =  8;        // Instant fuel consumption in g/s            1000        20230 (= 20.23 g/s)
    68.     public const int ClutchTorque    =  9;        // Torque at the output of the clutch in Nm    1000        150000 (= 150 Nm)
    69.     public const int ClutchLock        = 10;        // Lock ratio of the clutch                    1000        800 (= 0.8 = 80%)
    70.     public const int GearboxGear     = 11;        // Engaged gear. Negative = reverse, 0 = Neutral (or Park), Positive = forward.
    71.     public const int GearboxMode     = 12;        // Gearbox working mode. 0, 1, 2, 3, 4, 5 = M, P, R, N, D, L
    72.     public const int GearboxShifting= 13;        // Is the gearbox in the middle of a gear shift? 0 = no, 1 = yes
    73.     public const int RetarderTorque = 14;        // Torque injected by the retarder in Nm    1000        2000000 (= 2000 Nm)
    74.     public const int TransmissionRpm= 15;        // Rpms at the output of the gearbox        1000        100000 (= 100 rpm)
    75.     public const int AbsEngaged     = 16;        // Is the ABS being engaged in any wheel? 0 = no, 1 = yes
    76.     public const int TcsEngaged     = 17;        // Is the TCS limiting the engine throttle? 0 = no, 1 = yes
    77.     public const int EscEngaged     = 18;        // Is the ESC applying brakes for keeping stability? 0 = no, 1 = yes
    78.     public const int AsrEngaged     = 19;        // Is the ASR applying brakes for reducing wheel slip? 0 = no, 1 = yes
    79.     public const int AidedSteer        = 20;        // Steering input after steering aids        10000       -10000 (full left), 0 (center), +10000 (full right)
    80.  
    81.     public const int _VEHICLE_SIZE    = 21;
    82.     }
    83.  
    84.  
    85. // Settings channel (read / write)
    86.  
    87. public struct SettingsData                // PID            DESCRIPTION                            RESOLUTION        EXAMPLE
    88.     {
    89.     public const int DifferentialLock    =  0;        // Override the lock setting at the differential. 0 = no override. 1 = force locked. 2 = force open
    90.     public const int DrivelineLock        =  1;        // Override the lock setting at the driveline. 0 = no override. 1 = force locked. 2 = force unlocked/open
    91.     public const int AutoShiftOverride    =  2;        // Auto-shift override setting. 0 = no override. 1 = force auto shift. 2 = force manual shift.
    92.     public const int AbsOverride        =  3;        // ABS override setting. 0 = no override. 1 = force enabled. 2 = force disabled.
    93.  
    94.     public const int _SETTINGS_SIZE        = 10;
    95.     }
    96.  
    97.  
    98. // Data Bus implementation:
    99. // A simple array (channels) of arrays of integers (values)
    100.  
    101.  
    102. public class DataBus
    103.     {
    104.     int[][] m_data;
    105.  
    106.  
    107.     public DataBus ()
    108.         {
    109.         // Channels are created one by one
    110.  
    111.         m_data = new int[3][];
    112.         m_data[Channel.Input] = new int[InputData._STDINPUT_SIZE];
    113.         m_data[Channel.Vehicle] = new int[VehicleData._VEHICLE_SIZE];
    114.         m_data[Channel.Settings] = new int[SettingsData._SETTINGS_SIZE];
    115.  
    116.         // Debug.Log(m_data.Length + " " + m_data[0].Length + " " + m_data[1].Length + " " + m_data[1][19]);
    117.         }
    118.  
    119.  
    120.     // Get a single value from a channel
    121.  
    122.     public int Get (int idChannel, int idValue)
    123.         {
    124.         return m_data[idChannel][idValue];
    125.         }
    126.  
    127.  
    128.     // Set a single value in a channel
    129.  
    130.     public void Set (int idChannel, int idValue, int value)
    131.         {
    132.         m_data[idChannel][idValue] = value;
    133.         }
    134.  
    135.  
    136.     // Direct access to a single channel
    137.  
    138.     public int[] Get (int idChannel)
    139.         {
    140.         return m_data[idChannel];
    141.         }
    142.  
    143.  
    144.     // Raw access to the entire bus: bus[channel][value]
    145.  
    146.     public int[][] bus { get { return m_data; } }
    147.     }
    148. }
     
  9. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Thank you very much for this informations, it helps a lot!
     
    Edy likes this.
  10. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Code (CSharp):
    1. //______________________________________________//
    2. //___________Realistic Engine Sounds____________//
    3. //______________________________________________//
    4. //_______Copyright © 2018 Yugel Mobile__________//
    5. //______________________________________________//
    6. //_________ http://mobile.yugel.net/ ___________//
    7. //______________________________________________//
    8. //________ http://fb.com/yugelmobile/ __________//
    9. //______________________________________________//
    10. using System.Collections;
    11. using System.Collections.Generic;
    12. using UnityEngine;
    13. using VehiclePhysics;
    14.  
    15. public class VppToRes : MonoBehaviour
    16. {
    17.     RealisticEngineSound res;
    18.     VehicleBase m_vehicle;
    19.      
    20.     public float maxRPM = 7000;
    21.     public float maxSpeed = 250;
    22.  
    23.     private GameObject car;
    24.  
    25.     private void Start()
    26.     {
    27.         car = gameObject.transform.root.gameObject;
    28.         m_vehicle = car.GetComponent<VehicleBase>();
    29.         res = gameObject.GetComponent<RealisticEngineSound>();
    30.         res.maxRPMLimit = maxRpm; // max rpm from car
    31.         res.carMaxSpeed = maxSpeed; // needed for straight cut gearbox script
    32.     }
    33.     private void Update()
    34.     {
    35.         res.engineCurrentRPM = m_vehicle.data[Channel.Vehicle][VehicleData.EngineRpm]/1000;
    36.          
    37.         // is currently shifting - needed for shifting sounds script
    38.         if(m_vehicle.data[Channel.Vehicle][VehicleData.GearboxShifting] == 1)
    39.         {
    40.             res.isShifting = true;
    41.         }
    42.         else
    43.         {
    44.             res.isShifting = false;
    45.         }
    46.          
    47.         // car's current speed
    48.         res.carCurrentSpeed = (m_vehicle.data[Channel.Vehicle][VehicleData.Speed] * 18) / 5; // converting m/s to km/h, current speed is needed for straight cut gearbox script
    49.          
    50.         // accelerating
    51.         if (!res.isShifting)
    52.         {
    53.             if (m_vehicle.data[Channel.Vehicle][VehicleData.Throttle] > 5000)
    54.                 res.gasPedalPressing = true;
    55.             else
    56.                 res.gasPedalPressing = false;
    57.         }
    58.  
    59.         // car is reversing
    60.         // manual gearbox
    61.         if (m_vehicle.data[Channel.Vehicle][VehicleData.ManualGear] == -1)
    62.             res.isReversing = true;
    63.         else
    64.             res.isReversing = false;
    65.         // automatic gearbox
    66.         if (m_vehicle.data[Channel.Vehicle][VehicleData.AutomaticGear] == 2)
    67.             res.isReversing = true;
    68.         else
    69.             res.isReversing = false;
    70.          
    71.         // is engine running
    72.         if(m_vehicle.data[Channel.Vehicle][VehicleData.EngineWorking] == 0) // car's engine is not running
    73.         {
    74.             if(res.enabled)
    75.                 res.enabled = false;
    76.         }
    77.         else // car's engine is running
    78.         {
    79.             if(!res.enabled)
    80.                 res.enabled = true;
    81.         }
    82.     }
    83. }
    84.  
    Here is the code that I writed for VPP support. Tell me is it working for you, because I not tested it.
    In this component you can set max speed and max rpm parameters to fit for your car.
    You need to disable the stock car sounds (or set VPP car engine AudioClips to "none").
     
  11. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    I get an error called cannot apply indexing.
     
  12. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Code (CSharp):
    1. //______________________________________________//
    2. //___________Realistic Engine Sounds____________//
    3. //______________________________________________//
    4. //_______Copyright © 2018 Yugel Mobile__________//
    5. //______________________________________________//
    6. //_________ http://mobile.yugel.net/ ___________//
    7. //______________________________________________//
    8. //________ http://fb.com/yugelmobile/ __________//
    9. //______________________________________________//
    10. using System.Collections;
    11. using System.Collections.Generic;
    12. using UnityEngine;
    13. using VehiclePhysics;
    14.  
    15. public class VppToRes : MonoBehaviour
    16. {
    17.     RealisticEngineSound res;
    18.     VehicleBase m_vehicle;
    19.        
    20.     public float maxRPM = 7000;
    21.     public float maxSpeed = 250;
    22.  
    23.     private GameObject car;
    24.  
    25.     private void Start()
    26.     {
    27.         car = gameObject.transform.root.gameObject;
    28.         m_vehicle = car.GetComponent<VehicleBase>();
    29.         res = gameObject.GetComponent<RealisticEngineSound>();
    30.         res.maxRPMLimit = maxRpm; // max rpm from car
    31.         res.carMaxSpeed = maxSpeed; // needed for straight cut gearbox script
    32.     }
    33.     private void Update()
    34.     {
    35.         res.engineCurrentRPM = m_vehicle.data.Get(Channel.Vehicle, VehicleData.EngineRpm)/1000;
    36.            
    37.         // is currently shifting - needed for shifting sounds script
    38.         if(m_vehicle.data.Get(Channel.Vehicle, VehicleData.GearboxShifting) == 1)
    39.         {
    40.             res.isShifting = true;
    41.         }
    42.         else
    43.         {
    44.             res.isShifting = false;
    45.         }
    46.            
    47.         // car's current speed
    48.         res.carCurrentSpeed = (m_vehicle.data.Get(Channel.Vehicle, VehicleData.Speed) * 18) / 5; // converting m/s to km/h, current speed is needed for straight cut gearbox script
    49.            
    50.         // accelerating
    51.         if (!res.isShifting)
    52.         {
    53.             if (m_vehicle.data.Get(Channel.Vehicle, VehicleData.Throttle) > 5000)
    54.                 res.gasPedalPressing = true;
    55.             else
    56.                 res.gasPedalPressing = false;
    57.         }
    58.  
    59.         // car is reversing
    60.         // manual gearbox
    61.         if (m_vehicle.data.Get(Channel.Vehicle, VehicleData.ManualGear) == -1)
    62.             res.isReversing = true;
    63.         else
    64.             res.isReversing = false;
    65.         // automatic gearbox
    66.         if (m_vehicle.data.Get(Channel.Vehicle, VehicleData.AutomaticGear) == 2)
    67.             res.isReversing = true;
    68.         else
    69.             res.isReversing = false;
    70.            
    71.         // is engine running
    72.         if(m_vehicle.data.Get(Channel.Vehicle, VehicleData.EngineWorking) == 0) // car's engine is not running
    73.         {
    74.             if(res.enabled)
    75.                 res.enabled = false;
    76.         }
    77.         else // car's engine is running
    78.         {
    79.             if(!res.enabled)
    80.                 res.enabled = true;
    81.         }
    82.     }
    83. }
    84.  
    Sorry about that. I hope that this one works.
     
  13. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    Code (CSharp):
    1. res.maxRPMLimit = maxRpm; // max rpm from car
    Also, it's maxRPM.

    And Input data to Throttle, Automatic and Manual Gear.

    Other than that, It works! Except the tire skid.
     
    Last edited: Feb 3, 2018
  14. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    I did not see that, I writed this script in Notepad++. Glad you found it.
    There is no sound for tire skid?
     
  15. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    Yes.
     
  16. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Looks like you turned off VP Audio script. Try turning that back on and find the Audio Source for engine sound and set it's AudioClip to none.
     
  17. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Could you make sample of pro version with RVP 2.0 ?
     
  18. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    RVP 2.0 is already supported in all versions
     
  19. obstudio

    obstudio

    Joined:
    Sep 30, 2016
    Posts:
    58
  20. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
  21. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Last edited: Feb 9, 2018
  22. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    I did turn it back on, set the audio clip to none and then it worked! I can hear tire skid now.
     
    slaczky likes this.
  23. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    An update is released for RES LIte and Plus.

    v1.3
    - Added muffler pluck noise sound files, controller scripts for this and prefabs
    - Added shifting sound files, controller script for this and prefabs
    - Added an option to set Master Volume (can reduce engine sounds volume)
    - Added an option to add reverb zone with a preset
    - New controller script for Unity Standard Assets Car, this controller script now releases gas pedal at shifting
    - Modified the logic behind rpm limiting. If you disable rpm limiting no need to modify "High Vol Curve" any more
    - Removed "Max RPM Pitch Curve", script now using high rpm's pitch curve for rpm limiting
    - Removed "High Vol Reversing Curve", script now using "High Vol Curve"'s value for reversing
    - Updated demo scenes
    - Updated "car controllers to res" sccripts
    - Fixed a bug with RVP2 controller script, not detected gas pedal pressing in reverse gear
    - Fixed missing reverse gear sound clip in RVP2 prefabs
    - Updated documentation
    - Minor bugfixes
    For Plus version all above +added turbo and supercharger sound pack, controller script and prefabs.



     
  24. serberusno1

    serberusno1

    Joined:
    Jan 28, 2017
    Posts:
    84
    Anybody have any idea why the pro version won't work with Edy's for me? I'm sure I followed the tutorials properly but I'm getting a null reference error and no sounds play on the vehicle. I do have a series of vehicles set up to be switched between if that makes any difference?
     
  25. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Are you using the latest version of Edy's?
    Please post the full error. You can contact me via email: slaczky@gmail.com
     
  26. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Last edited: May 2, 2018
  27. IDreamofIndie

    IDreamofIndie

    Joined:
    Dec 24, 2014
    Posts:
    38
    Hello,
    I just purchased the lite version for use with RealisticCarControllerV3.
    I import the RCCV3_RES-Lite package and am receiving errors shown.
    Seems as though RCCV3.2 changed some things?
    Any help would be appreciated!
    Thanks
    RealisticEngineSoundsErrors.png
     
  28. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Hi!
    Thank you for purchasing RES - Lite.

    RCC was updated a few days ago and a lot things are changed. Here is the fix to make RES compatible with RCCV3.2:
    Replace the code in the following scripts:
    .
    . // edit, codes are removed from this post, download the latest RES from the Asset Store
    .

    Soon I submit this fix to the Asset Store for all RES versions.

    EDIT: an update is released with the new scripts for all RES editions.
     
    Last edited: May 17, 2018
  29. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Last edited: May 31, 2018
    Rotary-Heart likes this.
  30. serberusno1

    serberusno1

    Joined:
    Jan 28, 2017
    Posts:
    84
    Slackzy, I'm wondering if you can tell me how to disable the audio listeners that are created when I'm using your asset. I have one audio listener on my main camera, I'm using Edy's vehicle physics for my car controller, his vehicle manager script to change cars and it's causing all sorts of problems to have all of those audio listeners spawned
     
  31. serberusno1

    serberusno1

    Joined:
    Jan 28, 2017
    Posts:
    84
    Also, I'm getting this error from the REStoEdys script line 39 which reads 'va.engine.audioSource.clip = noneClip; // disable stock car engine sound'

    Don't know exactly what it does but it would be nice to be able to clear my console errors.
     

    Attached Files:

  32. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Are you using the lates EVP and RES? You can recieve errors if you using an older version of EVP or RES.
    In the latest RES, for EVP I created another script for EVP's camera controller "CameraControll_VM.cs" this script is using the camera's stock audio listener. This script is better when you controll multiple vehicles, like in the EVP's Vehicle Manager demo scene.
     
  33. serberusno1

    serberusno1

    Joined:
    Jan 28, 2017
    Posts:
    84
    Ah yes maybe that's the issue. I haven't updated in a little while because updating almost always causes errors
     
  34. StreetKoala

    StreetKoala

    Joined:
    Jun 3, 2018
    Posts:
    1
    How well does this translate into WebGL? Does it have any known issues?
     
  35. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Before update always backup your project
     
  36. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    I tested it in WebGL with Edge browser. Some engine packs had some millisecond lag but after a few minute use this problem disapeared, I think this depending on the web browser.
     
  37. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Is it possible to morph the engine sounds to tank engine sounds?
     
  38. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    You can get tank like engine sounds if you set the diesel engine sound's pitch value to between 0.2 - 0.4, like in this video, watch it from 3:50
    You can try this with other engine sounds too.

     
    mkgame likes this.
  39. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    slaczky likes this.
  40. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Yes, that is the sound pack I used for the tank in the video. Thats enought if you only change the pitch, but there are other parameters too you can play with.
     
  41. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    273
    Hi @slaczky your assets are very interesting but exterior sounds are somewhat bad compared to interior sounds that sound very realistic
    Edit: look like that happen only when on the lite version looking. think i'll buy the Plus or The Pro
     
    Last edited: Jun 23, 2018
    slaczky likes this.
  42. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Realistic Engine Sounds is one year old! To celebrate this I'm enabled upgrade sale (32,5% off) to Plus and Pro from Lite or Plus versions. This sale will end on August 16.
    Upgrade to Plus: https://goo.gl/t1hm7Z
    Upgrade to Pro: https://goo.gl/DCTgsb
     
  43. jbishara

    jbishara

    Joined:
    May 31, 2018
    Posts:
    1
    Hi, I bought a v12 Italian engine sound, and the prefabs are empty, I'm not sure how to use these car sounds on my car. I am using the unity standard car asset.
     
  44. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Hi! The prefabs are made for Realistic Engine Sounds, this means you need to import Realistic Engine Sounds into your project. because this contain the scripts for engine sounds. V12 Italian only contain wav files. You can use this wav files with the standard car asset without RES, but it may never sound as good as with RES scripts.
     
  45. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    A new update is comming soon for Realistic Engine Sounds - Pro V1.6

    - Added 10 new engine sound packs: Cruiser Bike 600ccm, V8 Italian F355, V8 Italian 2, V8 Formula1, V8 American Classic 2, V8 American Modern 2, Truck Old, Truck Modern, Bus Old, Bus Modern
    - Added 4 new reverse sounds for trucks and busses (beep warning sounds)
    - Added support for AudioMixer (set all engine sounds volume all at once or add a special effects or filters)
    - Added "engine shake effect", see video below
    - Remastered the following engine sound packs: i4 German, i4 German 2, i4 German 3, i4 Japanese, i6 German, V8 American Classic, V8 American Modern, V10 Italian

    EDIT:
    - Added AudioRolloffMode setting (default set to "Custom")
    - Added Automatic Optimisation: if main camera is far more like "MaxDistance" from RES script, the script will automatically destroy all of it's audio sources. Because of the distance, this audio sources already can't be heard. This is a huge performance save for scenes with multiple vehicles in it!
    - Minimum Unity 3D version now is 2017.1: random pitch changing bug in Audio Listeners does not exist in Unity 2017.1. No longer need to trick it with custom audio listeners.

    Whats left to do: new features testing, prefabs for each car controllers, documentation update and new store videos / images

     
    Last edited: Nov 12, 2018
  46. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Update v1.6 is released for Realistic Engine Sounds - Pro!



    New tutorial videos.

    Release notes:
    v1.6
    - Added 10 new engine sound packs: Cruiser Bike 600ccm, V8 Italian F355, V8 Italian 2, V8 Formula1, V8 American Classic 2, V8 American Modern 2, Truck Old, Truck Modern, Bus Old, Bus Modern
    - Added 4 new reverse sounds for trucks and busses (beep warning sounds)
    - Added support for AudioMixer (set all engine sounds volume all at once or add special effects or filters)
    - Added AudioRolloffMode setting (default set to "Custom")
    - Added Automatic Optimisation: if main camera is far more like "MaxDistance" from RES script, the script will automatically destroy all of it's audio sources. Because of the distance, this audio sources already can't be heard. This is a huge performance save for scenes with multiple vehicles in it.
    - Optimised RES controller script's ReverbZone settings to a much simpler code and reduced controller script size
    - "dopplerAmount" value is now set to private and it's value is always 1.0f
    - Updated all other controller scripts to work with the new RES controller script
    - Minor bug fixes
    - Minimum Unity 3D version now is 2017.1: random pitch changing bug in Audio Listeners does not exist in Unity 2017.1. No longer need to trick it with custom audio listeners.
    - Remastered the following engine sound packs: i4 German, i4 German 2, i4 German 3, i4 Japanese, i6 German, V8 Amreican Classic, V8 American Modern, V10 Italian
    - EVP5: CameraControll_VM.cs script is (removed) replaced with CameraControll.cs (use CameraControll.cs if your scene is looking for CameraControll_VM.cs)
    - RVP2 to RES script is modified, now it have better RPM simulation when car is decelerating
    - Updated Demo Scenes
    - Updated Documentation

    Edit: v1.6 update is released for Lite and Plus versions too
     
    Last edited: Nov 28, 2018
  47. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    290
    i just tried the lite version today and the volume rolloff is not working at all then i saw that you set dopplerAmount to AudioSource.spatialBlend. whats the reason for that, they are different things right?
     
  48. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    How do you tested audio rolloff? For me everything is working in demo scenes and in custom scenes.

    Spatialblend can be used to enable or disable doppler effect, if you set it's value to 0 the sounds volume will be constant no mater how far is the camera.
    In the latest update I added audio rolloff mode and setted dopplerAmount to a private float, because it's value should allways be 1 (but I kept it in the script if someone need it for some reason).
    Thanks to audio rolloff mode, If RES script is farer from main camera than "Max Distance" value, RES script will remove all of it's audio sources because this audios allready can't be heard. This will save some performance in scenes with multiple vehicles.

    I only had a small problem with NWH vehicle physics, because in their GTA like demo scenes each car has it's own main camera controller, and RES script can't find the currently used camera. In this situation RES will not remove audio sources to save performance if vehicle is farer from current main camera. This can be fixed by using only one main camera controller for all vehicles (like in RCC, EVP, RVP...), and or setting up main camera by hand for RES scripts.
     
  49. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    290
    i wanted to remove the doppler effect and set it to zero but in your code you set the dopper effect to spatial blend like this : engineIdle.spatialBlend = dopplerAmount; this completely removes volume rolloff so the engine volume is the same no matter how far the vehicle is. dopplerAmount is not private in my version, may be you forgot to update the lite version.
     
  50. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Download the latest version, Lite was updated two days ago.
    Edit: If you want to modify the audios "dopplerLevel" value, minor modifications need to be made in RES controller script. I will add this feature for next update.
    Send me an email with your invoice number and I will send the modified controller scripts later this day or tomorrow.
     
    Last edited: Nov 29, 2018