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

Rope physics - Ti RopeMaster

Discussion in 'Made With Unity' started by TiG, Feb 29, 2012.

?

Would you like tobuy this at Assetstore?

Poll closed Jun 8, 2012.
  1. Yes, Definitely

    5 vote(s)
    31.3%
  2. Yes, if certain functions are added (describe below)

    3 vote(s)
    18.8%
  3. Maybe in the future

    3 vote(s)
    18.8%
  4. I have other things to do

    5 vote(s)
    31.3%
  1. TiG

    TiG

    Joined:
    Feb 28, 2011
    Posts:
    311
    Hi,

    We are developing rope physics. It is very efficient and quite fast. (WIP, and probably months to be complete)

    Now with fast frequency handling to make your games better :)

    Third demo:


    First demo:


    Second video demo:
     
    Last edited: May 18, 2012
  2. Zogg

    Zogg

    Joined:
    Mar 28, 2009
    Posts:
    157
    To be perfectly honest, I would possibly be interested (for a sailing ship simulation) - if the rope would behave somewhat more like a rope and somewhat less like a rubber band, or rather an old rubber band which lost its elasticity.
    Ropes have a fixed length : When you move some part of it, the rest of the rope moves such that the length remains constant. This is not the case in your video where you can easily double the length of a rope segment by moving a point sidewards, without the rest of the rope moving an inch.



    The band does not even try to restore its old length, as an elastic band does. (Actually, it's hard to find something in real life that does behave like this. Maybe, if you take a dough string - the ones Bretzels are made of - and manipulate it under water...?)

    I'm sorry, but I've no need for this. But maybe, if you modify the forces and parameters, you will get a really cool rope simulation.
     
    Last edited: Mar 1, 2012
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Interesting, but as Zogg has already commented, not realistic enough that I'd want to buy it.
     
  4. TiG

    TiG

    Joined:
    Feb 28, 2011
    Posts:
    311
    Dear Zogg and bigkahuna ,

    Thank you for your feedback. First of all please note that this is still work in progress, and it is just a crude demo. It is too elastic and it has other things to be fixed too. Hopefully after a few months of development we will fix those issues. Also when finished one will be able to adjust its elasticity etc.

    One point is, making a perfectly rigid rope while using rigidbodies and forces to ensure its compatibility with other physics events is practically impossible, just as there is no perfectly rigid material in real world. In the scene that you have pointed out, I am streching the rope by dragging at the editor. Now as the editor forces it to move to any position it is capable of applying infinite forces. And whatever technique I apply it will elongat the rope, but at its current state the elasticity is too big.

    The rope does try to restore its length, but actually the intial state is not its resting length, it is already streched in the video, and all the upper nodes that cannot be seen (the rest of 250 nodes) are pulling the visible section.

    Maybe I have asked the question at the poll wrong. I am sure that people will buy it when it is finished. The question is do you want it to be on Assetstore, as I prefer not to sell my assets at Assetstore, if there is enough interest I will put it there.
     
  5. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Hi TiG,

    If your question was whether I'd pay for a realistic rope script, the answer would be yes (and I'm sure it would sell pretty well). But unfortunately what you've demonstrated isn't close enough to what I'm looking for. Take a look at Jake's rope script, his demonstrations and comments users made about his rope for an idea what people are looking for.

    You are exactly right when you say that moving a vertice in the editor imposes unrealistic forces on the rope, so perhaps a better demonstration might be to demonstrate your work using a more realistic example. One suggestion might be to wrap your rope around a cylinder and then pull one end. Tension on one side of the rope should cause the rope to slide around the cylinder and friction between the rope and the cylinder would cause the rope to stretch or resist sliding. The rope shouldn't pass through the cylinder nor itself.

    Previous attempts at simulating ropes have been done using PhysX colliders and joints. The problem with that methodology is that PhysX joints become unstable when under tension. There are other methods for simulating ropes but I've yet to see them applied to Unity successfully.

    Best of luck with your project..
     
  6. TiG

    TiG

    Joined:
    Feb 28, 2011
    Posts:
    311
    Thank you bigkahuna for your comments. Actually I think you have commented on all my projects so far, so thank you very much.
    I will do the scene that you are suggesting, ofcourse when the development is finished. Probably months later. I could actually make it now, but I guess demonstrating projects at such early stages might have a negative effect. However other than elongating, it would do everything else that you have described correctly.

    Using PhysX joints is too troublesome on many aspects. So this project does not use them. However colliders are used. It would be impossible to run 250 nodes with joints. Actually I can run 1000 nodes at around 30 FPS with it now.
     
  7. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    You're very welcome. You just happen to pick topics that interest me. ;)

    Not impossible (I've done it) but certainly so slow as to be impractical for most purposes. If I get a chance I'll dig up some papers I was looking at a while back on more efficient methods of simulating rope, although you might already be using those techniques.
     
  8. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    (Re-posted at developers request)

    Yeah dude, a few of the most requested features I think people have been asking for from my ropes are as follows:
    1> ability to climb the rope
    2> a more stable rope when stretched (PhysX problem so custom physics could be something you should look into)
    3> ability to have a set length for the rope (like a bungee cord)
    4> Ability to create the joints along curves
    Side Note: People have been asking me for a way to create a rope along a path. So lets say they wanted the rope to be looped around pullies at start. It would be nice for them to just draw a curve (Bezier Curve) in 3D space around the pullies they wanted to use, then during run-time the rope is generated along that curve path.

    5> Ability to create ropes at run-time via a method that sets the lengths and positions of the starting point and ending points. Maybe even a curve variable to take in the points along a curve to create it on.

    and probably a dozen other things including making it very easy to implement haha.. There are a lot of artists who use Unity (including a few friends of mine) and they would much rather have a solution that is easy to implement than have to fumble with a lot of code.

    Jake
     
    Last edited: May 19, 2012
  9. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Nice comment. ;)
     
  10. TiG

    TiG

    Joined:
    Feb 28, 2011
    Posts:
    311
    Thank you Jake for sharing this here.

    Jake had sent his post as a message to me and I asked him if he could also post it here so everyone can see. He kindly accepted and shared this huge bundle of knowledge. I also noted that this project is commercial unlike his, and as you can see he stated that he is OK with it.
     
  11. TiG

    TiG

    Joined:
    Feb 28, 2011
    Posts:
    311
    Updated with bridge demo video.
     
  12. TiG

    TiG

    Joined:
    Feb 28, 2011
    Posts:
    311
    Updated with 3rd video showing advanced stability and frequency handling.
     
  13. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Still working on this? I'm looking into solutions for a 2D elastic string that acts sorta like a trampoline.
     
  14. TiG

    TiG

    Joined:
    Feb 28, 2011
    Posts:
    311
    Dear JTown, you can see that the rope readily acts as a elastic string. Please check your PM.