Feed on
Posts
Comments

As someone who was both a human Jeopardy! contestant, and who has also developed AI software, I have to throw my loyalties with Watson. He crushed his human opponents. Perhaps my pleasure in his win was increased by seeing the champs shaking their heads in frustration as they obviously knew the clues but lost to Watson’s amazing buzz-in technique time and time again, much like my own feelings when I was on the show.

Overall, I am astounded at the progress that has been made in the codification of general knowledge and natural language processing. Watson was simply amazing.

I’ve answered this question in forums and via email a number of times (and touch on it in my next-to-be-published book about character animation), so I thought that I would break the process down here for the record.

Sometimes you will run into a situation where you are generating the motion of a limb (like a leg) using an IK controller, but for some reason want to “bake” that motion right into the leg bones themselves, disposing of the IK constraint later on. Because of the nature of IK and constraints, you can’t simply set keys on the leg bones throughout the process and have it stick — even with visual keying enabled. Bones in an IK chain will not accept keys this way, and for a very good reason. Unlike bones under other types of constraints, the bones in an IK chain remain “alive,” and changing their transformation actively affects the outcome of the IK calculations. So, recording keys on them will alter the very result you’re hoping to record.

The solution is to use two sets of bones: one with IK, and one without. The positions of the IK-controlled bones are keyed into the non-IK set. Here’s how, in abbreviated form. If you want the whole write up with flowers and gilding, you can buy my next book ;)

The Setup

  • In Edit mode, duplicate the main bones of the IK limb. On a leg, this would be the upper and lower leg bones, not including any of the special helper bones that are often used for legs and feet. Put those duplicate bones on a separate bone layer.
  • Make sure that the original leg bones have Deform disabled. Enable Deform for the two new bones.
  • Go into pose mode, and rotate the two new bones a little bit from their original positioning so that you can tell them apart from their originals in the 3D view.
  • Still in pose mode, add both a Copy Location and Copy Rotation constraint to each of the duplicated bones, targeting their original version in the constraint. This will make them follow the IK leg bones perfectly.

You can now use the rig just like you normally would. By moving the IK controller, you move the IK leg bone chain, which in drives the FK leg bone set throught the Copy Location and Copy Rotation constraints. The FK bones deform your character mesh.

The Trick
Unlike the IK constraint, Visual Keying will work with Copy Location and Copy Rotation constraints. So, make you animation with the IK controller, then set VisualLocRot keys on the duplicated Copy Location/Rotation constrained set of bones. This is the key to the process, recording into the F-Curves of the FK bones the apparent transformation of the IK set of bones.

How often should you set keys to record this motion? You might get away with only doing it on the key poses (contact, passing, etc.), but I would be surprised if you got an acceptable result by doing anything less than every other frame. You might even need to set a key on every frame.

The Cleanup
Once you’ve created your VisualLocRot keys on the duplicate bones, either remove or disable (preferable, you might want to try it again) the Copy Location and Copy Rotation constraints. Then, hide the bone layer that contains the main leg bones that are controlled by IK. Play your animation, and you should find that the FK bones have the correct motion, baked into standard transformation F-Curves!

If you didn’t put keys in on enough frames and the motion isn’t accurate enough, re-enable the constraints and add keys more additional frames.

A Quick and Dirty Shortcut
This won’t work as well — and sometimes maybe even not at all — but you can use a duplicate set of bones and the AutoIK feature in conjunction with automatic keying to get the same effect in a pinch. Create your animation with IK as before, and create a duplicate set of FK bones. Do not, however, give them any constraints. Enable AutoIK, and on, say, every other frame, use AutoIK to pose the duplicate FK bones to match the IK set. Depending on how your original rig is set up, this may or may not work, but it’s worth a try if you only need to do this for a short burst of animation and the results don’t have to be exact.

Good luck!

Three new beginner videos

As part of the additional content for Blender Foundations, I’ve been making videos. I have to admit that I’ve recently over-scheduled myself and have been slowly but surely putting the “over” projects to bed. As I’m doing so, I get some more bandwidth to provide video extras on the website.

Yesterday, I put up three new videos: one for hair grooming, one for matching a model to a sketch, and one to simply show live uv unwrap. If you’ve done these sorts of things before, you’re not going to see anything new. However, for someone who is trying to get the hang of this stuff from written tutorials, these would function as nice demos of the features in motion.

Matching A Shirt from Roland Hess on Vimeo.

Make Me Look Good from Roland Hess on Vimeo.

Live Unwrap from Roland Hess on Vimeo.

Teaching Shortcut Keys

One of the Amazon reviewers for Blender Foundations mentioned that later in the book, I stop providing shortcut keys for certain procedures, and that he had to go back in the book to look them up. He suggested that shortcuts should be bolded in the text to make them easy to find. It reminded me that I have a pretty specific methodology and reasoning for how I present shortcuts in the text, and I wanted to explain it, both to anyone using the book, and togiveĀ  other people who are writing tutorials to some “behind the scenes.”

I try to carefully and deliberately manage how I deal with keyboard shortcuts in a book. I always present them in bold on their first occurrence, and keep providing them a number of times afterward. Eventually though, and especially in complex tutorials, I assume that people have become familiar enough with the basics that I can elide them from the text. In fact, I consider that a part of the learning process: it says that at a certain point, you should know this. If you don’t, go back in the text, find it and learn it! My goal for a book or tutorial isn’t just to get you to push the right button or make a pretty picture, but to actually learn the material.

For little-used commands, I will generally repeat the shortcut if a long time has passed since it was last used. However, for common items, I drop the reference after a while. That’s also why I include a little section on the best way to learn the shortcuts. I also usually mention when a shortcut is a “must learn” and when you’ll be okay not spending the brain power.

So, his observation that I don’t always provide shortcut references is correct, but there is a method to what I’m doing. The annoyance and grief you go through looking for the shortcut in the book is but a shadow of the pain that it will cause you if you don’t know that shortcut when you actually start doing your own work. School isn’t always fun.

Judging by the number of people who have told me that Blender skills never “stuck” for them until they tried my books, I’d say that for the most part it’s a sound methodology.

Cheers!

« Newer Posts - Older Posts »