6
$\begingroup$

I'm making a cable animation. The animation

The first attempt was to use curve modifier, but the issue here is that the connector gets deformed as well.

I've tried a different approach, by separating cable to parts and making connector "follow the curve" with constraints. Separated cable

And now the connector and main part of the cable (red) are fine. But I can't get the tubes (green) to align to the holes of connector. I've tried to rotate it and so on, it's always misaligned at different points of the animation.

I've also attempted to use hooks to connect tubes to the connector, but it works only for short distances and doesn't fit the goal.

Any other approaches I can try?

enter image description here

enter image description here

$\endgroup$
0
3
$\begingroup$

Edit: So my solution is not completely accurate, because as you say the big cable and the tubes do not join at the same point of the plug.

*Create an empty at the cable end, select the empty, shift select the cable, go in Edit mode, select 3 vertices, press CtrlP:

enter image description here

Parent the plug to the empty:

enter image description here

Give the cable a Curve modifier, move the cable along the curve:

enter image description here

$\endgroup$
5
  • $\begingroup$ It would work if connection point of the main cable and tubes were on the same plane. But connector design will not allow this. The result you can see here and here $\endgroup$ – Den G Nov 19 '20 at 9:18
  • $\begingroup$ please share your file (only cable): blend-exchange.giantcowfilms.com ... maybe you should make 2 different objects? (main cable and tubes) Also, put these 2 pictures in your initial question $\endgroup$ – moonboots Nov 19 '20 at 9:25
  • $\begingroup$ I've tried the last approach you suggested, and it kinda works, but there is a clear visible seam on the junction. I guess I'll have to hide the seam behind the some object and call it a day. I've also attached blend file with the result. $\endgroup$ – Den G Nov 19 '20 at 10:16
  • $\begingroup$ And how you achieved that part of the tube, attached to a connector, kept the curvature? In my attempt I got it straight as a stick. $\endgroup$ – Den G Nov 19 '20 at 10:20
  • $\begingroup$ yes you're right my solution is not perfect, I'm still searching for a more accurate... $\endgroup$ – moonboots Nov 19 '20 at 11:09
3
$\begingroup$

The goal is to get an animation as on picture 1 of the question.

What we have:

  1. main cable (red)
  2. tubes (green)
  3. connector (blue) given

Part one:

We can connect the main cable to connector using @moonboots solution. But first we need to cut off the part of main cable which goes into connector. Then we join that piece with connector-object (as you can see on the left). From here follow the @moonboots answer and you'll be done with the main cable.

Part two

There was a problem with tubes misaligned with the sockets on the connector. The solution here is to use Hook modifier in addition to Curve modifier but limiting each mod with vertex groups.

Let's deal with hook first. Go to the Edit mode and select the bottom vertices of the tubes and place a 3d cursor at the center (I'm using a free addon "MACHIN3tools").Placing 3d cursor to crate an empty

Then go to Object mode and add a new Empty object. Then select an empty, select connector, press Ctrl+P to parent Empty to a connector.

Then go to Edit-mode, press Alt+Z to enable X-ray mode and select several rows of vertices at the end of the tubes. Then go to the "Object data properties" tab and create a new vertex group (I called it "Hook") and assign selected vertices to it.

enter image description here

Now, press Ctrl+I to invert selection, and create one more vertex group (I called it "Curve deform").

Part three

Parent the tubes to a main cable (be sure to check, that origin points of these objects are at the same spot), and add a curve modifier to the tubes (with the same settings as for main cable). Then limit Curve mod with vertex group we created earlier.

Curve mod settings

Then let's add a Hook modifier. For the Object select the Empty you created at the end of tubes, and for the Vertex group select "Hook" group. Hooking

Part four: the secret sauce

Now let's see how this all behaves. I'm gonna show visibility of the curve mod and drag it along transformation axis (Z in my case). And we can see that it's going crazy on at the point where 2 vertex groups meet.

Now let's add to the tubes another mod that fixes it all up. It's called "Smooth corrective". The parameters may vary, you can see the values that worked for me on the picture below. Smooth Corrective comparisson

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.