Piston-arm rigging and animate

Hi everyone. I d like to animate a robot. I want to move its arm using control bones (one or many) and this movement should influence its body too.
It has a piston at the shoulder. this one should move up and down according the arm movement.
I m using IK on arm2 bone, and armIK to control it. For the piston i have put duemped tracked constraints between piston_top and piston_bottom bones.
I also use a copy location on base_top bone copying the shoulder bone movement.
This movement isn’t always fine and the skeleton broke many times. Should i manage the piston and the arm singly. I want the body movement in harmony with the all arm.
Should i use other constraints? Waiting for your advises.

also when i cancel a movement of a bone in pose mode, with right mouse click, the all skeleton dont come back properly. Any ideas why?.

Thanks you everyone!

Hey, Welcome to BA

That is usually a sign you have a ‘Dependency Cycle’ most likely due to the piston set-up, but could be something else - check the ‘Console Window’ for a message.(It’s in the ‘Window’ menu).
I am not a fan of this type of piston/cylinder rigging - I prefer using the ‘stretch to’ constraint method - easily modified if you don’t nail it on the first try. Case and point in your screen shot, your ‘piston_mid’ bone is below the ‘bottom_piston’, here is a screen shot of the set-up if your not familiar - post back if you have any Q’s.
EDIT: The ‘Cyl’ bones are parented to the ‘piston’ bone and ‘INHERIENT SCALE’ is UN-CHECKED = very important.

1 Like

Thanks you, i m going to check this “Dependency cycle” issue. I ll let you know if i m stuck on it.

hi, you are right i got some dependency cycle issues :
Dependency cycle detected:
OBPiston_Armature/piston_bottom/BONE_CONSTRAINTS() depends on
OBPiston_Armature/base_top/BONE_DONE() via ‘Damped Track’
OBPiston_Armature/Root/POSE_IK_SOLVER() via ‘IK Chain Result’
OBPiston_Armature/base_top/BONE_READY() via ‘IK Chain Parent’
OBPiston_Armature/base_top/BONE_CONSTRAINTS() via ‘Constraints -> Ready’
OBPiston_Armature/piston_bottom/BONE_DONE() via ‘Limit Distance’
OBPiston_Armature/piston_bottom/BONE_READY() via ‘Ready -> Done’
OBPiston_Armature/piston_bottom/BONE_CONSTRAINTS() via ‘Constraints -> Ready’
Dependency cycle detected:
OBPiston_Armature/piston_bottom/BONE_POSE_PARENT() depends on
OBPiston_Armature/base_bottom/BONE_DONE() via ‘Parent Bone -> Child Bone’
OBPiston_Armature/base_bottom/BONE_READY() via ‘Ready -> Done’
OBPiston_Armature/base_bottom/BONE_POSE_PARENT() via ‘Pose -> Ready’
OBPiston_Armature/Root/BONE_DONE() via ‘Parent Bone -> Child Bone’
OBPiston_Armature/Root/POSE_IK_SOLVER() via ‘IK Chain Result’
OBPiston_Armature/base_top/BONE_READY() via ‘IK Chain Parent’
OBPiston_Armature/base_top/BONE_CONSTRAINTS() via ‘Constraints -> Ready’
OBPiston_Armature/piston_bottom/BONE_DONE() via ‘Limit Distance’
OBPiston_Armature/piston_bottom/BONE_READY() via ‘Ready -> Done’
OBPiston_Armature/piston_bottom/BONE_CONSTRAINTS() via ‘Constraints -> Ready’
OBPiston_Armature/piston_bottom/BONE_POSE_PARENT() via ‘Pose -> Constraints Stack’
Dependency cycle detected:
OBPiston_Armature/base_top/BONE_CONSTRAINTS() depends on
OBPiston_Armature/Shoulder/BONE_READY() via ‘Copy Location’
OBPiston_Armature/Shoulder/BONE_POSE_PARENT() via ‘Pose -> Ready’
OBPiston_Armature/base_top/BONE_READY() via ‘Parent Bone -> Child Bone’
OBPiston_Armature/base_top/BONE_CONSTRAINTS() via ‘Constraints -> Ready’
Detected 3 dependency cycles

i m trying to deal with it, not breaking piston. thanks you.

Hey, That is a lot of Deps loops you have, set it up like I referred to and you should be ok

hello, your piston sytem works perfectly yes when i move it alone. Could i use ArmIK with inverse kinematics on arm2 to move all the arm with the piston? Dependency cycles appear when i use a copy location( or copy tranform) on Upr_Mnt to Shoulder( to retract or contract piston fallowing soulder’s position. Maybe do you have a trick to do it correctly?

I would treat all of your pistons as separate rigs, using object constraints.
Here is a quick sample file:piston rig.blend (672.7 KB)

I set up my rig for the arm, with objects parented to the armature, super simple. Then I made a piston rig with 2 empties and 3 cylinders.

The 2 empties define the ends of the piston. I made a cylinder, and moved the origin to one end, then moved it to the same location as one of the empties and parented it to that same empty, then I added a ‘track to’ constraint, tracking the other empty. Do the same thing for the other end, you now have 2 cylinders that stay aligned with each other regardless of the arrangement of the empties. to make a 3 stage piston, I duplicated one of the cylinders, set the origin to center of geometry and added a ‘copy location’ constraint, assigned to the other empty, with the influence set to .5, this centers the cylinder between the two empties.

Now, take this piston rig and position it on the arm rig. Parent the empties to the objects attached to the armature and it should just work. Now you can select the whole piston rig, duplicate it all over your model whereever you want it to be, parent it accordingly and enjoy.


This is a similar technique to @ajcdfin but with object constraints, rather than bone constraints. I usually find object dependencies easier to work with than bone dependencies, but to each his own.

Hey, those mount bones are there for a reason - (2 really) but they are the bones you ‘Parent’ TO another bones - NO trick. :smiley:
Let me know if you need a file or screen shot

hello, thx you i didnt know that. i m gonna try this method too.

maybe i dont see what you mean. i tried to parent those mount bones(Upr_Mnt) to the shoulder, then it can rotate but piston doesnt move anymore when i move the arm (with ArmIK). Yhx you for your time btw.

Hey, you didn’t happen to parent both of them to the same bone - did you? That won’t work, Here is a screen shot. The little purple bone(Upr_Mnt) is ‘parented’ to the big purple bone - the little yellow bone(Lwr_Mnt) is ‘parented’ to the big yellow bone.

hello,i found a way to do nearly what i wanted. I hav mix both of your methods.
I use a stretch on IK properties of a bone forming all the piston. then i have put ‘track to’ constraints on the 2 objects forming the piston mesh.
no more dependency cycles issue.

I wonder if i could use constraints (here, ‘track to’ ), on different parts of a mesh, and not on all the object ?

i put my blend file, if you have some suggestions or advises i ll take them., thanks you. => http://pasteall.org/blend/index.php?id=52866

Hey, I did not forget about you - just had too much going on, It looks like it might work for you, but there are too many IK’s there. They are restricting your arms movement/rotation and you have those emptys in there - which I get why you added them to eliminate the Dep Cycle. I took the liberty to re-do it a bit, I did keep most of what you have/had. I removed 1 bone and those emptys but added 2 bones back to work the piston, I also put ‘Custom Properties’ on the “ArmIK” bone. These give you more animation options and control, (1) is an IK / FK switch, (2) is an IK chain length switch - it replaces one of those IK const I removed, (3) ia a piston stretch - that also replaces another one of those IK const. There are 2 armatures in this file, “Armature=animation” is just a duplicate of the other one, I animated it so you could have an idea of how I set it up - it has duplicate parts with it also (.001). Let me know if you have any issues or you don’t like it or I over looked/forgot some things.

DISCLAIMER; This file is saved in 2.76, if using 2.7x it will open fine, if using 2.8x, APPEND the objects from the ‘Object’ folder.

hello, thanks you for your model it s seem to be perfect for what i want to do. Sorry being late to answer. i m on another project for now. I m going to try your method on my model et let you know if i see some troubles. Could i post your answer and your model on antoher french forum? .

Yes, you can