1
$\begingroup$

Friends, I’m a newbie in Blender. When lifting the boom of the crane, there is such a bending of the cable between the drums, I used the Hook modifier to attach the cable, how do I avoid this? https://imgur.com/gallery/oJqvzCW (I can't understand why the video quality is so bad =)enter image description here

$\endgroup$
2
  • $\begingroup$ pls provide blend file, thx $\endgroup$
    – Chris
    Commented Mar 10 at 19:56
  • $\begingroup$ Okay, I've attached file $\endgroup$
    – ricky_berc
    Commented Mar 10 at 20:42

2 Answers 2

2
$\begingroup$

This is a tricky problem for a beginner. This is a tricky problem for an expert. I'll explain how I would approach this, but it is likely to involve some (many?) concepts with which you are not yet familiar.

Making a perfect bezier curve circle is not possible. Making an arc of a perfect NURBS curve circle, like you want, is more complicated that I can handle. Moving a NURBS control point to represent an arc of a circle requires more than just rotating it about the center of a circle.

Making a mesh line that represents a portion of a circle, perfectly, is relatively easy, once you get the positions properly; the positions can be acquired via IK. Turning a mesh line into a curve is also, now, pretty trivial, via GN, even dynamically.

So, the broad overview:

  1. Determine contact points. Which we'll use IK bones to do.

  2. Make a line that curves around those contact points. Which we'll use a bit of weight/deformation expertise to do.

  3. Give that line some thickness. And we'll use geometry nodes for that.

With perfect circles, the cable will run tangent to the curve, and tangents are at 90 degree angles to the radius of the curve. We can create the positions of contact using IK that determines that tangent:

enter image description here

I've created a 3-bone IK chain here. r1 is the radius of the cable around the first pulley. It is essentially unlocked, but has no stretch enabled. Tangent, naturally, represents the line tangent to the two pulleys. At rest pose, it lies at a 90 degree angle to r1, and is locked in all axes. It has IK stretch allowed at 1.0. r2 is the radius of the cable around the second pulley. Like tangent, its rest pose is at a 90 degree angle to its parent (tangent) and it is locked in all axes; it does not have stretch enabled. The entire chain starts at the center of the first pulley, and targets an IK target at the center of the second circle.

Because of this, the tangent bone will always contain the line tangent to both circles.

Now, we need to wrap a mesh around the circles, at slightly higher resolution than our bones provide. We can use an armature modifier with "preserve volume" enabled to do so. With preserve volume (aka quaternion deformation), linearly distributed weights will turn into evenly distribute angles, with rotation.

We'll start by making a string of verts at our tangent points, weighted to appropriate bones, which I'll list:

enter image description here

From bottom to top, I'm weighting those vertices to r2, rb2.001, rb2, and rb1. Fully, at 1.0.

What is rb2.001? It is a duplicate of the bone rb2, to share the same axes. We'll be doing something with it in a second.

Now, I'll subdivide the section between rb2 and r1 to create some detail vertices. A few times.

enter image description here

This will naturally create linear weights ont he subdivided vertices. Now I'll do something weird: I'll take all those verts I just made, and put them at the position of rb2, so I've got a bunch of verts, all in the same spot:

enter image description here

Notice the statistics. A bunch of verts in one spot. Now we'll tell rb2.001 to copy the rotation of r1:

enter image description here

And notice what happened to all those verts that we put in a single spot:

enter image description here

I've extruded them so we can actually see the weights. And notice the armature modifier. That linear weighting has turned into linear rotation, describing a perfect circle, from one tangent to the next.

Only one thing remains, which is to give it thickness. We'll give it a GN modifier to do this:

enter image description here

The simplest GN modifier there is. We now have a curve, representing an arbitrary (and properly measured) section of a circle. A perfect circle. Well, as much as sampling allows. Test it out:

enter image description here

Still an arc of the circle.

enter image description here

Still an arc of the circle.

$\endgroup$
1
  • $\begingroup$ I'm really not familiar with many of the things you described, it's hard enough for me to understand, but I'll try =) $\endgroup$
    – ricky_berc
    Commented Mar 12 at 15:39
1
$\begingroup$

My solution is by far not so sophisticated as Nathans and i just "fake" it.

But i think mine is much easier to understand.

So the basic idea of mine is: where does the curve/cable touch and must be bend.

Answer: here:

enter image description here

i named the bones Hook1-5 which you can use to connect as hooks to your curve.

enter image description here

enter image description here

i am not (!) a Pro-rigger, i am sure you can do it better and with less bones/constraints, but here is my setup:

My base is parented to bone, so that it moves with the crane.

enter image description here

bone8 has no parent, but has a copy location z constraint to base

enter image description here

enter image description here

hook4 has copy location base and damped track to bone8

enter image description here

hook3 is just parented to base

hook5 is parented to hook3, and has this copy rotation to hook4

enter image description here

hook2 is just parented to base

enter image description here

hook1 is parented to hook2, and copy rotation constraint:

enter image description here

pls ignore bone.014 - it's not used.

result for hooks:

enter image description here enter image description here

Note: I did NOT (!) connect the "real curves" hooks to your curve, i was too lazy for that, but i hope you can do that on your own. I just wanted to show another "easier" solution for you. Hope it helps.

$\endgroup$
1
  • $\begingroup$ I managed to bend the cable according to your solution, but another problem arose =) When I lower the crane hook, the vertices on the pulley shift and they taper, do you know if there is any way to fixate them? $\endgroup$
    – ricky_berc
    Commented Mar 12 at 15:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .