How to Rig an AT-AT neck and head?

Hey all, this is my first post!
I’ve been using Blender for about a year and a half now, but I’m wanting to start doing some modeling for animation. The project that I’m working on right now is an Imperial AT-AT walker from Star Wars, but I’m having trouble animating the neck and head. I need to have the neck be flexible and move like you would expect a plastic corrugated pipe, or something similar, to bend and flex. I would post a picture if I were able to but I don’t have enough posts yet lol.

At the moment I am using an array of rings with a curve modifier on them to follow a curve. By grabbing one end of the curve it achieves the bending effect I want, but I have no idea how to attach the head to the end… Idk if bones would be necessary for this kind of thing, and I have no experience with them yet.

Any suggestions or improvements are appreciated!

Unless you’re animating only a cube-- always make an armature for it.

The curve method you’re currently using to bend the neck would work for a single frame render… but not an entire animation.

Since the neck would probably be the only part of the mesh that would need to be slightly deformed (though since it’s made of metal, it technically shouldn’t bend at all) it should be quite easy to do. You need to watch some videos on the basics of rigging so you can learn about armatures/bones, bone relationships, bone constraints, vertex groups, and vertex weights. Once you learn this you’ll easily be able to do what you explained.

It might take some trial and error when you’re first delving into it but that’s the best way to fully learn it.

Thanks for the feedback, I’ll watch some tutorials today and learn what I can!

So I’ve done some work on the model adding an armature and learning how bones work, and I’ve got the neck and head pretty much figured out. I’ve hit a roadblock though, as I can’t figure out how to set up the last part of the piston connected to the foot and leg. I have successfully gotten the piston to follow itself correctly using tracking, but the ball joint at the top won’t stay in the socket when the ankle rotates. It worked if I had the bone starting in the middle of the ball, but that messes up the object tracking… How would one go about setting this up? I included the .blend :slight_smile:




The easiest way to rig hydraulic cylinders is with a simple armature, using a Stretch To constraint for the cylinder stroke, with parented bones for the cylinder and piston. Look VERY CLOSELY at the armature in the blend file below to see which bones inherit rotation and scale - it is very important. I have a attached a blend file with several examples of how to rig hydraulics. There is an alternative method using empties and Track To constraints, but it is harder to setup, so if you are new to Blender, the armature route is the easiest. You can also do this with IK constraints and allowing the IK bone to have scale properties, this is harder still for the novice, so I recommend the simple Stretch To based solution. :yes:

Cheers, Clock.

cylinder-problem-ver3.blend (1.83 MB)

You can just press Play to see the whole lot moving.

Thank you for the response :slight_smile: I tried pressing play and the animations didn’t run, but I will study the examples and figure them out :slight_smile:

Turn on Auto Run Python Scripts in User Preferences/File . (This is why the animation is not running.)

Ah yes that fixed it, thanks!

Here is your file with an updated armature and working piston. I have a small (heh) write up (with pictures!) that I’ll have to post tomorrow on what I changed in your rig and why as well as some tips on rigging and other things.

For now, have some fun with it.

http://www.pasteall.org/blend/38520

Good luck!

I forgot to say before, welcome to the forums and I like your model.

I hope you don’t take offence but I am going to throw a long list of things at you. Keep in mind that I am trying to help, not beat you over the head. Hopefully others can learn a trick or two as well.

First, things first. This model is made up with many mesh item. (which is fine, but…) Almost all of them have some level of unapplied location, rotation or scale. If you look in the Transform channels you can see that some items have values other then zero for location and rotation and values other then 1 for scale.

For an example of what this means, and why it’s a “Bad Thing”, select all of you meshes (in your original file, not mine) and use the hotkeys Alt R, Alt S and Alt G. Your AT-AT will crumble. Ctrl Z to undo the damage. (multiple times)

This is not a good thing. To fix this select all your mesh items, Ctrl A, Apply Location, Rotation and Scale.

You will need to do the same to your armature as it looks like you scaled this as well. Select it in Object Mode, Ctrl A, Location, rotation, Scale.

All of your items and your armature should read: 0,0,0 for x,y,z location and rotation, and 1,1,1 for x,y,z, scale.

Here is a pic of a before and after.


Look at all of the orange dots. These are the origin points of your meshes and armature. The second image you will notice that there is only one dot. This is because all the items now have an origin point set at ground zero of the scene. They also have no location rotation or scale values.

With this setup, you can no longer destroy the meshes by clearing the transforms. The meshes and armature also share the same size and position in space.

Next, rigging tips.

I think it’s a bad practice to use empties in rigging especially when you are already using an armature. An armature has an advantage over all other items within Blender and that advantage is, you can have multiple bones within that armature, but it only requires one action to move those bones. If you had an empty as a control, you would need an action for every control that you set up this way. This complicates animation needlessly. It’s also pointless as a bone can do anything that any empty can do, and much more.

(I know! My good friend, Clockmender used them in the file he gave you. I’ll have a talk with that dude.)

You were only using them as objects to point constraints at, so in this case it’s not too big of a deal, but, one of your goals was to animate this object, so stick with bones and armatures while rigging. It will help down the road.

While on the subject of bones, one thing I noticed was you often had quaternion rotations selected for a bones rotation. (This is the default rotation type assigned to bones when you add them.) Then, you locked off two of the three axes. This will also complicate your animations. Quaternions use four values. W,X,Y and Z. If your bone will only be rotating on one axis, change the rotation type to Euler. You will notice in the drop down that there are many choices. Pick one that starts with the rotation that you are using.

For example, if the bone will only rotate in X, pick Euler XYZ. Only rotating in Z, pick Euler ZYX.


Quaternion rotations are great if used in the right situation. Anytime you have a bone that will be rotating on multiple axes, pick quaternions. The reason you do not want them here is, you will need to polish the W and X values in the graph editor, instead of just the X. Sometimes you can get into trouble with Euler rotations if you need a bone to rotate on multiple axes. They can sometimes cause gimbal lock. Quaternions don’t have this issue and will NEVER EVER cause gimbal lock. (mathematicaly impossible).

I would suggest reading up on Quaternion and Euler rotations and get a good understanding of each. It’s harder to explain then to understand if you have the right teacher. (My teacher was Nathan Vegdahl, author of Humane Rigging. A must watch for riggers, IMHO. Search for it.)

One other thing I noticed is your bones all had the Deform option ticked in Bone Properties. (See image.)


The only bones that need this checked are bones that actually deform the mesh. In this case, only the neck bones currently deform the mesh. This is a bit nitpicky, but a good practice to get into. If you do character rigging later on, you will not want your mechanism or rig control bones deforming the mesh. (Usually.)

Last but not least, you should always have a root or main bone. This bone is the master of the armature and will take every other bone with it in space. It will also be needed later to parent things like IK pole targets and other mechanism bones.

To Be Continued… after I sleep and work…

Wow, thank you for doing that and taking time to give all the great feedback Dan. No offense taken at all, I’d rather have someone point out my rookie mistakes so I can fix and learn from them :). I took a look at the file you sent back but will have to dive further into it tomorrow (later today lol…) as I should also really be sleeping!

Thanks again.

Hmm - guilty as charged your honour!

However, in my defence I did say that @Quiznos323 should use an armature… I included this method because at the time I posted this file originally, someone else berated me for NOT showing techniques using empties and constraints - you just can’t win…

Anyways, my good friend Danpro, is very wise and his advice is very sound and you should use an armature, not empties and constraints - there now someone else can have a grumble about that - teehee!

Cheers, Clock.

Your a good sport as always, Clockmender.

Quiznos323, if you have any questions about the rig, feel free to ask. Rather then rambling on, I think it may be better to answer specific questions if you have them.

I should look into some screen capture software. It would be easier to record tutorials then write them.

Any suggestions?

I will for sure if I have any :slight_smile:

Edit: I do have one. I noticed that you fixed some weirdness going on with the bending of the neck, was that done by improving the weight painting, or by another method?

Edit 2: Also, I noticed that the bones in your model have the axis turned on. How do you move the head or tail of the bone along just these axis? Turning on local translation does not seem to have an effect.

Open Broadcaster Software (OBS) is pretty good. It’s free, can record in HD with no watermarks, and though it’s primary use is for streaming, it works just fine for recording your desktop and specific programs.

I was just playing around with the weights a bit. I added some weights to the body bone to keep it from pulling away from the collar. It’s far from perfect.

To move bones I set my Transformation orientation to Normal. This way I know that If I use hotkeys (G-X, for example) typing the axis once will move the bone on the global axis, and axis time two (G-XX) will move the bone along it’s local axis. I also use the 3d cursor a lot. Often I will tab into edit mode of a mesh and select an edge loop, snap the 3d cursor to that selection, tab into edit mode of the armature and snap a bones end point to the cursor. Shift S will give you a menu for 3d cursor functions.

Good luck!

Hey all, it’s been a while (schoolwork has been consuming my life). I made the changes to my AT-AT rig that DanPro suggested and, for the most part, have been pretty successful. The part giving me trouble now is that the upper part of the piston is rotating in the wrong direction.


I’ve gone over the hierarchy and bone settings many many times but I can’t spot the issue…
I attached the updated .blend for anyone who wants to take a look at it.
Thanks!

Select your IK bone (in Pose mode, it should be yellow in color), Bone Properties > Inverse Kinematics > Lock all axes.


Because you have a weird rotation point, (the ball joint) the only way to make a bone rotate from that point and also track down a different point is to use two bones. The end bone with the IK will point it’s tail at the target. By locking all of the IK axes on that bone, the second bone is forced to rotate at it’s head. (The head is placed at the ball joint rotation center.)

I hope I’ve explained that clear enough. If not, Let me know.

Good luck!

Got it, makes perfect sense, thank you :slight_smile:

It’s been a bit (what, almost 5 years? lol), but at the end of last year I finally took the time to finish this project. I’m pretty proud of it, and glad that I finished something for once. Hope you enjoy :slightly_smiling_face:
Programmers CAN be artists! This is proof :laughing:

1 Like