Hi this is my first post. I've been learning Blender 2.8 for about a month with the aim of creating some simple, stylized animations for a medical device. The device (see picture) consists of two nested barrels, one partially inside the other. Flexible handles connect them and, when pushed together (red arrows) cause the inner barrel to slide out of the outer barrel (blue arrows). When the handles are released, the barrels resume their initial position. I've been exploring ways to animate this motion but with no success so far. I'm not even sure if I should be using IK, or bendy bones or whatever. Could someone point me in the right direction please? Many thanks, Andrew
Would consider using shapekeys for the handles. With two shapekeys fully flexed and fully straight.
For example sake have made the rest of the mesh into shapekeys, however could use hooks or constraints to move cylinders, but what matters here is getting the handle flex.
To open close handle is now only a matter of adjusting flex shape value.
- Model a curve in the shape of full flex out. I've used a simple 2 point bezier here
- For example sake add the default cube, adjust the dimensions to better suit.
- To this add an array modifier, set to fit the curve, and then a curve modifier using same. May need to tweak the curve scale, and / or cube scale, slightly to make sure it's a nice fit, ie how the last one fits the curve
We now have the flexed strap.
- Apply the array modifier, to make it one mesh instead of an array of items, and then apply the curve modifier as a shapekey You will notice the base shapekey is a flat line made up of how many of our unit items fit the curve.
- In edit mode moved the strap up, then adding a mirror modifier on y (top view in examples) axis will give two handles.
- In edit mode with Basis shape key selected, Add the two cylinders, and adjust there position to match there attached ends. Change to bent shapekey and do same.
Locating the pins.
Before I consine file to the ether, added this re using flexible bands to locate other objects
To locate pins that go thru the start and end element of strap
Select top and bottom face of where the pin goes thru and create and assign a vertex group for each end.
Added a pin object (mirrored in y same as flex). A copy location constraint on the pin to the flex, to the vertex group locates it. This can be exended for the pistons.
It should work this way:
- Create 2 armatures, A and B, and create a bezier curve with 3 vertices that follows the armature B’s arc.
- Parent both bones a2 and a3 to bone a1 in Keep Offset mode.
- In Pose mode, give a2 a Limit Location constraint / Local Space mode, with only the Y axis unchecked, so that this bone can only move on its Y axis.
- Hook each vertex of the curve to the 3 corresponding bones of the armature A: Select the armature, switch to Pose mode, select a1, then shift select the curve, then switch to Edit mode, select the bottom vertex of the curve and press ctrl H > Hook to Selected Bone. Do the same for the other curve vertices. Now the curve follows the bones of armature A.
- Select the armature B, switch to Pose mode, select b4, give it a Spline IK constraint, choose the bezier as Target and a Chain Length of 4. Now the bones follow the curve.
- When you move a2, the armature B should stretch. Use a3 to adjust the curve shape.