Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[V2 Released] Realistic Engine Sounds

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

  1. Simunek

    Simunek

    Joined:
    Jul 15, 2016
    Posts:
    49
    Hi, I am using "Sport Bike 1000cc - Engine Sound Pack", I have imported asset and unpacked UnityPackage, and the prefabs are missing scipts. Console:

    You are trying to replace or create a Prefab from the instance 'bike_1000ccm_helmet' that references a missing script. This is not allowed.
    Please change the script or remove it from the GameObject.

    My guess is that you have missed to include your magic script in the package :) Thanks for your reply.
     
  2. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Hi,
    Sport Bike 1000cc - Engine Sound Pack only contain wav files, it does not contain any scripts. The .unitypackage is made for Realistic Engine Sounds - Lite and for Realistic Engine Sounds - Plus assets (Pro version already containing this sound pack).
    Before unpacking that .unitypackage, you need to import Realistic Engine Sounds asset into your project. This asset contain all the needed scripts to simulate engine sounds.
    Let me know if you have more questions. :)
     
    Simunek likes this.
  3. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hello, do you have any engine sounds pack for off road vehicle apart from SUV pack? Is it possible to use the engine sounds separately?
     
  4. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Hi, currently that is the only sound pack I made for offroad vehicles, however my other sound packs may fit too for offroad vehicles, like the V8 Engine Sounds pack. Some custom built offroad vehicles have a v8 engine. :)
     
  5. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    ok thanks. Is it possible to use the engine sounds separately?
     
  6. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Yes you can use each engine sound separately. Sorry, I forgot to answer this question in my previous reply.
     
  7. mthawley

    mthawley

    Joined:
    Sep 7, 2018
    Posts:
    104
    Hi! It appears that the current NWH_RES scripts aren't compatible with NWH2. Could you please take a look?

    Cheers.
     
  8. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Hi!
    I'm currently working on that, scripting is done, prefabs and demo scenes are left to be done for the RES-Pro. For Lite and Plus versions all done.
    If you need it urgently, send me an email to info@skrilstudio.com with your invoice ID, and I will send the scripts .unitypackage for NWH2.
    Edit:
    All work is finished, prefabs, scripts and demo scenes are packed inside a .unitypackage. This update will be available in the store within a few days.
     
    Last edited: Sep 8, 2020
    mthawley likes this.
  9. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    v1.9 update is live in the store:
    RES - Lite
    RES - Plus
    RES - Pro

    Changelog:
    - Added support for "NWH Vehicle Physics 2" asset
    - Made some changes to Slider demo scene's DemoController.cs script
    - Made some minor changes in Slider demo scenes
    - Made some minor changes in RCC-RES controller script
    - Removed the following older scripts, previously used for Slider demo scenes: SetRPMToSlider.cs, MobileSetRPMToSlider.cs, DropListController.cs, DropListCntrlMobile.cs
    - Updated Documentation
     
  10. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Realistic Engine Sounds - PRO is 70% OFF for the first time since it's first release. Act fast because this offer is only valid for 48 hours!
     
    zabsv likes this.
  11. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    99
    Hi! Great engine sounds!

    FYI, I was checking under the hood and thinking about how to limit the number of audio sources being used per engine sound and noticed that it is possible for several audio sources to continuously get created and destroyed every frame which probably is not intended? For example, if gasPedalValue is very low, see what happens in the code below (check the comments):

    Code (CSharp):
    1.             if (highOnClip != null)
    2.             {
    3.                 if (highOn == null)
    4.                     // gasPedalValue not used here...
    5.                     if (highVolCurve.Evaluate(clipsValue) * masterVolume > optimisationLevel)
    6.                         CreateHighOn(); // ...so HighOn can get created here.
    7.                 if (highOn != null)
    8.                 {
    9.                     if (maxRPM != null)
    10.                     {
    11.                         if (maxRPM.volume < 0.95f)
    12.                             highOn.volume = highVolCurve.Evaluate(clipsValue) * masterVolume * gasPedalValue;
    13.                         else
    14.                             // But volume might still get very low if gasPedalValue is low.
    15.                             highOn.volume = (highVolCurve.Evaluate(clipsValue) * masterVolume * gasPedalValue) / 3.3f;
    16.                     }
    17.                     else
    18.                     {
    19.                         highOn.volume = highVolCurve.Evaluate(clipsValue) * masterVolume * gasPedalValue; // Same here.
    20.                     }
    21.                     highOn.pitch = highPitchCurve.Evaluate(clipsValue) * pitchMultiplier;
    22.                 }
    23.                 if (highOn != null)                 {
    24.                     if (destroyAudioSources)
    25.                         if (highOn.volume < optimisationLevel)
    26.                             Destroy(highOn); // So in that case, highOn gets destroyed on the same frame it was created
    27.                 }
    28.             }
    I guess there is no reason why not to just calculate the high volume once and reuse the value in every place (including in highOff calculations) which fixes that and removes duplicated code (and probably makes it slightly faster, too).
     
  12. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Hi!
    Thanks for the feedback, and thank you for the detection.

    "optimisationLevel" is used to prevent frequent audio source creation and deletion. For example if optimisationLevel is = 0.2f then high_on will only be created if it's volume is greather than that value, and high_on will be destroyed only if it's value is lower than optimisationLevel's value. It should not do both at the same time. If yes then I will need to use two different "optimisationLevel" values, one for creation and one for deletion. I will test this out later.
    The part where you commented "// But volume might still get very low if gasPedalValue is low." is the part where rew limiter is played and in that case gas pedal is at maximum value and high_on is played in a lower volume(divided by 3.3f) to fill the empty parts of the maxRPM sound clip.

    The audio destroying feature can be disabled in the prefab, this can save some performance too. (enabling the destroy feature was made for big city scenes that have many cars in it)
    I will do some test to see if VolCurve.Evaluate(clipsValue) have any performance impact, but in my code these lines only run if those if states are true/false. All of them will never run at the same time. Putting highVolCurve.Evaluate(clipsValue) outside of these lines to run constantly with all other clips' VolCurve.Evaluate in Update(), they will run even when their value is currently not needed for their sound clips. This can affect the performance more badly. If I remember good I already done this in an earlier or in the first version of the asset a few years ago and it made the code run slowly. I'm not sure, I will test this out to refresh my memories.

    I'm already working on a plan about what to re-write in the controller script for the major update. Previously I found some codes that can be reused and simplified by calling them with a one line code, but right now I'm focusing on remaking the sound packs in better quality.
     
    Last edited: Dec 14, 2020
  13. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    The following assets are now on sale till end of the year:

    Realistic Engine Sounds - Pro: http://bit.ly/3ct9LRL

    Realistic Engine Sounds - Plus: http://bit.ly/3av1ET8

    Realistic Car Shaders - Mobile: http://bit.ly/39mVLXX

    Muscle Car Engine Sounds: http://bit.ly/38k61P5

    Exotic Car Engine Sounds: http://bit.ly/3cuGhmq

    JDM Car Engine Sounds: http://bit.ly/32QzHT1

    SUV Engine Sounds: http://bit.ly/3aphNJA

    Motorbike Engine Sounds: http://bit.ly/3cvcZo0

    V8 Engine Sounds: http://bit.ly/3r72Zsr

    Diesel Truck and Bus Engine Sounds: http://bit.ly/38cGKsq

    Supercharger Sound Pack: http://bit.ly/3oXI60y
     
  14. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    @slaczky

    Im getting this error when importing the lite verision and using it with RCC v3


    Assets\RealisticEngineSound\Assets\Scripts\Demo Scene Scripts\RCCDemoScripts\SetRPMFromCarRCC_V3.cs(107,27): error CS1061: 'RCC_CarControllerV3' does not contain a definition for 'gasInput' and no accessible extension method 'gasInput' accepting a first argument of type 'RCC_CarControllerV3' could be found (are you missing a using directive or an assembly reference?)

    Assets\RealisticEngineSound\Assets\Scripts\Demo Scene Scripts\RCCDemoScripts\Mobile_RPMFromRCC_V3.cs(83,23): error CS1061: 'RCC_CarControllerV3' does not contain a definition for 'gasInput' and no accessible extension method 'gasInput' accepting a first argument of type 'RCC_CarControllerV3' could be found (are you missing a using directive or an assembly reference?)

    Thanks ! And Happy Holidays
     
  15. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Hi,
    Happy Holidays for you too!

    RCC had an update, the developer renamed "gasInput" to "throttleInput". Quick fix is to rename "gasInput" to "throttleInput" in the scripts that shows these errors. I have an update for these scripts which I not yet released. If you want this script directly from me please send an email to info@skrilstudio.com with your invoice number.

    Thanks.
     
  16. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Thanks!
     
    slaczky likes this.
  17. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
  18. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    Can you make this compatible with F-Gear Physics Engine, GRR Car Controller, and Ultimate Vehicle System?
     
  19. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Currently I do not own any of these assets, right now I can't do that. Exactly which one are you using in your project?
     
  20. sheffieldlad

    sheffieldlad

    Joined:
    Oct 9, 2013
    Posts:
    154
    @slaczky

    Any crashes reported in the editor on Unity 2021.1.2f1?

    I'm using realistic engine sounds lite. If I add a prefab to my vehicle and hit play I get a crash maybe 1 in 5 times.
    I can send along a project if needed.
     
  21. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    I never had any crashes in any Unity version with Realistic Engine Sounds.
    Which vehicle controller are you using? Are there any other assets that you're using in your project?
    Send your project to info@skrilstudio.com and I will take a look into it.
     
  22. sheffieldlad

    sheffieldlad

    Joined:
    Oct 9, 2013
    Posts:
    154
    I've rolled my own vehicle controller. I'm about to remove REL and run my game a few times in the editor.
    If it works ok I'll re add REL and try again.
    I'll let you know how it goes and if I'm still having trouble with REL I'll send my project on to you.
    Many thanks,
     
  23. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Electric Car Sounds just got released to the Unity Asset Store with a -10% discount!

    CardImage_420x280.png


    This asset has it's own sound controller script and it is not connected to Realistic Engine Sounds asset.
    Compatibility for vehicle physics controllers will come in future versions.
     
  24. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Please update realistic engine sounds lite
     
  25. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Realistic Engine Sounds - Lite was updated on April 12. Currently live version is v1.10.
    Please let me know if you found any issue or bug that needs to be fixed.

    Make sure you have downloaded the latest version, there is a bug with the Unity's package manager when it will import the older version from cache even if a newer version is available for download.
     
    mattis89 likes this.
  26. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I use it with Realistic car controller
     
  27. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Download the latest version which is compatible with the latest Realistic Car Controller. If you experience the above mentioned Unity bug, you need to delete locally the downloaded old version from ../AppData\Roaming\Unity\Asset Store-xx folder.
     
    mattis89 likes this.
  28. BMarques

    BMarques

    Joined:
    Aug 30, 2013
    Posts:
    11
    What is the carMaxSpeed property needed for? I've been looking at the source code, I don't see it being used anywhere, but it's being set in the vehicle's prefabs like VPP or unity car.
     
  29. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    It is used for Straight Cut Gearbox script.
     
  30. BMarques

    BMarques

    Joined:
    Aug 30, 2013
    Posts:
    11
    Thanks, is that part of the Lite package? I can't find it.
     
  31. BMarques

    BMarques

    Joined:
    Aug 30, 2013
    Posts:
    11
    Nevermind my question, just saw it on the first post :).
     
    slaczky likes this.
  32. ivug

    ivug

    Joined:
    May 24, 2021
    Posts:
    1
    @slaczky does the PRO version fixed the "mosquito" sound issue reported by a reviewer?
     
  33. mthawley

    mthawley

    Joined:
    Sep 7, 2018
    Posts:
    104
    @ivug I had a similar problem when the player was inside the car. I resolved it by setting the spatial blend very low on the player car but leaving it at 1 for the external AI cars.
     
  34. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    No, that will be solved when all wavs will be replaced in the major update. That "mosquito" sound is not an issue, I designed the most audio files to sound like that by adding some distortion fx and other sound effects to them. When I made this asset I wanted to make it sound more aggressive, more racecar like because at that time I needed that for my game project.

    The 2.0 version will have a feature to change each sound packs "aggressivity", like this the most sound packs will fit into multiple games.
     
  35. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    n00b_013 likes this.
  36. n00b_013

    n00b_013

    Joined:
    Dec 20, 2020
    Posts:
    14
    Great to see only 5 star reviews on your package, decided to give it a go!
    Very curious to see what this can bring to my game.

    Though, imported the package and immediately i get an error about the Camara namespace for the IRDS:
    Code (CSharp):
    1. Assets\RealisticEngineSound\Assets\Scripts\Demo Scene Scripts\iRDS_Demo_Scripts\CameraContrl.cs(18,10): error CS0234: The type or namespace name 'Camara' does not exist in the namespace 'IRDS' (are you missing an assembly reference?)

    What i've done:
    1. Create project
    2. Import IRDS
    3. Import Realistc Engine Sounds Pro
    4. Import (execute) the iRDS_RES-Pro
    5. error..
    6. re-import the packages, same issue.

    So basically my questions:
    • And how can i fix the namespace error for CameraContrl.cs for usage with IRDS?

    Kind regards,

    n00b
     
    Last edited: Jul 29, 2021
    slaczky likes this.
  37. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Hi n00b,

    Sorry to hear that you have issues with my asset when it is used with iRDS. The compatibility made for iRDS source version which works without any errors with RES. It seems like the dll version of iRDS is a little different from the source version, it does not use any namespaces. I did not know this till today.
    The fix is to remove "IRDS.Camara." namespaces in CameraContrl.cs script. In "iRDS_RES-Pro" and in "iRDS_RES-Pro_mobile" scenes the car might lost all of it's connection with iRDS scripts, this can be restored or open an original iRDS demo scene and drag and drop a RES prefab on the player's car.

    I sent a reply to your email too, and sent the modified CameraContrl.cs script there.

    Let me know if you have any other question.

    Kind regards,
    Attila
     
    n00b_013 likes this.
  38. n00b_013

    n00b_013

    Joined:
    Dec 20, 2020
    Posts:
    14
    Thanks a lot for the quick response and all the help provided!!

    For those struggling with the same issue [DLL Version of iRDS and Realistic Engine Sounds].

    Code (CSharp):
    1. Assets\RealisticEngineSound\Assets\Scripts\Demo Scene Scripts\iRDS_Demo_Scripts\CameraContrl.cs(18,10): error CS0234: The type or namespace name 'Camara' does not exist in the namespace 'IRDS' (are you missing an assembly reference?)
    2.  
    Here is the updated code for the CameraContrl.cs script :

    Code (CSharp):
    1. //______________________________________________//
    2. //___________Realistic Engine Sounds____________//
    3. //______________________________________________//
    4. //_______Copyright © 2019 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.  
    14. public class CameraContrl : MonoBehaviour
    15. {
    16.     public GameObject exterior;
    17.     public GameObject interior;
    18.     IRDSCarCamera irdsCam;
    19.  
    20.     void Start()
    21.     {
    22.         irdsCam = Camera.main.gameObject.GetComponent<IRDSCarCamera>();
    23.     }
    24.  
    25.     void Update()
    26.     {
    27.         // check current camera position
    28.         if (irdsCam.target.name == "ExteriorViewN")
    29.         {
    30.             exterior.SetActive(true);
    31.             interior.SetActive(false);
    32.         }
    33.         if (irdsCam.target.name == "ExteriorViewF")
    34.         {
    35.             exterior.SetActive(true);
    36.             interior.SetActive(false);
    37.         }
    38.         if (irdsCam.target.name == "FrontBumper")
    39.         {
    40.             exterior.SetActive(true);
    41.             interior.SetActive(false);
    42.         }
    43.         if (irdsCam.target.name == "WheelRight")
    44.         {
    45.             exterior.SetActive(true);
    46.             interior.SetActive(false);
    47.         }
    48.         if (irdsCam.target.name == "WheelLeft")
    49.         {
    50.             exterior.SetActive(true);
    51.             interior.SetActive(false);
    52.         }
    53.         if (irdsCam.target.name == "Roof")
    54.         {
    55.             exterior.SetActive(true);
    56.             interior.SetActive(false);
    57.         }
    58.         if (irdsCam.target.name == "InteriorMiddle") // interior
    59.         {
    60.             exterior.SetActive(false);
    61.             interior.SetActive(true);
    62.         }
    63.         if (irdsCam.target.name == "Driver") // interior
    64.         {
    65.             exterior.SetActive(false);
    66.             interior.SetActive(true);
    67.         }
    68.         if (irdsCam.target.name == "Hood")
    69.         {
    70.             exterior.SetActive(true);
    71.             interior.SetActive(false);
    72.         }
    73.     }
    74. }
    75.  
    Kind regards,

    n00b :D
     
    slaczky likes this.
  39. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    City Car Sounds - an add-on engine sound pack for Realistic Engine Sounds just got released!
    Get it here: https://bit.ly/3nrSd01

    1 CardImage_420x280.png

    City Car Sounds is in advance compatible with the currently not yet released V2 version of Realistic Engine Sounds, that's why it's each engine sound pack has way more wav files than any other previously released engine sound pack.
    V2 version of Realistic Engine Sounds is still under development.
    Here is a video of City Car Sounds being used with Realistic Engine Sounds V2 and with Vehicle Physics Pro:

    Realistic Engine Sounds - Pro is currently 70% off!
    Get it here: http://bit.ly/3ct9LRL
     
  40. celaeno

    celaeno

    Joined:
    Jan 31, 2013
    Posts:
    64
    Hello,

    when the audio listener is attached to a camera without the MainCamera tag or attached to a gameobject, there is no sound.

    Do you maybe know a solution?

    Thanks
     
  41. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    Hi,
    Add the camera by hand to RES prefab's "mainCamera". If the audio listener is attached to a gameobject then it will not work with the currently released RES version without editing it's script. For current version audio listener needs to be attached to a camera.
    This solution is used for audio optimisation, it will be redesigned in the next version.
     
  42. AndrewJamesBowen

    AndrewJamesBowen

    Joined:
    Oct 10, 2013
    Posts:
    13
    Yes, would love this to be fixed in next version :)

    I was reusing a Synty scene and they didn't have the MainCamera set to the camera. I was bashing my head for an hour working out why the sound wasn't working...
     
  43. schaefsky

    schaefsky

    Joined:
    Aug 11, 2013
    Posts:
    90
    Hi, I am using RES v2 with NWH Vehicle Physics 2.
    The "NWH2 to RES2" script seems to be muting or deactivating all the other NWH sounds other than the enigne sound (like tire squeal, transmission noise and so on).
    If I press pause and deactivate the "NWH2 to RES2" gameobject, the other NWH sounds (other than engine sound) reappear. Also when changing from inside to outside view the other sounds sometime reappear for a second or so, but then get quiet again. So it might be that the other NWH2 sounds get quiet when RES2 updates the samples for different RPMs, not sure though.
     
  44. slaczky

    slaczky

    Joined:
    Sep 26, 2015
    Posts:
    224
    In your Project Settings/Audio try increasing "Max Virtual Voices" and "Max Real Voices". Your scene might reached the maximum of these.
    I can't reproduce your problem in both NHW2 and RES2 demo scenes, so my only gues is you reached the maximum of virtual and real voices.
     
    schaefsky likes this.
  45. schaefsky

    schaefsky

    Joined:
    Aug 11, 2013
    Posts:
    90
    Thanks, that seems to have been the issue.
     
    slaczky likes this.
  46. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064