Help animating a cable with plug

Help animating a cable with plug

ale_castano
Explorer Explorer
1,348 Views
4 Replies
Message 1 of 5

Help animating a cable with plug

ale_castano
Explorer
Explorer

Hello everyone, 

I need some help on creating an animation of a cable with a sensor attached at the end, that start from inside a box and then goes on a wall.

My problem is related to the sensor/plug. Let me explain.

I can animate the cable with path deform or with loft, but it's just the cable itself. How can i attach the plug at the end and make it follow the path and growing of the cable?

Any help would be much appraciated. Thank you.

0 Likes
Accepted solutions (1)
1,349 Views
4 Replies
Replies (4)
Message 2 of 5

leeminardi
Mentor
Mentor

Try adding a Spline IK Control modifier, Create Helpers (I suggest with the Link All to Root option) and link the plug to the helper at the end.  You can also use the helpers to animate parts of the cable's location.

lee.minardi
0 Likes
Message 3 of 5

ale_castano
Explorer
Explorer

Hi Lee, thank you. Btw i'm new to animation and I would greatly appreciate some more explanation.

So, first of all I create the spline of the path the cable has to follow. After that, what's your suggestion for creating the cable itself? I'm a bit confused about this.

After that i should apply the Spline IK modifier and then attach the plug, right? 

Sorry for these basic questions...

Thanks a lot

0 Likes
Message 4 of 5

leeminardi
Mentor
Mentor
Accepted solution

First make sure you have an Editable Spline and not just a line.  Also, when defining the spline it is best to use as few points (vertices) as possible.  Use Bezier handles to control curvature rather than adding more vertices (aka fit points).  After converting the "line spline" to and Editable Spline select the vertices, right click and choose Bezier and you will see the spline tangent handles at the vertices.

If the cross section of the cable is a circle or rectangle then just check the Enable In Renderer and Viewport options.

 

image.pngIf the cable has a custom cross section then consider using a Sweep modifier on the spline.

Once you have the spline's initial shape you can add a Spline IK Control modifier and then click Create Helpers.   You can then keyframe the relocation of the helpers to animate the cable's change in shape.  You can link the plug to the end helper.  Moving the end helper with the linked plug will move the plug as well as the end of the cable.

 

When animating the changing shape of the cable you will need to be concerned about the stretching or shrinking of the cable's length. You can do this by visually estimating the new location of helpers and adjusting them as necessary.  Another approach is to use bones and an IK Solver to help ensure the cable doesn't stretch. I do not like using bones as the solvers only work in a 2D plane and although the plane can be at any orientation I found it does not give me the flexibility I want. 

 

Another challenge you will face is to correctly orient the plug to the direction of the end of the cable.  You can use   Tools, Align, Normal Align... if the cable was made using a Sweep modifier (one reason to use sweep rather than renderable thickness).

 

I'm sure there are other ways to manipulate the cable but this should give you a start.

 

lee.minardi
Message 5 of 5

ale_castano
Explorer
Explorer

Thank you so much Lee for the help! I really appreciate. You gave me some really useful hints, now I see the path to the solution much more clearly. Thank you again.

0 Likes