Telescoping hydraulics

I’m trying to make an arm with hydraulic pistons. I’d like the the them to be telescoping though, with three cylinders instead of just two.

Now I currently have the two end cylinders parented to their respective “arms” and set to track each other. The problem comes in when I try to get the middle cylinder to follow properly. Any suggestions?

I’m also having problems getting it to work with armatures. :confused:

Attachments


I think copy location with its influance turned down to 50 percent will give you the results you want.

Or my brain has turned to jello cause its past my bedtime. fifty fifty chance…

Yeah, I’ve been playing with those constraints. I’m not terribly familiar with them though.
Is there a way to lock an object to the median point between two other objects? That would solve the problem…

I just did some experimenting in blender and pulled it off. It’s not that difficult but requires some tweaking to get it too look the way you want. I made a bone for the base cylinder, then a child bone for the middle cylinder, but made it unconnected. The base cylinder bone is the child of a bone called BaseIK, also unnconnected. For the top(smallest Cylinder, I added a bone CylinderTop, and that is the child of TopIK, everything unnconected. I also did the setup with each of the cylinders fully extended, but I’m sure it for work with them closed.

Now in pose mode, time to setup some constraints to make this work. Have the CylinderBase either IK or Track to TopIK, I did IK, because well, guess I just like IKing things, doesn’t really matter if you IK or Track it though. Then you do the reverse to CylinderTop, having it track to BaseIK. Now if you move BaseIK or Top IK the top and bottom parts will work like a standard piston setup, for an arm you have Top IK parented to your forearm bone, and BaseIK parented to your upperarm bone. The trick to getting the middle cylinder to work is a combination of copy location and limit location constraints. For copy location, you simply have it copy the location of CylinderTop, and set Head/Tail to 1 so that it copies to the tail. That’s all you need for copy location. For limit location I used local space and limited the y axis, the up and down movement of the bone. Because I set it up with the piston fully extended, I set the max to zero so that the middle piston can’t move out any more, but can move in. Thus, the cylinders extend in a hierarchal fashion. You can tweak the settings to get it to move differently.

Attachments



Success! Thank you so much, QS. That’s what I needed.

You’re welcome. I also figured out how to do it so that each part moves out porportional too each other which is pretty simular but provides a different visual effect that could look cooler. Basically, make a stretchy bone and have it stretch to to top IK from baseIK, then add another bone called StretchyGoal to the middle of the the extended piston, and also move the Head of Cylinder middle to that same position, if you don’t do this the pistons won’t all go inside eachother completly. Then instead of having Cylinder middle copy the location of CylinderTop, have it copy the location of of the stretchyGoal bone and set Head/Tail to 0 so That it’s always located in the middle section of the entire piston setup. I don’t know how well I explained that and it’s also starting to get pretty complex, but if the piston is never going to close completely I think it’s a cooler looking effect. Anyways, glad I could help you.

Attachments



So I just did a few more tests with this. Once you rig on piston, there is no need to rerig any more pistons for your model. Simply, Duplicate both the piston and armature objects and keep a copy of them in your file for reference, then anytime you need to add a piston to your model, duplicate and move the objects into place so that the base of the piston is fit into it’s respective joint, then go into edit mode on the armature and move both baseIK and Cylinder Top to the pivot of the target joint, then when you snap out of edit mode, the piston will snap into place, saving you time having to rotate and what not the piston into place, just keep the piston vertical. Then to add it with another armature, make sure you rename all the piston bones to something logical, for example a good naming system for an arm piston for be ArmP1.BIK.R ArmP1.C1.R ArmP1.C2.R ArmP1.Stretch.R ArmP1.SGoal.R ArmP1.TIK.R ArmP1.C3.R

So basically just simplify the names of the piston bones and add a prefix so you know which piston they belong too. Then in object mode select the piston armature and your main armature ctrl+J to join the armatures, and parent ArmP1.BIK to the upper arm bone, and parent ArmP1.TIK to the forearm bone while keeping offset. You’ll also want to parent the stretchy bone to the BaseIK. Now the whole system will work with the rotation of the arm.

This telescoping piston setup is really useful for an arm joint if you place it at the back, so when it pushes the arm rotates.

Ok, I think we got this tackled now! Hit me up if you need anymore help.

Attachments



could you make a pdf on your method/