Search Unity

Vehicle Physics Pro beta, feedback welcome

Discussion in 'Works In Progress - Archive' started by Edy, Jan 22, 2016.

  1. Cristineltr

    Cristineltr

    Joined:
    May 15, 2016
    Posts:
    13
    Does the truck have solid axle suspension and cabin suspension?
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Not in that example, but could be easily implemented with a couple of VPVehicleJoint components.
     
  3. JeriUnity

    JeriUnity

    Joined:
    Dec 4, 2015
    Posts:
    3
    In regards to the VPVehicleJoint can that include any kind of joint like spring? Do you discuss that in greater detail somewhere?
     
  4. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Speaking of suspensions, generally most cars have McPherson suspensions for their rear axle, these suspensions act differently, when they are under pressure the wheel -as is shown below in the video - kinda goes forward. Now I was wondering if it is possible to recreate this behavior in VPP or not.

    Watch the video here. It was hard to find a good video, I guess that video is good to see what I mean.
     
  5. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Yes, you can configure a damped-spring behavior with adjustable rates, and optionally a maximum force to be applied for keeping the parts together. VPVehicleJoint is a convenient wrapper that creates ConfigurableJoint components in runtime.

    That's not a McPherson suspension, but a trailing arm suspension. In that video the pivot is at the bottom of the chassis, so the wheel moves forward as its center rotates above the pivot point.

    I can speak of it directly, as my own car (Citroen C5) has a dynamic suspension with McPherson-type set-up at the front wheels and trailing arm at the rear wheels. When I extend or compress the suspension to its limits then the front wheels (McPherson) move vertically, while the rear wheels (trailing arm) also experience a slight longitudinal displacement.

    Still, in VPP the current suspension set up is the simple vertical setup provided by the WheelCollider. I plan to experiment with advanced suspension types in a later version.
     
    imDanOush likes this.
  6. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Thanks for the info. Glad to hear that the "later versions" would have those kind of suspensions.
    My own car is exactly like yours - in case of the suspension setup, well it is not pneumatic (or dynamic) - (I have Peugeot 405 Persia) but I believe I was wrong in calling the suspension names :) .
     
    Last edited: Jun 22, 2016
  7. mikko_to

    mikko_to

    Joined:
    Oct 14, 2013
    Posts:
    21
    Hi Edy!

    Any rough guesses when the first version of VPP is released or is there still some major features to be implemented? Eagerly looking for that standard version. :)
     
  8. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Estimated date is late September. The last feature planned for this release is the Steering Aid, and it's nearly completed. Next step is preparing the demo scenes, examples, 3D, and wrap up the package.
     
  9. mikko_to

    mikko_to

    Joined:
    Oct 14, 2013
    Posts:
    21
    Awesome! All the best for that last stretch and hope you can celebrate this big milestone soon!
     
  10. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    I want the free version of this asset for now.
     
  11. mikko_to

    mikko_to

    Joined:
    Oct 14, 2013
    Posts:
    21
    Hi! Looking through Audio add-on component and testing demos, do you have plans to update the engine sounds to be more versatile? Mainly, it would be great if there was the possibility to use different samples for engine under load, engine no load (like releasing the throttle while driving) and engine idle.

    Trying to achieve a decent sound for those situations with just one sample feels quite tricky. Pitch and volume don't seem to give enough room to play and even with good sample the engine sounds to be missing that "something".

    Then again, those engine extras (turbo & transmission) bring a really nice touch! One nice addition would be to have that exhaust backfire (burning fuel in exhaust) sound when releasing throttle from load.

    EDIT: Out of interest, a question about Unity 5.5: Does the update to Physx 3.3.3 bring any positive/negative changes regarding VPP?
     
  12. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    @mikko_to The engine audio and effects for Vehicle Physics Pro will be provided by The Audio Guys:


    I agree on the current audio component being very simple. Still, it can be used as example for writing a custom audio component. I plan to improve the included engine audio component for combining several samples. It won't be included for the first release though.

    No significant changes. The new contact manifold system seems to bring slightly more realistic reactions on impacts, but there's no changes on the WheelCollider at all.
     
  13. mikko_to

    mikko_to

    Joined:
    Oct 14, 2013
    Posts:
    21
    Great! Maybe they can also provide some tips on how to improve the audio component when you have time to fiddle on that.

    Just noticed when trying the Ferrari Playground demo with manual gears: When revving the engine on neutral / clutch pressed, revs take quite long to go up and down (testing with keyboard), as if the flywheel would be really heavy. Also, when the car is upside down (definitely the most common thing in car games ;)), it feels that tire inertia doesn't affect it either, revs take about the same time to go up/down with engaged gears or neutral. Design feature or something what we can affect?

    Good to hear about Physx 3.3.3! Still lots of work before the first release of VPP?
     
  14. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    The settings for the Ferrari are complete and shamelessly invented. :p Try reducing the engine inertia value for a lighter flywheel.

    Wheel mass indeed affects the rev time. But the actual mass is quite small compared with the engine power, so the effect result mostly negligible. Try putting a lot of mass in the wheels (x10, x100) and you will definitely notice it.

    No more features will be developed for this release. I'm now preparing the 3D models, art, scenarios, examples, tutorials, etc. I'm also writing a blog post on the latest developed features.
     
    mikko_to likes this.
  15. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    It's been a long time that we've heard about this package. Could we say that hopefully it is near to the final release date?.
     
  16. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Yes! I'm writing a blog post with the latest news and developments. In addition, new demos for mobile and desktop will be released hopefully this month.

    I'm working on preparing all included assets, 3D, example scenes, tutorials, etc.
     
    CoderPro and Soul-Challenger like this.
  17. Soul-Challenger

    Soul-Challenger

    Joined:
    Dec 30, 2010
    Posts:
    152
    Just tried out your demos and I have to say the driving feels quite nice. Been very happy using CarX for my game but can imagine switching to your system - just need to test your physics on my cars to be able to compare. Keep up the great work! :)
     
    Last edited: Feb 14, 2017
    Edy likes this.
  18. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Hi, @Edy , Anychance for mac build demo version ? I am using mac os, could not test the current demo.

    p/s: Your physics are using Unity's built in Wheel Collider or Custom Collider ?
     
  19. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    @CoderPro Yes, I'll build the upcoming demo for Mac as well.

    VPP currently uses a standard WheelCollider for the suspension and contact detection.
     
  20. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Waiting for mac demo version.

    Anyway, when you release your kit ? I was waiting it for long time.
     
  21. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    As soon as the demos are completed. It's the last step for the release. Demos will include the sample vehicles, code, UI, etc so they will be a perfect kickstarter to Vehicle Physics Pro.
     
    CoderPro likes this.
  22. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Yes. And now, waiting for mac demo version !
     
  23. grim2594

    grim2594

    Joined:
    Nov 5, 2010
    Posts:
    104
    Any way to get on a mailing list, for when this launches? I'd like to be one of the first to purchase. ;)

    (I don't use Twitter...)
     
  24. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    You may create a rule on If This Then That (IFTTT) so you could get an email whenever I post a new tweet.

    - The trigger would be Twitter > New tweet by a specific user (@vehiclephysics)
    - The action would be Email > Send me an email
     
  25. grim2594

    grim2594

    Joined:
    Nov 5, 2010
    Posts:
    104
    Cool, thanks!
     
  26. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    When VPP release ?
     
  27. mikko_to

    mikko_to

    Joined:
    Oct 14, 2013
    Posts:
    21
    Hi Edy! Work still in progress? Any unexpected difficulties from new Unity versions? All the best for any development activities!
     
  28. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,609
    Any updates? Been waiting for this!
     
  29. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Any chance for mac os version demos ?
     
  30. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Thanks for your interest!!

    Intense work in progress! I'm dedicating the first half of the year exclusively to the documentation, tutorials, example vehicles, 3D models, demos, etc. Yes, Mac OS demos will be available as well. I'll develop a complete example scene where you can choose the vehicle, control method and location. Then I'll build the demos out of it.
     
    Elecman likes this.
  31. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,490
    Hi, not sure if this has been asked before, do you ever plan to implement some form of softbody tire system, even if it is faked (e.g. wheel radius calculation or different meshes shown if bump is hit), just hoping :)
     
  32. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Yes, a visual deformation system for the tires is on the works. There's an initial prototype working already, but it still needs some polishing.
     
  33. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,490
    Whoah! I'd love to know / test more! If you need any testers please count me in :)
     
    Edy likes this.
  34. Dreamback

    Dreamback

    Joined:
    Jul 29, 2016
    Posts:
    220
    Hey Edy, love Vehicle Physics Pro - my team has been using it for over a year, and it’s been working great, exactly what we need. Here’s my question: we originally downloaded VPP back in late 2016, and due to a few factors, we’ve never downloaded an update. In the last year, has the solver been optimized for better speed? We often have 50 cars in our scene, and it really brings our framerate down, even though most of the cars only use 1 integration step (the player car uses 2). I’m wondering if we’ll get a noticeable performance increase with a new version.
     
  35. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    @Dreamback Thanks! A commit dated 08/12/2016 introduced a significant optimization that removed a RayCast per wheel. That should make a difference. Also, a further optimization run is pending. This one should improve the performance even further.
     
  36. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    682
    Hi,

    Does anyone have any tips for setting up wheel and pedals with Vehicle Physics Pro?

    I'm a long time owner of VPP but don't have much experience with it, so apologies if I'm going over old ground.

    I have a Fanatec Club Sport Wheel Base and Pedals which are regarded as two different devices on Windows (and I assume its common for the pedals and wheel to be different devices?).

    Attaching one VP_Device_Input component to the car gives me the wheel functionality but the pedals dont do anything.
    It then occurred to me that I may have to add another VP_Device_Input with Selected Device to 1 instead of 0, to get input from the pedals. But still having problems.

    I'm trying to get a video together driving round a CityGen3D scene using VPP, and it was daft using keyboard input when I have the hardware, so thought I'd try and set it up :)

    I'm just using a VP_Device_Input setup from one of the demos, which seems to support Thrustmaster and G27 devices.
    But I'm basically just wondering about the workflow for getting my device to work properly.

    Any advice gratefully received!


    Edit:
    Looking into it more, I can get pedals input by only having one VP_Device_Input and Selected Device set to 1, but then I obviously lose the input from the wheel. I get that with Selected Device at 0. But having two VP_Device_Input components (0 and 1) doesn't seem to get the input from both. In that situation they both return input from the wheel despite having different Select Device values.

    I assume a vehicle is intended to only have one VP_Device_Input component attached, so not sure if there's a workaround for this as I need input from two devices. Maybe the Fanatec system is less common than I thought and most wheels and pedals are regarded as one USB device (and therefore data for both is passed through one VP_Device_Input component)?

    Does VPP support input from several devices and I'm just approaching it wrong, or is this unsupported?

    Thanks,

    Richard
     
    Last edited: Apr 25, 2018
  37. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    VPDeviceInput is currently hard-coded with the mappings for Logitech G27 and Thrustmaster T500 RS. It's planned to update the component to a more generic system supporting custom mappings. For now, you may just clone the VPDeviceInput component to a new component, then modify it to use the mappings of your device. You may get the device identifiers by enabling Debug Info in the component in Play mode.
     
    CityGen3D likes this.
  38. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    682
    Thanks for your reply Edy. Just to clarify, are you saying it should be possible to get both the wheel and pedals input via one modified VPDeviceInput. Or I need two modified VPDeviceInputs attached to the vehicle?

    My issue is very specifically that the pedals and wheel are two separate USB devices and its seemingly not possible to get both inputs via one component if they are different USB devices.
    I've used the debug info and I can see the pedal inputs work, or the wheel inputs work (depending on whether the VPDeviceInput is referencing the wheels or pedals USB device), but I cant get them to work together at the same time.

    I assume the other two supported devices are getting all inputs (wheel and pedals) via one USB device. I can imagine any wheel/pedals system that is considered one USB device by Windows is relatively easy to configure. But I'm struggling with the Fanatec setup. Not sure if anyone else has come across this issue, but it maybe very specific to certain devices where the pedals and wheels are different USB devices with their own connection to the PC.
    (Or its a common situation and I'm just going about it wrong!)
     
  39. Dreamback

    Dreamback

    Joined:
    Jul 29, 2016
    Posts:
    220
    We have three different sets of steering/pedals, and only one of them (Logitech) has wheel and pedals in one device. The other two have them as two separate devices (and they need different settings anyways to make sure all three sets work roughly the same), so we made our own input system, inheriting from VehicleBehavior, replacing VPDeviceInput. That one input system uses a separate “pedalInputDevice” and “steeringInputDevice”, for example:

    Code (CSharp):
    1. pedalInputDevice_.GetStateUpdate(out m_pedalstate);
    2. steeringInputDevice_.GetStateUpdate(out m_state);
    3. ...
    4. float steerInput = steeringInputDevice_.GetWheelValue(m_state);
     
    Last edited: Apr 26, 2018
    CityGen3D likes this.
  40. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    682
    Thanks for your reply Dreamback, I really appreciate it. It's reassuring to see how you did it and I'll take the same approach.
    My only worry now is that I'll get it working and spend too much time street racing around my scenes trying to beat my best laps! :)
     
  41. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Is this system only for flat terrain?

    I have tried to make a mesh deformation system, but since the WheelCollider component contains only one Raycast, the deformation of the tire becomes bad on uneven terrain.
     
  42. Noa3

    Noa3

    Joined:
    May 29, 2012
    Posts:
    84
    i want to ask, where are the files for the D-BOX Motion Cueing System ?
     
  43. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Yes, it will be assuming flat terrain. A more generic system would involve some kind of softbody physics, which is out of scope at the moment.

    Repository Vehicle Physics Specialized Assets (available in the Enterprise license).
     
  44. Noa3

    Noa3

    Joined:
    May 29, 2012
    Posts:
    84
    hi,
    i try to make a delayd input for your system but it works not very well.

    i have:
    Code (CSharp):
    1.     private void FixedUpdate()
    2.     {
    3.     StartCoroutine(ApplayDelaySteer(.5f));
    4.     StartCoroutine(ApplayDelayGas(1f));
    5.     StartCoroutine(ApplayDelayBrake(1f));
    6.     }
    7.  
    8.  
    9.     private IEnumerator ApplayDelaySteer(float HowMuchTime)
    10.     {
    11.         float vehicleSteer = vehicle.data.Get(Channel.Input, InputData.Steer) / 10000.0f;
    12.         yield return new WaitForSeconds(HowMuchTime);
    13.         vehicle.data.Set(Channel.Input, InputData.Steer, (int)(vehicleSteer * 10000));
    14.     }
    15.  
    16.     private IEnumerator ApplayDelayGas(float HowMuchTime)
    17.     {
    18.         float vehicleThrottle = vehicle.data.Get(Channel.Input, InputData.Throttle) / 10000.0f;
    19.         yield return new WaitForSeconds(HowMuchTime);
    20.         vehicle.data.Set(Channel.Input, InputData.Throttle, (int)(vehicleThrottle * 10000));
    21.     }
    22.  
    23.     private IEnumerator ApplayDelayBrake(float HowMuchTime)
    24.     {
    25.         float vehicleBrake = vehicle.data.Get(Channel.Input, InputData.Brake) / 10000.0f;
    26.         yield return new WaitForSeconds(HowMuchTime);
    27.         vehicle.data.Set(Channel.Input, InputData.Brake, (int)(vehicleBrake * 10000));
    28.     }
    29.  
    can you help me and fix this pls?
     
  45. TeddyGad

    TeddyGad

    Joined:
    Sep 12, 2017
    Posts:
    74
    Awesome- I liked the tire/smoke effects
     
  46. Ecocide

    Ecocide

    Joined:
    Aug 4, 2011
    Posts:
    293

    This won't work because you start the coroutines every frame. What exactly do you want to achieve?
     
  47. Noa3

    Noa3

    Joined:
    May 29, 2012
    Posts:
    84
    hi, thx for your replay. i want to delay the input. now i found a way but iam not happy with it. maybe someone here have a nice solution
     
  48. Ecocide

    Ecocide

    Joined:
    Aug 4, 2011
    Posts:
    293
    If everything should be moved you should check out Queues. Fill a queue with the input every frame and for example in a coroutine wait that time and send all the information to VPP and take it out of the queue.
     
  49. FrikkieRSA

    FrikkieRSA

    Joined:
    Mar 30, 2017
    Posts:
    27
    Can someone please help me?

    I recently updated from Windows 7 to Windows 10, but now my G29 steering wheel isn't working with the VPP alpha demos. I believe it is something with the SDK not picking up a dll from dx11. Is someone else experiencing this problem?

    Another strange thing: before the demos used to crash if the steering wheel wasn't plugged in, but now it starts up fine with no crash.

    The Logitech SDK for Unity also doesn't pick up the wheel.

    I really enjoyed the VPP demos and really want to get this working.
     
  50. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Demos are old and don't work quite good with new Logitech wheels and Oculus SDKs. I'm now working on updated demos.