Announcement

Collapse
No announcement yet.

Cable Component Plugin for UE4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Been working with cable component lately. Noticed that the bigger the number of segments the longer the cable is and also it behaves less like a rope in this case, but more like a rubber.. cable exactly. Should not cable length be exactly CableLength?
    Some test results:
    CableLength = 50, NumSegments = 20 - Actual length - 60
    CableLength = 50, NumSegments = 50 - Actual length - ~105
    Edit:
    So cable totally stretches between start and end particles. Even though constraint rest length is calculated from CableLength, which does not get changed due stretching, that's something that confuses me..
    Apart of it, implemented mass for particles and stiffness for constraints, results are pretty nice. But i also experience some weird bug, cable disappear after some game time and appears once again if i move it on X axis.
    Edit #2:

    Here's the patch, sorry for not using github.
    http://pastebin.com/jUg322ea

    What was changed:
    • Particles have masses now
    • Constraints stiffness implemented
    • Each particle could be fixed(hard-attached to object) There are some problems though, read below
    • Each particle could have attachment(initial work)



    Current issues:
    • Stretching problem mentioned in first edit
    • Cable also stretches once rotational movement was applied Normal behavior, to get rid of stretching if needed, it's required to check position between particles to satisfy constraint before calculating new position, or any other method similar to this
    • Accessing FComponentReference of FCableParticle in editor panel leads to crash Unable to fix particle at object due to this (Update: Fixed this by adding particles in the loop instead of adding a bunch of uninitialized elements and modifying values then)


    Update: after testing various parameters found out that the following parameters produce best results:
    Stiffness - 1.9
    Iterations - 8 to 10
    While number of iterations of 2 and stiffness of 1.5 provide stiff enough cable with less computations.
    Last edited by BiggestSmile; 05-30-2014, 12:15 PM.
    Alone: The Untold - a story driven horror game

    Comment


      #17
      Some cloth using updated code. Sorry for large pics.




      No collisions so far.

      Once collisions for generated meshes implemented(it's possible to use complex as simple with generated meshes now, but it has limitations, AFAIK), it would be possible to detect mesh collision and then apply projection to particle closest to the contact point.
      Self-collision is much harder topic. Implementing angular constraint would have some visual effect of self collision, but it won't be enough of course.
      Last edited by BiggestSmile; 05-28-2014, 03:02 PM.
      Alone: The Untold - a story driven horror game

      Comment


        #18
        Hello,

        I'm looking for a cable solution like this in unreal but am no coder.
        Can anybody help me with a working example and how to set this up?
        The first part is just setting up static connections in the editor, but in the end I would like to be able to connect and disconnect the cable to see how an object attached reacts.
        Also see if it's possible to for example tension one rope, and see what happens.

        I'm looking into using unreal engine to do proofs of concept and see if I can use unreal engine as a dynamics playground for pre-engineering solutions.

        Any help would be very appreciated

        Thanx

        Peter

        Comment


          #19
          Hi.

          There's is no way to attach objects to the cable yet, only attach cable to object. Actually it's not even one-way interaction. The tension you're expecting to see also can't be achieved currently.
          Also, you would not be able to disconnect one end of the cable as it will be immediately snapped to the other end. I've been working on improving cable component, some of the results are in pastebin above, but it's totally not ready to use.
          Alone: The Untold - a story driven horror game

          Comment


            #20
            Hi,

            Yes I saw the code example in pastebin.. but since I'm no coder I have no clue what to do with it
            How can I check it in the unreal editor?

            It's no problem for the first try to no be able to disconnect it.. just having something that looks like a hanging rope or cable like the example video is already very valuable.
            The unity script uses pill shapes at every point (or segment) that you can then also use as sort of a collision object for the rope.

            see for example http://www.ultimategametools.com/products/rope_editor

            Peter

            Comment


              #21
              The plugin is enabled by default i believe, so check screenshot below to see where to find the cable.


              Or in actor blueprint as component, simple type "cable" in search field.
              Alone: The Untold - a story driven horror game

              Comment


                #22
                This is a really great plugin, thanks for making it.

                Comment


                  #23
                  Thanx! Got it working.

                  Can't wait to get it in a more advanced state.

                  Comment


                    #24
                    >What about you guys? What would you like to see added?

                    If these are interactive with the Wind system, then having non-round cables would possibly be handy for making banners and flags. Set the sides to 4, and have the length much larger than the width (similar to splines in 3dsMax), then let the wind blow them about.

                    Comment


                      #25
                      Is there a way to attach one end of the cable to a character or item, and find the end location using a projectile or line trace? 3:45, he uses a zipline arrow. That's one of the things i'm trying to do.

                      Comment


                        #26
                        Hi ! Any progress on getting this cable component to collide with the world, meaning the cable could be draped around the edge of a wall or whatever? I would be very pleased to see something like that.

                        Comment


                          #27
                          Originally posted by warhead328 View Post
                          Hi ! Any progress on getting this cable component to collide with the world, meaning the cable could be draped around the edge of a wall or whatever? I would be very pleased to see something like that.
                          This would be nice, but I'm afraid it isn't something on our road map right now. Sorry.
                          Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
                          Twitter: @EpicJamesG

                          Comment


                            #28
                            Very nice, but I'm having some problems with this.
                            Why is the cable actor behaving like a extremely flexible rubberband?
                            I thought that I could hang an object from cable so it was not touching the ground. Is this possible?
                            If I attach a physics object to the end of a cable, the object just falls to the floor and the cable length increases. Even if the initial cable length is much shorter than the distance to the floor.
                            EDIT: I spend all day on this problem and I found the solution just 5 minutes after posting my question. I just added a Physics Constraint
                            Last edited by RickDangerous; 12-13-2014, 10:30 AM.

                            Comment


                              #29
                              Is there a way to get the cable actor to sway in the wind? I have tried everything i could think of but at level start it just drops and sags and eventually stays still.


                              Twitter - @TheCSilverman

                              Ancient Cistern | Advanced Material Pack Ed. 1 | Advanced Material Pack Ed. 2 | Advanced Material Pack Ed. 3 | Texture Pack Ed. 1 | Container Pack Ed. 1 | Road Sign Pack Ed. 1

                              Comment


                                #30
                                Originally posted by CharlestonS View Post
                                Is there a way to get the cable actor to sway in the wind? I have tried everything i could think of but at level start it just drops and sags and eventually stays still.
                                I dont believe any forces currently are able to act on the cables in its current state.

                                Comment

                                Working...
                                X