Thursday, July 21, 2011

Leg & Foot Rigging: Trial and Error

After trying Tob's tutorial for the first time yesterday, I failed. Not completely, but things weren't working right. I was trying to apply it to my model while watching the video. I renamed bones differently because I didn't like his conventions and so forth - that may have thrown me off.  Last night I spent a few hours toying around with what I've learned so far until I got tired.  It seemed pretty hopeless in the moment, but I learned some IK behaviors in the process.

Today, I started Tob's tutorial afresh from the basic scene - no mesh - no nuthin.  Maybe things have settled in my brain a bit better - I've succeeded in getting through videos 2 & 3 which are the hardest parts (so he says. I'm feeling better about this whole IK thing, but really, I just can't wait to get to the point where I can start animating some actions properly.


Q&A
Here are some questions that I had, my solution, and links to the source.

Q. Why are my bones with IK constraints showing as orange rather than yellow?
A. The bone is not being targeted "correctly". In order for a true IK to work you must target a bone that is outside the chain / is not parented to any bone in the chain with the IK. If the bone is targetless or if auto IK is on, this  means that when you are animating you have to track all of the bones in the timeline individually vs. only having to track the targeted bone.

revolt_randy on BlenderArtist.org :

First off, you don't have a proper IK setup. Notice how the bone with the IK constraint is orange in color. That means there is an error, proper IK constraint setups are yellow in color. The way you have it set up, it works as a 'fake Auto-IK'. You can use it this way, but you have to do a couple of things. First, when you set your keyframe on frame one, you will have to set rotation keyframes for all the bones. It's easiest to just select all the bones, and set loc/rot keyframes for them all. Then make sure you turn on auto keyframes in the time line. (that's where I had my stupid moment) Now advance to frame 31, grab you bone with the constraint and move it. Keyframes will be made for the bone you moved and all other bones that were moved. Then it works how you expect it to.

You can also, remove the constraint, and in the toolshelf, select the 'AutoIK' option, then repeat as above, does the same thing.

To make a 'proper' IK chain, you need to add one more bone, which acts as a controller for the chain. This extra bone cannot be parented to any bone in the IK chain. Then you can control all the bones in the chain by just keying this one bone.
view entire thread


Q. How do I lock rotations in an IK chain?

Inverse Kinematics options

A. The closest thing I've got is the documentation on WikiBlender.org,  but the documentation is for version 2.4:  http://wiki.blender.org/index.php/Doc:Manual/Rigging/Posing/Inverse_Kinematics
I've found that in 2.5 the options / settings are in (Armature Pose Mode) Properties Window > Bone Panel > Inverse Kinematics.  Here you can lock the bone from rotating in certain ways even if it's in an IK chain.

In order to limit a bone's rotation / location / scale in any other scenario, you can select the bone, then add a Limit Rotation / Location / Scale Bone Constraint from the Bone Constraints Panel while in Pose Mode, or toggle Transform Locks in the Bone Panel while in Pose Mode.

Wednesday, July 20, 2011

Leg & Foot Rigging

Wow, when it come to rigging and Blender, this guy really knows what he's talking about it seems:
Tobuslieven Youtube Chanel

Image of rig from Tob's tutorial

The last tutorial I found for rigging a squat or sit was pretty bad in hindsight, or was just too simple for what I want to achieve. Problems came up when I tried to move the foot independent of the leg. It was not a very sound structure for animation.

Tob is making some clean rigs that I can't wait to try. I'm going to eventually scrap my last leg rig (uuug) and try out this one.  His tutorial is in version 2.5 which is a plus for sure, and following the foot tutorial he has a tutorial for a leg rig which I haven't viewed yet - all of which can be found here:
Youtube Playlist: Blender 2.5 Foot and Leg Rigging Tutorial

Thanks Tob, and everyone who takes the time to make tutorials, even the ones that turn out not so great. I've learned something from every one that I've viewed so far.

Tuesday, July 19, 2011

First Human Character: Progress

I haven't been tracking my progress very well, but I have been learning a ton. Here is a screen shot of my most recent model:

my model squatting / sitting using IK Constraints
I'm being lazy about my blog but here are the steps and skills I used to create her:

PREPARATION
> Created orthographic sketch in MyPaint and GIMP
> In Blender, added sketch to background and split 3D window and set to front and left orthographic views

MODELING

> Added a mirror modifier to a cube split down the middle and mirror-modeled one side of body mesh (body mesh included body arms and feet)
Mirror modeling saves a ton of time and allowed me to work maybe 3-5 times as fast because I didnt have to manually match up left and right and I didn't have to duplicate or create anything separately.
> Modeled hand mesh in separate file, saved as .dae and imported to main character file
> Joined hand and body mesh
> Created head from a split UV sphere in body mesh

> Created left side of armature naming all future duplicate bones with the extension .L

TEXTURING

> Created UV map of completed mesh for texturing
> Textured a bikini using MyPaint and GIMP (Linux OS so no Photoshop)
> Learned how to implement transparent (alpha) UV textures
> Learned how to map a texture onto a material and use premul (premultiply) for smoothing of edges


ARMATURE
> Parented armature to mesh with named groups
> Manually assigned all vertices to vertex groups
> Created a couple items like a hat and hair, then parented to head bone of armature.> Tested rigging thoroughly
> Mirrored armature
> Learned how to automatically rename .L extension to .R by pressing Wkey in Edit Mode
> Combined armatures

> Learned how to automatically create reflected vertex groups and apply to complete armature

IK RIGGING

Now I'm learning how to create IK chains - it's probably been the most frustrating step next to learning how to implement textures with alpha.  However, it might just be me making a simple thing into a difficult one - I tend to do that sometimes.

RIGGING CHARACTER TO SIT AND SQUAT

My most recent breakthrough was rigging my character to squat or assume a sitting position using IKs. I watched these videos and found the solution:

Video 1 teaches you how to set up the pelvis bones:
Blender Rigging Intro Part 1

Video 2 sets up the patenting hierarchy and foot bone IK targets:
Blender Rigging Intro Part 2

Video 3 finishes up the IK constraints and targeting so the character can sit or squat :
Blender Rigging Tutorial-Part3

This guy's video is alright, I got impatient watching it, mostly because he makes mistakes in one vid that you have to be sure to go back and fix once you see it in another. Pay close attention to his set-up, IK rigging, and mistakes through all three vids and you should be alright.

EVENTUALLY

Eventually, I'm going to create some tutorials of my own for others to view, but right now, I'm too busy making mistakes and learning from them. If there are any questions about the steps that I make above, feel free to leave a comment, and I'll elaborate.