Smooth animation from cylinder to semi-circle cylinder

Not really sure how to search for my question on the internet, so hopefully someone here can offer some guidance. Best way to describe what I’m trying to do is to imagine PacMan opening and closing his mouth. I’ve initially tried using Shapekeys, but rather than rotating the ends of the cylinder around in a circular motion, they collapsed in the final position in a linear fashion. I can try an put together some images if that would be helpful. Thanks.

You can animate two cylinder half to rotate shut. Keep the origin at same location. And one of the cylinder needs to be little smaller so that you don’t get face over face interference look.

Or, you can use armature to close the opening as well. Bone rotates from its roots (or head). You can use bunch or bones to make the rotation uniform or use careful weigh painting of mesh.

This is what you probably should do but be warned that Blender as part of its design - and maybe this is to be consistent with some industry norm - moves vertices with a weight of 1.00 exactly as much as vertices with a weight of 0.001. I never understood this, but it’s the way things are. So if you want some verts to not move much you have to have more than one bone they are assigned to…


Unless you are an absolute whiz at weighting I really think it would be faster to make absolute shapekeys - I mean - how long is this action? - a second? half a second? that’s 15 keys, a simple rotation each time - 2 or 3 minutes work. I spent longer just to get the bad weight painting for the screenshot above. In fact -

Well, that was fun. Got carried away with the flashing - can’t quite remember what Pacman did after eating…

But the modeling - Start with a half circle. One vert lifted slightly. Set proportional editing so that when this vert is rotated around the cursor which is at the center (of the circle, not the half circle!) all the others except for the last one also rotate to some degree. Mirror vertically with a modifier and solidify, also with the modifier. Add all your shapekeys (15 here, maybe too many for fast munching). Uncheck the relative box.

Now for some fun!

Go to the first shapekey, in edit mode press R for rotate, enter the amount you want to rotate (-6.25 here) press the star key twice (once to enter num mode, once to multiply) then enter 1 for your first key, hit enter, switch to the next key, repeat exactly except enter 2 for your multiplier, 3 for your 3rd key etc. Thank the developers for not taking out numerical entry to appease the ‘I never need to use math in Blender’ crowd! Without it this would take much longer.
Keyframe the evaluation time, and you’re done! I used a cycles modifier in the graph editor to repeat the action.

I’d use bones and an armature, but that’s how I roll… :cool:

@ DruBan:

This is what you probably should do but be warned that Blender as part of its design - and maybe this is to be consistent with some industry norm - moves vertices with a weight of 1.00 exactly as much as vertices with a weight of 0.001. I never understood this, but it’s the way things are. So if you want some verts to not move much you have to have more than one bone they are assigned to…

/uploads/default/original/4X/8/c/9/8c9739b8a6f5c5589046076f949941425497c73d.pngd=1403286861&thumb=1

Here’s how weighting works in blender and it’s so simple, you’ll probably do a face plant into your hand.

The sum of all weights always adds up to 1, or 100%. Weight a vertex .25, or 25%, to a single bone, and the bone influences it 100%. Weight a vertex 100% to one bone and 50% to another bone, and you got a 33/66% split in the weighting because a vertex cannot be influenced more than 100%, or a weight greater than 1.

In your example picture, if you had a third bone, like a master bone that was the parent of the 2 bones you have, it could be used for movement of the mesh, and to mix the weighting with to give you the results you want. The back of the mesh would be weighted 100% to that bone, then you’d blend its weighting into the other 2 bones.

Auto-normalize in the tool shelf while weight painting will adjust the weights so they are always at 1 as you weight paint. Add influence to a vert for one bone, and it subtracts weight from the other bone, select the other bone to see the change.

Randy

Hi Randy, thanks for the explanation. That is the way to get it to work, but the weighting falloff is difficult as the bones are moved through a larger arc. (The OP only wanted a 45d movement on each bone, though, so it would have been OK).

Imagine this similar scenario though: You have the same disc, with a little slice taken out between 12 and 1 o’clock. Now I want the edge at 12 to remain stationary, while the edge pointing to 1 I would like to rotate clockwise until it points to 11. And I want the motion to be smooth, that is, no clumping of the verts.

The ‘blend’ and ‘gradient’ painting in the weight paint probably have some secrets that I have yet to learn, but suffice it to say that a linear blend still results in overlapping vertices. Of course for characters there really isn’t an option besides doing this, but a simpler geometry like the cylinder was too tempting to shapekey!

Actually, for the purpose the OP asked for, your shape key method is the best. Simple solution, simple mesh, simple open/close animation, nothing dynamic or changing, so it works well.

I mentioned the third bone to explain the need for another bone to blend the weight to. I prefer bones for anything that would be more complex than this. Using armatures allows one to keep all the key frames in the action editor. Without an armature, to animate this with shape keys, you’d need to be working in the shapekey editor for that, and the action editor for the location. Of course, now thinking this thru, I think I would rig this with a 3 bone armature, makeing the mesh a child of the main bone, use the other 2 bones (mouth bones) to drive the shape keys… That keeps all the animation in 1 editor…

Randy

Yes, I have noticed you offering very good instructions on rigging and animating I always find them very helpful. Nice how people all have their specialties on BA.

Whoa… this thread blew up a bit. Sorry for the lack of communication.

I actually figured out my own solution about an hour or so after the original post, and finally had a chance to proof of concept it. Essentially I extrude a cube’s sides out along the x-axis several times, creating a plane with a z-axis (not sure what you would call that.) I then created a circular bezier curve, and using the curve modifier, successfully created a cylinder. Then, creating a shape key for the cube, I collapsed the sides into the cube. With curve modifier in place, this successfully created the animation I was hoping for.

ROFL. First rule in answering questions on BA- ask, “Do you have a picture or sketch of what you want your result to look like?” Ignore this at your peril!

All these solutions would have worked… I just discovered my own solution before anyone had replied, and quite frankly I think my solution is quicker to implement and smoother so I thought I would share it… Fuck me, right?

Not at all… I’m glad you found your way that works for you… it happens all too often that us overenthusiastic helpers just get carried away and fly down some complicated path that had nothing to do with the original intention -but maybe it’s all helpful to someone in the future to read this anyway.
Cheers.:smiley:

It’s all good, and it just goes to show ya, there’s usually more than one way to accomplish what you want with blender.

Randy