Search Unity

Games Vehicle Physics Simulation (Update 20-Feb-17 Terrain Editor Preview 1)

Discussion in 'Works In Progress - Archive' started by AndersOrum, May 6, 2015.

  1. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Hello everybody.

    I want to show you all my WIP project, a custom made vehicle physics system, capable of simulating any type of landbased(for now) vehicle you can think of (cars,trucks,trains,cranes,excavators etc.)

    It's still at a very early stage, especially things like the terrain/scenary, UI, sounds and such things are all just placeholders, and the same for some of the vehicles in my videos.

    I'm the only programmer/developer on the project, but with help from a great 3d artist (Arraial).

    Any kind of feedback is appreciated, but as mentioned above much of the visuals is temporary/placeholder so try to ignore that.

    Here is a couple of videos showing some different vehicles, unfortunately most of my videos is outdated quite a bit, but i will be updating with new videos frequently so keep your eyes open.

    More videos can be found on my Youtube channel : https://www.youtube.com/user/AndersOerum

    -Anders Ørum










     
    Last edited: May 18, 2015
  2. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    And just a few more videos, they couldn't fit into the start post.







     
    ZiadJ, John-G and mgear like this.
  3. JA_555

    JA_555

    Joined:
    Jul 10, 2014
    Posts:
    27
    I watched three of the videos and it looks great, my only question is why isn't it being released tomorrow
     
    cholasimmons and Slipangle like this.
  4. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Thank you, hehe no it isn't ready yet, there is still alot of things i want to add/improve. But i will soon release a small tech demo ;)
     
  5. GameReady3D

    GameReady3D

    Joined:
    May 19, 2011
    Posts:
    90
    Very impressive demo videos. Please continue developing and release it in Unity asset store soon.
     
  6. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Thank you, i'm sorry but currently i have no plans to release it on the asset store.
     
  7. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Hi finally time for an update!

    Renualt Premium 420, pulling log trailer with 12 big logs.

     
  8. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Would make a great asset store package. But good luck with your project, looks real interesting.
    Will be keeping an eye on it :)
     
    AndersOrum likes this.
  9. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    This looks really fun! Combine this with some interesting terrain effects (tread/skid marks, dirt/mud compression) and you got yourself a great game! Call it Haulin' and build a modding kit for players and you'll be a millionaire in no-time :D
     
    t0xic0m and AndersOrum like this.
  10. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Hi thanks for the great feedback, i hope to add all the terrain effects you mention, mod support is definately planned aswell, and Haulin that's actually not bad for a name, i'll consider that thank you ;)
     
  11. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Update! Testing new terrain deformation system, still very simple and rough but it's a start ;)

     
    John-G and Mister-D like this.
  12. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Looks awesome. Feels like an spin tires fork has hit unity. I love it. May be it takes a bit long for the terrain to collapse.
     
    AndersOrum likes this.
  13. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Wow that was quick! This looks like a great start for deformation and overall terrain integration! Can't wait to see where this goes. :)
     
    AndersOrum likes this.
  14. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Thank you, yes the deformation is a little delayed, but i'm currently working on improving on that.

    Hehe yeah i decided to give it an other try yesterday ;)
     
  15. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Give us web demo man. . . . :D
     
    t0xic0m likes this.
  16. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    Hey man, it's the most amazing Véhicule and Terrain I have seen.
    Congratulations!!!!
     
  17. Hoschomatic

    Hoschomatic

    Joined:
    Mar 26, 2013
    Posts:
    2
    Thats really awesome Work!

    Since physx 3.xx vehicles are S*** i wondered if you could give me a hint what magic did you use?
    Bulletphysics / your own physic lib stuff? or did you hack physx 3.xx and made your own models based on that?
    Especially interesting for me is how did you solve the sweep test for the wheels? Your jeep wheels wont go into the rock and your actually climbing at 90 degree angles Or otherwise said how did you solve the realisstic collision so it dont look like a cheap 4 raycast model car at all?


    I had to put my own project on hold because of what nvidia ships with physx.
     
    Last edited: Aug 21, 2015
  18. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    125
    Awesome work, I look forward to seeing this system evolve.
     
  19. Haagndaaz

    Haagndaaz

    Joined:
    Feb 20, 2013
    Posts:
    232
    I'd definitely pay money to use these physics on the vehicles in my projects, looks amazing!! And the vehicle models themselves are also quite beautiful too :)
     
  20. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Hi i'm back again with more news!

    I've been working on a new Wheel Collider lately, and i've finally reached the point where i'm ready to show you guys.
    The focus of this wheel collider is on physics based tire deformation, this is not just a visual effect the actual wheel collider is deforming aswell, it still looks a little rough but it's getting there.

    !Notice: The softness of the tires is exaggerated a little in the video to make the deformation more visible.
     
  21. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Looking good.
     
    AndersOrum likes this.
  22. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    looking great! Do the tires wear or take damage? I can't imagine that rock obstacle course was very kind on them :)
     
    AndersOrum likes this.
  23. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Currently there is no such features, but they are definately getting on my idea list, thanks ;)
     
  24. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Did you check this out?

    http://www.gamasutra.com/blogs/Pave...ng_and_simulation_in_offroad_driving_game.php

    I think what I would do eventually is use a normal Unity terrain and then in certain locations of a detailed mesh on top of the terrain that uses a texture to determine vertex position changes on the GPU. So as the vehicle is driving over this detailed mesh, using whatever math is needed, modify the texture which then results in the vertices moving via the shader.

    A 256x256 texture for a 10mx10m detailed mesh would be 25 pixels per meter, which is 0.64 pixels per INCH which is easier for me to understand. That's pretty detailed in my opinion.

    What do you think?
     
  25. Dreamaster

    Dreamaster

    Joined:
    Aug 4, 2014
    Posts:
    148
    So you are building this system for use in your own game then?
     
  26. IAmCraigSnedeker

    IAmCraigSnedeker

    Joined:
    Jul 20, 2014
    Posts:
    117
    Looks awesome! Subbed.
     
    AndersOrum likes this.
  27. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Hi, yes i've already looked a little at that article, your suggestion sounds like a good way to go with this, and it's probably much the same approach used in Spintires. Thanks for the feedback.
     
  28. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Yes exactly ;)
     
  29. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Would modifying the mesh vertices in scripting, which would force a push of the new mesh to gpu, be more efficient than updating a texture and then sending that to gpu, every x frames?
     
  30. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    I'm not quite sure to be honest?
     
  31. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Hi, another update on the tire physics, i've improved handling and stability of the tire which gives vehicles much better handling at higher speeds, also improved the visual deformation.

     
    t0xic0m likes this.
  32. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Time for another update,

    I'm working on implementing Truss Softbody Physics with my vehicle system, currently working on the tires but i will soon start work on softbody based suspension and chassis aswell.

    Toyota FJ40:


    Mtvr:
     
    elias_t, mensch-mueller and mbowen89 like this.
  33. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Looking good man!!
     
    AndersOrum likes this.
  34. StephenL

    StephenL

    Joined:
    Oct 18, 2010
    Posts:
    218
    Very nice!
     
    AndersOrum likes this.
  35. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Hi guys, time for an update again.

    All Powertrain/Drivetrain (Engine, Gearbox, TransferCase, Differentials etc.) code is completely reworked since last videos and is now based on real ratios & values, but it's still a work in progress(at 2.05 & 5.00 differentials are locked which is the reason for the suddon power/traction)

     
    Cristineltr and John-G like this.
  36. Hwaus

    Hwaus

    Joined:
    Mar 21, 2013
    Posts:
    13
    Something like this was on the asset store before. I can't find it anymore.
    FYI, when you see an awesome asset on the store, get it while you can, sometimes devs will take it down out of no where.
     
  37. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
  38. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Just a little video of me playing around and trying to transport some logs, it's not as easy as it sounds:p


    Part 2:
     
    mbowen89 and Cristineltr like this.
  39. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Here's a small showcase of my tire physics with soft settings applied to them.

     
    JNKC and Alex_V like this.
  40. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Those are almost like jello filled tires. Are you over exaggerating it a bit just so show it off?
     
    emergki likes this.
  41. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Yeah i'm exaggerating the softness a bit to show it off ;)
     
    emergki likes this.
  42. Cristineltr

    Cristineltr

    Joined:
    May 15, 2016
    Posts:
    13
    The lateral movement of the tire is not that far from reality
    Check out this video from 0:11

     
    AndersOrum and emergki like this.
  43. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Wow that's pretty insane. That's definitely a very specific application though, I'm pretty sure most tires don't act like that, especially on the offroad trucks he's normally showcasing! But the fact it can do it, and can be tweaked to change for all vehicle simulations, is great!
     
  44. Cristineltr

    Cristineltr

    Joined:
    May 15, 2016
    Posts:
    13
    Are the rims also using truss physics or are they rigid bodies?
     
  45. cholasimmons

    cholasimmons

    Joined:
    Dec 17, 2015
    Posts:
    3
    share this awesomeness already!! ;)
    my game won't make sense without this lol.
    outstanding stuff Anders. <3
     
  46. cholasimmons

    cholasimmons

    Joined:
    Dec 17, 2015
    Posts:
    3
    are you using Unity's WheelCollider or have you implemented your own awesome Collider?? :)
     
  47. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Sorry i thought i already had replied to you, the new forum layout got me confused i just realized now they rolled back to the old :confused:

    Anyway yes the rims is also made with Truss physics but they aren't setup to deform.
     
  48. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    This is my own wheel collider built with Truss physics.
     
  49. AndersOrum

    AndersOrum

    Joined:
    Aug 31, 2014
    Posts:
    49
    Good news! I'm finally working on full softbody simulation of my vehicles, here's a little video of an early test.

     
  50. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Looks great! I love following your progress :)
     
    AndersOrum likes this.