Wednesday, 8 February 2012

Softimage XSI: Keyframes and the animation editor

Sounds like a great title for a film -Keyframe and the Animation Editor! Easily the next Harry Potter...

Anyhow, figured I'd do a little post on keyframes just to act as reference. I also find that this sort of recap is really helpful to me - having to go back and re-explain everything I've covered in words really gives you a good perspective as to whether or not you've truly understood something. If you can explain why and how you did something, it's gives you a more flexible knowledge of applying it. Or... something...

These things make sense in my head.

At the bottom of the screen is the timeline. It's fairly straightforward, works much the same way as any other timeline; it displays frames! Click a frame and it takes you to that point in the animation. Keyframes are represented by those little red boxes.

At the bottom of the window is a gigantic icon of a key - here I have auto keying turned on (which basically sets keyframes automatically whenever the value of an object is changed) so my big key is greyed out. However, turning that off for a moment, the key will appear green which means you can set a keyframe at that point in time.

(Auto keying appears to still be turned on at this point - ignore it, it lies! I turned it off!!)

Click the key to set the first keyframe at the beginning point of your animation. The key will turn red and a keyframe will appear in the timeline.

We can then select a new point in the timeline (frame 20, say) and change the value of our object to set the new keyframe at that point.

Now if we select the scale tool (for example - it works with any of the transform tools) and change the value (in this case, squashing our ball flat) the key will turn yellow. This means that a value has changed, but a keyframe has not yet been set!

Click the key and it will turn red, indicating that there is a keyframe at this point. The new keyframe will appear on the timeline, and an animation will be created.

It works much like After Effects or Final Cut or anything of that nature really, just with a slightly less fancy interface! You can also set keyframes with a keyboard shortcut - K.

Editing keyframes isn't readily explained and so confused me for a while but it's actually pretty simple once you know where to go! To shift the position of keyframes on the timeline, hold shift and drag across them - they will gain a white border to indicate that they're selected. To move them, position the cursor over the keyframes (a hand icon will appear), hold the middle mouse button (hand will "grab" the frames) and drag to move them along the timeline!

You can also right click selected keyframes and right click to cut, copy or paste keyframes. You can also delete 'em from here!

This is probably the most useful way of getting your initial, basic animation down, but it's very limited and doesn't give you terribly fantastic results by itself. The real tweaking and refining seems to come in the form of the Animation Editor that I talked about previously:

This big, scary chart shows you the curves of your keyframes, plotting its motion/position through time and space. It's terrifying and I didn't understand it at first (still not entirely confident with it) but I've spent a bit of time looking into it and it's beginning to make more sense now.

It basically plots the keyframes of any given parameter of an object on a chart. By default it displays EVERYTHING, which for a complex animated scene means lots of wiggly lines everywhere, but you can filter the display and select what you want to see with the menu on the right. Here I've selected the "pos y" movement - i.e. the up-and-down movement of a bouncing ball. The little green dots are keyframes!

The bottom row of numbers on the chart are frames. The numbers on the left basically represents the value of the parameter - so, effectively, dragging the keyframes left and right on the chart adjusts the timing whereas dragging them up and down alters the spacing or shape or whatever (in this case, for example, dragging a keyframe upwards would move my ball higher into the air on that particular frame).

But that's not all! You can also really fine-tune the slope of each curve to adjust the timing and spacing accordingly. Using the keyframe/animation editor select tool (keyboard shortcut Y), click on the keyframe (or keyframes) and these little bezier handles appear.

You can drag these around and alter the slope of the curve, tweaking your animation accordingly. You also get a nice onion skin-type thing that shows you the old curve for comparison.

You need to be careful with the editor however as it can actually place frames between frames (called "ticks") is probably useful in something complex like a walk cycle or other complex movement. However, in this instance, it would be more of a hindrance. To turn it off, click on Edit in the Animation Editor and make sure "Auto snap to frames" is checked! I wasn't aware of it at the time so I ended up with a lot of these "ticks" all over my timeline... quite confusing and made editing the timing/spacing very difficult.

I knocked up a quick ball bounce using this editor to try and get a feel for how it worked. It wasn't entirely successful, but it's getting there.

The timing's a bit off - I think there needs to be more of a clear acceleration as the ball drops and I possibly need to hold the squash for just one frame longer? The second and third bounces are too jittery - there needs to be a clear distinction in height and speed to give the impression that the ball is losing energy as it comes to a stop. They're very similar right now - it kind of judders then suddenly stops. To be honest most of the problems were due to my lack of knowledge of the interface (weird as that sounds). I couldn't figure out how to achieve those things because, at the time, I didn't understand how the animation editor worked or how I was supposed to alter the timing properly. I now have a bit more understanding, though, so hopefully I'll be able to improve things on the next attempt!

No comments:

Post a Comment