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

[RELEASED] Truss Physics for Unity3D. Soft-body simulation plugin.

Discussion in 'Assets and Asset Store' started by Heartbroken, Aug 22, 2015.

Thread Status:
Not open for further replies.
  1. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    Contact : facerougex@gmail.com
    This body is not elastic, it is as if it is squeezed
    https://mega.nz/#!ZaYhzKiC!Fn_FajYt0cjx5XRcCLdAMj3rNDOWYew2NYKXgOfWgv8
    https://mega.nz/#!8SI1wapC!d_88HowFvd5xqm9crLynkey9cQCr3St63MpiD5WvkOc
    https://mega.nz/#!FCZH2YSD!jJqZyl1SAKZupkqI7GKQMaxlcej3o9oG4Epu_kdOfrw
    https://mega.nz/#!BWATyKSB!aw35EI-GU-xIB7flPmz7RjjRXj877eD39wUYQ0qUGKo
     
  2. ASDev

    ASDev

    Joined:
    Dec 9, 2012
    Posts:
    48
    My wheel has 130 nodes and 450 links, but it runs much faster, about 280-300 FPS

    upload_2019-2-22_17-7-18.png
     
  3. ASDev

    ASDev

    Joined:
    Dec 9, 2012
    Posts:
    48
  4. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    It's working just fine
    No bugs there, it's working just as it should do, it's floppy because you need more beams/links inside the door truss, think of them as support beams holding a wall up. ASDev is right, I'd setup a single softbody car first.
     
  5. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    I add Truss Soft Body and Edit beams nodes etc but wrong
    Please can you for me make videotutorial on Youtube how setup TrussPhysics for vehicles ? :( i need tutorial
     
  6. ASDev

    ASDev

    Joined:
    Dec 9, 2012
    Posts:
    48
    Truss physics has examles. Take box truss from examples, look at this, on its links. Extend it with nodes and links and then you can form truss body from it for car body
     
  7. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    This is exactly how I learned how to build Truss objects, the examples, start with basic object first.
     
    Shadow-X6 likes this.
  8. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    I have tried everything but the body behaves differently than I doing something wrong and I just need a brief tutorial how to proceed I just need help
     
  9. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    I tried that
    I've built a car and then the body is pressed
     
  10. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Can you please send a photo of the car compressing, and a detailed pic of the car body truss, like you did with the door.
     
  11. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    Ok i can wait
     
  12. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    Or video ?
     
  13. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    The first pic is how your door is, not enough beams, the second image is with extra beams added on the outside, make sure each quad is crossed, then the 3rd pic is me adding extra beams inside to make it stronger.
    1st stage, from mesh, no added beams.
    upload_2019-2-22_18-53-35.png
    2nd stage, outside quads need to be crossed X
    upload_2019-2-22_18-54-7.png
    3rd stage, internal beams, add as many as you like.
    upload_2019-2-22_18-55-1.png
     
  14. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    Check this
    https://mega.nz/#!JSBUASpK!qV0HATpx8XN9M4c0s1I5gHRxiETp0XvUF0Hqnnibn_k
     
  15. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
  16. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
  17. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Why has that happened LOL!! You need to send some photos of the Truss's, you can't even see why the car deformed like that in the video, why have the wheels fallen through the ground? Just get the body frame rigid first before attaching wheels.
     
  18. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Is there anyway of using these types of functions with a Soft body?
    rb.AddForceAtPosition()
    rb.GetPointVelocity()
     
  19. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    I dont know how
    You have Skype ? i can post more pictures or videos for fast conversation
     
  20. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    I don't use Skype, can you just post a photo of the car Truss? I know Truss physics is complicated to use but it isn't that complicated, just need to see the Truss meshes.
     
  21. ASDev

    ASDev

    Joined:
    Dec 9, 2012
    Posts:
    48
    Press PrtSc (Print Screen) button on keybord and Ctrl-V in Reply field
     
  22. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    upload_2019-2-27_22-47-0.png
     

    Attached Files:

  23. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    Photos Uploaded
     
  24. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    Lol
     

    Attached Files:

  25. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Not enough beams! also the car total mass is only 139, increase internal support beams, make sure surface quads are crossed in the middle X, increase node mass so it's at least 1000 total. Or attach the mesh somehow on here and I'll do it for you.
     
  26. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    I just do not know how to work with Beams Nodes etc, please can I contact you on Gmail or Facebook for faster communication?
     
  27. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Study these photos, especially number 3, all I've done is add 4 crossed beams inside to hold the roof up, like a tent.
    upload_2019-2-28_11-48-36.png
    upload_2019-2-28_11-48-57.png
    upload_2019-2-28_11-49-23.png
    upload_2019-2-28_11-49-45.png
    Now add more, and more, until it's rigid.
     
  28. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    If you still don't understand, use this, this is a tutorial on creating your first Truss.
    1) Use 3dsmax or Blender to creat a 1m x 1m x 1m cube, import into Unity and attach a TxSoftBody
    upload_2019-2-28_12-17-33.png
    Now create a new Truss asset and use Create From Mesh and find the Cube object.
    upload_2019-2-28_12-19-29.png
    Go into Edit and select all the Links and set to low numbers to make it floppy.
    upload_2019-2-28_12-20-16.png
    Hit RUN and this should happen
    upload_2019-2-28_12-20-50.png
    Now go back to Edit and click Links, go to Create and cross X all the surface quads.
    upload_2019-2-28_12-22-14.png
    Once done click Edit to close the Designer and hit RUN, the cube will be rigid.
     
  29. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    How do you make Extra Beams ? :eek:
     
  30. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Designer/Links/Create
     
  31. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Okay I've done a quick tutorial on how to set the links up on a soft body, this technique should be fine with most shapes.
     
    pmot and Shadow-X6 like this.
  32. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    Thanks very much This video helped me :)
    Will be two part ?
     
  33. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    But problem how do you make Yellows Beams ?
     
  34. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    I'm doing it by video but when I click on Edit so yellow beams disappear what I'm doing wrong
     
  35. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    When you open the Editor the yellow Lines disappear, then when you exit the designer by clicking Edit the yellow Links come back, this is normal, always when your finished make sure you exit the designer.
     
    ParaThoxic likes this.
  36. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Yellow Links/Beams are when you successfully exit the designer.
     
    ParaThoxic likes this.
  37. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    I will try to make more mini tutorials on request, how to do's. PLEASE NOTE: Not how to make a whole car! lol.
     
  38. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Ahh, this is perfect, thanks.
    If you could create a mini tutorial on how to properly attach a fender or a door to the main body, which will (partly?) get detached from the main body upon impact or something, that would be awesome.

    I've spent a lot of time writing raycast based suspension code, with stiffness/damping/rebound damping in newton seconds per mm. I wonder if that could be used on a truss body? This approach also uses addForce, just like most realistic tyre physics libraries.
     
  39. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Yep okay I'll do it a little later today using my vehicle.

    That's very interesting, unfortunately Truss isn't open source, so I'm not sure how you could mate your code with it?
     
  40. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Crash test.
     
    Shadow-X6 likes this.
  41. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    upload_2019-3-1_23-36-27.png
    I do not see any yellow beams I do not know what's behind the problem why I do not show yellow Beams I really try
    (Please add subtitles to video)
     
  42. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    That's sick. Let's say if you would like to make the whole body more rigid so it wobbles/deforms less in a crash, would you add more 'beams' or play with the settings of the existing beams?

    Also, getting the suspension/tire code to work would just require the ability to add force on position on a truss body, but I'm not sure if that's possible, I haven't looked into it yet.
     
  43. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    You haven't clicked Edit, to close the designer, TxSoftBody-Edit
     
  44. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Mixture of the two, I think you need to get the design just right from the start, by creating a frame which is exactly like the car your making, but with my frame in that video if I play with the Link settings I could stiffen it all up, if not I'll just add more Links.

    There is an AppIyImpulse() function with 3 overloads in the TxSoftBody class, but I haven't tested it yet, nice little project for you to work on, keep us posted, it's an interesting idea, so what is in the tire code?
     
  45. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
  46. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
    Here is a tutorial I've done on attaching body panels to a soft body chassis.
     
    Fibonaccov, Back_Buffer and Shadow-X6 like this.
  47. Shadow-X6

    Shadow-X6

    Joined:
    Apr 29, 2016
    Posts:
    108
    Thanks :) Please make next video in better Quality :)
     
  48. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Again, absolutely perfect. Thanks Alan.
     
  49. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
  50. AlanEvo

    AlanEvo

    Joined:
    Mar 29, 2018
    Posts:
    113
Thread Status:
Not open for further replies.