# Rigging a Pac-Man-like character

I have created a character that is basically a big moving eye with a tail. I am having problems wrapping my head around how to assign bones and weight it appropriately. Here's a picture:

I have been trying to mess with the weighting of bones, but it has not produced any good results. The most acceptable solution I have found is using two halves of a sphere and then assigning a bone to each of them. Here's how it looks:

However, this solution produces some artifacts where the spheres meet, and it gets even worse when lighting is added. How can I go about adding bones to this character so that its eye can blink? Note that I can't use any fancy Blender built in stuff because this model is going to be used in my game developed with libGDX, which I believe only supports bones and weights.

If it's hard to imagine what I'm asking, you can think of it as a Pac-Man. How would you rig a Pac-Man so that he could move his mouth?

To give it a good look, you must add up more bones (like in an eyelid, to give folds , stretch and squeeze)(Eyeball not included).

Here, I have created a sphere, rotated it, so that both poles are on x axix (16 segments, 16 rings) Then added an armature, 1 root bone, rest for eye folds ( though , i haven't added any subsurf, or details).

Rotation constraint is applied to every other bone, so that they follow the first bones (top bottom) when ever user moves them (this gives natural look).

NOTE : I am going to create a Cacodemon out of this blend file :)

Here is a link to blendfile.Pacman

• Thank you so much! Did you assign weights to the bones by hand? because theres some weird stretching when pack-man fully opens his mouth? If you didn't do it by hand maybe you could tell more about how you did it? Apr 17 '14 at 13:43
• It was automatic weight paint. Stretching is due to no geometry between vertex of bones. Add up 1 more line of poly between 2 bones and weight them 50 50, after that stretching will be less. Also, the back side is weighted to b7 and b4 (auto). It isn't a work of art. just an idea for you :) Apr 17 '14 at 16:00

1. Bind each half loop to each control bone;
2. Add a bone constraint called Copy Rotation to each bone except the outermost one, set all target as the outmost bone (the longest one in the image below), adjust the Influence value for each degressively.
3. After that, you can control the open/close action simply by just tweaking the outermost bone.

• This looks perfect thank you! One question though: how do you assign the weights so perfectly, do you do it by hand or is there a shorter way around it? Apr 17 '14 at 13:41
• @JustasSakalauskas Sort of. First: Ctrl P > With Empty Groups, then select the half circle loop, then assign those vertices manually to each vertex group. like this. Ragarding the rigging constraints, see this. Hope it being helpful. Apr 17 '14 at 15:31
• Leon, this is great! I was wondering how you got the mesh to show it's geometry in the 3D Viewport even when it's not selected? Apr 17 '14 at 15:53
• @ThomBlairIII go to Object Data > Display and enable wire. This way, your mesh will show up wireframe. After that, instead of using f12 to render the animation. Go to render tab , and select OpenGL Render Animation. (This renders the viewport without fance effects etc) It is a very useful tool. I usually use it send my animated renders to the clients, to show off deformation. Pro Tutorial Maker, seldom mention this. Apr 17 '14 at 16:02
• @ThomBlairIII Do you mean this? Apr 17 '14 at 16:03

You can achieve this using the Screw modifier. First, add a bezier curve:

Change the shape to half a circle in edit mode:

Go back to object mode, and add a Screw modifier. Change the axis to the the axis that should be in the middle of the sphere, in my case the 'X' axis:

Add a Mirror modifier, and change the Axis to 'Z':

You can now change (and animate) the Angle value in order to open and close the 'mouth'.

(this gif is a bit distorted, the actual mesh is spherical)

Optionally, you can increase the number of Steps and add a Solidify modifier on top to make it look better.

You could try moving one of the eyelids (the lower one is better for this) forward a little bit. The overlap artifacts would be gone, and it would look fairly clean (unless the user frequently gets up-close and personal with the bottom of the eyeball creatures). If the top eyelid is moved upward too far it might show a bit too much as well. You won't get a perfect spherical Pac-Man model, that I don't think is doable. This would be a quick way to get this working well quickly and easily.

If making more of an animated Pac Man character I've tried something similar to the curve with mirror response, but with a driver.

Start with a half circle curve, make sure that the corners are sharp (V key)

Animate the Y rotation

I add a Screw modifier with a driver based on the Y rotation of the body. The thickness modifier closes the mouth but you have to be careful not to over do the thickness value.

Driver that takes the Y rotation from the body.

Animated body rotation on the Y axis.

Additionally I applied the eye as a texture in the Cycles emit material.

Join the two eyelids at the back so you basically have one sphere covering the entire eyeball and use two bones to pull the eyelids apart at the front of the eye.