Community
3ds Max Animation and Rigging
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max animation topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Crane Rigging Hook

22 REPLIES 22
Reply
Message 1 of 23
daniel.mcaloney
2536 Views, 22 Replies

Crane Rigging Hook

I found out how to rig the cable using SplineSelect + LinkedXform for each of the pivot points.

I am unable to figure out how to make Dummy Object 4 (hook) maintain a vertical orientation as the main arm is rotated.

I tried applying a Position Constraint to Dummy Object 4 - targeted to Dummy Object 3. This will achieve what I want but I am unable to raise and lower Dummy Object 4 to animate the hook since it's Z position is constrained to Dummy Object 3.

I was hoping that I could "turn off" the Z axis for the Position Constrain but I have not been successful.

 

3DSMax_Crane_Rigging_Problem_Jan26.jpg

22 REPLIES 22
Message 2 of 23

I have just started learning how to use Script Controllers and how to use matrices in 3ds Max.  This double boom problem is an excellent application for their use.

 

I have modeled the double booms in the attached file.  I refer to the two booms as long and short.  I have linked point helpers at the end of the two booms and linked the booms to a base dummy object.  The base dummy ensures that the booms can be moved anywhere in space,

 

As you can see in the image below, I have defined several variables in the Script Controller for the point that represents the location of the hook.

 

LBEnd is the location of of the end of the long beam.  It is the product of 3 matrices. They are the position of the boom end with respect to the beam pivot, the transformation matrix of the long beam and the transformation matrix of the base.

 

SBEnd the end of th short boom.

 

L1 is the distance from the end of one book to the end of the other boom.

 

LT is the total cable length.  I have made it a function of the z coordinate of dummy object DumCableLen.  If you move DumCableLen up and down the cable gets longer or shorter and the Hook Point lowers or rises.

 

ZDown is the how far down the hook is located.  It is simply the total length of the cable minus the distance between the ends of the two booms. It length is defined by taking an identify matrix [1,0,0] [0,1,0] [0,0, 1], and adding the fourth row with a a value of L1-LT

 

Since matrices are used you can rotate the base and the hook will follow.

 

I also added a spline from the end of the short boom to the end of the long boom to the hook point.  I then added a Spline IK Control modifier to the spline so I could link the spline vertices to the boom end points.

 

Try rotating either boom, the base, and the z value of DumCableLen.

m1.JPG

 

 

 

lee.minardi
Message 3 of 23
leeminardi
in reply to: leeminardi

Here's a Screencast of the rig in operation.

 

 

 

lee.minardi
Message 4 of 23
leeminardi
in reply to: leeminardi

CORRECTION.

 

My post #2 does not show the unit vector for the variable ZDown.

 

Here are the complete set of expressions.

 

LBEnd = PtLongEnd*BoomLong*dumBase
SBEnd = PtShortEnd*BoomShort*dumBase
L1 = length(LBEnd.row4-SBEnd.row4)
LT = 250+CableLen
ZDown = (matrix3 [1,0,0] [0,1,0] [0,0, 1] [0,0,L1-LT])
LBEnd*ZDown

lee.minardi
Message 5 of 23
johnKCBSJ
in reply to: daniel.mcaloney

Hi Lee,

 

Thanks for your time and info so foar on this topic.

 

I'm a heavy lift engineer in Australia just starting out in the 3DSMAX world. This is a great explanation of the problem of the auto length adjustment required for the ropes between the main boom and backmast of a crane.  In reality, the red boom or backmast is there to support and raise/lower the main boom ( or long boom) via a luffing winch and the Hook up/down is a totally separate winch line dedicated to altering 'ZDown'.  As such back mast or short boom is usually fixed when the crane is setup.

 

The reality is actually simpler than your model yet I'm so raw at 3DSMax that I cant even write a script to simply shorten the rope between long boom (LBEnd) and SBend effectively pivoting the long boom.  Do I click on the actual rope and add a scale modifier?

Is there a crash course in matrices for determining rope lengths between points?

 

Thanks again for your assistance with this stuff.. and yes, I realise this is a few years old now!

 

Regards, John

Message 6 of 23
leeminardi
in reply to: johnKCBSJ

When I rigged this I assumed there was one cable of a fixed length that goes from the end of the short red boom to the end of the long blue boom to the "hook" (Sphere001).  The cable object line001 and it has a Spline IK Control modifier with 3 point helpers/  The length of the cable is equal to the z coordinate of DummyCableLength.  Moving this dummy up and down raises or lowers the hook.

 

The hierarchy is:

p1.JPG

The PtHook Script controller is:

image.png

The variables are:

BoomLong = transform (matrix) of long boom

BoomSHort = transform short boom

CableLen = z position of the dummy DumCableLen

dumBas = transform of the main base dummy.  You can move and rotate this dummy anywhere you want.

PtLongEnd = transform of the the point located at the end of the long boom.  I could have used just the position for this point and the end of the other boom.

PtSHortEnd = transform of the point att the end of the short boom.

 

The expressions are as follows:

LBEnd = PtLongEnd*BoomLong*dumBase

This defines the transform for the point at the end of the long beam in world coordinates by multiplying the point's transform by its parent's transform (BoomLong) and then by BoomLong's parent's transform, dumBase.

SBEnd is calculated similarly.

L1 = length(LBEnd.row4-SBEnd.row4)

Here, L1 is the distance (using world coordinates) between the ends of the 2 booms.  ".row4" of a matrix is the position vector of the matrix.

LT = 250+CableLen

LT is the total length of the cable = z position of DumCableLen + an arbitrary 250. 

 

To find the z position of PtHook we subtract the total length of the cable from the lengtg between the 2 booms and multiply by the Long beam's transfom that has been converted to world coordinates. Note that the first three vectors of the matrix define the object's orientation.  To keep the orientation orthogonal to the world we use  [1,0,0] [0,1,0] [0,0, 1] .

 

Let me know how you would change the rigging behavior. For example,  should the length of the cable between the two beams be fixed but adjustable?  The more specific you are the better chance I can rig what you want.  Do you have a Max model I should work with?

 

I used a dummy to control the cable length.  A custom controller may be a better choice.

 

To learn more about matrices you might find the following tutorials I created helpful.

 

Using Matrices to Rig a Scissor Mechanism in 3ds Max

 

Rigging a Hexapod

 

lee.minardi
Message 7 of 23
johnKCBSJ
in reply to: leeminardi

Hi Lee, 

 

Thanks for the detailed response.  I've tried to create my own so I learn myself rather than blindly copying your model and then coming back again and again. I'm woking my way up to your model.. which I fully understand but the 3dsmax commands and methods are confusing me.

 

My model consists of a fixed back mast or short boom and a rope between it's tip and the tip of the main boom. At this stage I just want to rotate the main boom and have the rope between the two tips simply adjust it's length accordingly. 

 

The Script I created does not seem to work.  Can you see where I went wrong?

Crane Rig.JPG

 

As far as your model goes.. 

 

for these types of cranes... there are 2 winches located in or near the base, one to pull the main boom up and down  via a rope using the tip of the fixed back mast as leverage.. this is called 'luffing up or down'. And another that runs from the base up the  inside of the main boom and down to the hook and load you're lifting.

 

These act independently so there are also 2 separate ropes needed in your simulation, one to raise the hook and the other to reposition the tip of the main boom over the spot that the load needs to be picked up or placed.   But if the other gents are not asking for help on this anymore, don't go out of your way to re do your model if it's too much trouble. 

 

I'm just trying to learn a way to have a rope between two points that lengthens accordingly.. 

 

 

I'll take a look at those links tonight, thanks for sharing them with me. 

 

John

 

 

 

 

Message 8 of 23
leeminardi
in reply to: johnKCBSJ

To answer your question:

"I'm just trying to learn a way to have a rope between two points that lengthens accordingly.."

 

We can take a couple of approaches.  The easiest is to rig it so that if you rotate  MainBoom the LuftingRope stretches.

 

Try the following.

  1. Make sure your  Display and System Units are the same.  I set them to Meters.
  2. Select LuftingRope and change the controller from Transform to Position/Rotation/Scale.
  3. Delete points 001 and 002.
  4. Select LuftingRope and add a Spline IK Control modifier then click Create Helpers. This will place points at the vertices of the line that you can select and move to stretch the line.
  5. Link Point002 to the dummy MainBoomTip.

You can now rotate MainBoom and the rope will stretch to stay at the end of the MainBoom.

image.pngimage.png

Is this what you want to do?

The more difficult task is to be able to specify a rope length and have Max determine the angle of the Main Boom.  If you want this I can post a solution when I have some time in the next day or two.  The weather is lousy here so I will probably be looking for something to do inside.

lee.minardi
Message 9 of 23
johnKCBSJ
in reply to: daniel.mcaloney

Thanks Lee,

 

That's perfect.. I got it working and even replicated the ropes to simulate multiple pullies with the same 2 helpers.

johnKCBSJ_1-1622377072789.png

 

Then I tried it on another crane model with a hydraulic telescoping boom I rigged with the Float expressions from another of your videos. here's a pic. (the purple rope lengthens as you extend the boom out

johnKCBSJ_0-1622376043667.png

 

I certainly appreciate your assistance here. Moving forward, the rope lengths are not so important in the 'industry' as the winch will simply wind in or out until the boom is in the right position. How many meters of rope is trivial as there is often more rope on the drum that is ever used! 

 

Most 3D Crane lift studies originate from 2D plan views and Side Elevations showing the radius and height of the hook and the boom length and angle required to achieve it. If you're looking for a challenge, the ultimate would be to drag the hook in the X or Y to the radius and direction desired, and the boom would follow and adjust it's angle accordingly. If it's a fixed latice boom that is controlled by another rope (like the first example) then it will adjust as you drag the hook, but if it's a telesocping boom then you'd stretch the boom to your desired length.. then drag the hook and it will pivot and luff accordingly with the boom at the nominated and fixed length.  (most hydraulic booms cannot extend or retract once there is a significant load on the hook.

 

I'll keep plugging away here, and report back if I figure it out. I believe I need an IK Solver?

Message 10 of 23
leeminardi
in reply to: johnKCBSJ

@johnKCBSJ , I think the following does what you want.

 

The model consists of a Boom (cylinder) that has its local Z axis in the direction of axis of the cylinder.

A point named TargetPt has the following expression Controller assigned to its position.

[ hook.x,hook.y, ((L^2 - (hook.x^2 + hook.y^2))^0.5) ]

image.png

The hook can be moved in x, y, and z and the TargetPt will move to the same x and y as the hook but with a Z coordinate that yields it a distance L (the boom length) from the base of the boom. In this example L is set to a constant of 30, the length of the cylinder.  A LookAt constraint is assigned to the boom so that it points towards TargetPt.  Points 1 and 2 are were created with the SplineIK Control modifier assigned to the cable.

Note that all the objects are linked to a dummy (DummyBase) to enable the repositioning of the rig anywhere in space.

 

I recommend turning off the display of helpers and then selecting the hook and move it as you wish. The boom should follow accordingly.

image.png

Let me know if you have any questions or if this needs further refinement.

Lee

 

lee.minardi
Message 11 of 23
johnKCBSJ
in reply to: daniel.mcaloney

Awesome Lee.

It's perfect for planning the lift and creating the key framing positions of the model for the animations I'm creating.

I'll have a crack at recreating that myself now so I can learn it.

Cheers mate.

Message 12 of 23
johnKCBSJ
in reply to: leeminardi

Hi Lee, I've been doing some work with a model I created based on this theme and I was wondering if there was a way to make the dummy base rotate and follow the hook.. ie if it was a real crane and the hook moved the base would need to follow it. Note the base pivot point about 'z' would be in a different position to the booms pivot point about 'x' or 'y'

 

I tried putting a dummy under the hook that follows it's x and y with constant z, then doing a lookat constraint from the base to always look at this dummy under the hook, but this didn't work. 

 

Any ideas would be greatly apreciated!

 

Cheers

Message 13 of 23
domo.spaji
in reply to: johnKCBSJ

@johnKCBSJ wrote:

... ie if it was a real crane and the hook moved the base would need to follow it.

 

That is inverse truth. Let's call it IT.

Message 14 of 23
leeminardi
in reply to: johnKCBSJ

@johnKCBSJ  In the attached file I added a truck body for the crane that holds the base of the boom.

The CraneTruckBody is also linked to DummyBase so that moving DummyBase moves the entire assembly.  The truck body will rotate appropriately about its z axis as the hook is moved in the XY plane.  Moving the hook in Z will have no effect on the truck body.

 

The following transform script is assigned to the truck body.

xdir = normalize([HookT.pos.x,HookT.pos.y,0]  - [DumBoomBase.pos.x,DumBoomBase.pos.y,0])
ydir = normalize(cross [0,0,1] xdir)
zdir = cross xdir ydir
boomX = -4  -- x,y,z position of Crane's Pivot relative to 
boomY = 3   -- the base of the boom
boomZ = -2.5
boomPos = boomX * xdir + boomY * ydir + boomZ * zdir
m = (matrix3 xdir ydir zdir boomPos)

 

  Note that the x direction for the transform script is defined as a vector in the XY plane from the  boom base to the hook. The cross product of the z axis with this vector defines the y direction vector. The z direction vector is simply the cross product of the x and y vectors.  All three of these vectors must be unit vectors.

The position of the truck base's pivot relative to the boom location on the truck must be specified in coordinates of the truck base so their coordinates are multiplied by the respective unit direction vectors. You can change the values of boomX, boomY, and boomZ as needed for your geometry. 

image.png

lee.minardi
Message 15 of 23
arrpprahul1
in reply to: leeminardi

can you do a tutorial for this also I need that hoot to take sea hose and connect to the ship is it possible
Message 16 of 23
leeminardi
in reply to: arrpprahul1

Can you post a simplified model, without any rigging, and detail what actions you would like to take with the rigging?

lee.minardi
Message 17 of 23
arrpprahul1
in reply to: leeminardi

can you help i want to take that hose with that crane cable and connect to ship

 

Message 18 of 23
arrpprahul1
in reply to: leeminardi

sure

Message 19 of 23
leeminardi
in reply to: arrpprahul1

A Max file with the crane, hose and ship (or at lest the connection point to the ship) would me helpful.  Before and after images or models would also be helpful to understanding the requirements and constraints.

lee.minardi
Message 20 of 23
arrpprahul1
in reply to: leeminardi

https://youtu.be/yk5gXJO2Lis sir can you check this video I want to same re create this scene I already done same but 2 things still I can't do it example crane take the hoses and connect to ship pipes that I cant understand please if you help me 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report