Wednesday, August 24, 2011

Topic 4: Posing - Importing and Using Animations


[This is post is part of a series of tutorials.]


Topic 4: Posing - Importing and Using Animations


Okay, so one thing you can do to get some basic poses is to import in animations.

All of the animations found in game (running, walking, crouching, holding different kinds of guns, etc.) are in the folders somewhere. Each type of alien has specific animations because they have specific rigging. If you try to give a Turian a Krogan's animations, you'll end up with a really effed up looking Turian. (It's actually quite hilarious in a horrifying way, but still, it's not what we're looking for.)

These animations can be imported in the same way you can import in .psk model files. It uses the same script actually, so yeah, let's do this thing! I'll be using my comic female Shepard again, but feel free to use whatever humanoid you'd like.

  • Click on MAXScript up on the top menu.
  • Click on Run Script...
  • Open up ActorXImporter.ms from wherever you keep it on your computer.
  • Click on Import PSA...
  • If you're using female Shepard like I am or any other female model, navigate to PTY_EX_HumanFemale.psa, which can be found in multiple places, but BioH_Convict_00 has it in its AnimSet folder. (If you're using a different model, its animations will most likely be in their BioH folders, and you'll be looking for PTY_EX_[NameOfSpecies].psa.)

Once you've opened up the PTY_EX_[NameOfSpecies].psa file, you should see a list of animations, AM_PistolTwitch01 [###] (the number in the brackes denotes how many frames it has, BasicPose, and two others. AM_PistolTwitch is in pretty much all the PTY_EX_[NameOfSpecies] animation sets. It's a basic idle/waiting kind of stance.

To do that, either...

  • Double click on AM_PistolTwitch01 [180]
  • OR click once on AM_PistolTwitch01 [180] and click on Load track.
  • (Either works just fine. Just don't click on Load all. That's not what we want.)

So, you should see your model go into the first frame of its pose, most likely just standing.

If you press Ctrl-A (to select the whole thing), you'll see a bunch of crazy black hair lookin' things down in the timeline at the bottom of the screen with red, green, and blue in them (which stand for position, rotation, and scale respectively). Those are frames. Each object has a frame. So, like, an elbow bone needs a frame, a toe bone needs a frame, a neck bone, an eye bone, everything. (That is, if you want it do something.) Also, for each object, there's a frame for position, one for rotation, and one for scale.

If you right click on one of those frames and just highlight over Configure Keys, for example, you'll see that there's a position, rotation, and scale listed for a lot of bones. Parts that have frames at the currently selected time will have white boxes around them.

Anyway, I won't go too much into animation right now, just as much as you need to know. So, if you want to see the animation play, just click the play button that's down at the bottom right. There's a rewind button, a go-back-one-frame button, then the play button right after it.

Click it, and you'll see the animation loop around.

Whenever you import in an animation, the timeline usually automatically adjusts to exactly how many frames it needs in order to loop smoothly. In the case of the human female's PistolTwitch, it's 180 frames (starting at frame 0, so it goes to 179 frames).

You can click on the little scrolly frame counter bar just above the timeline and move it back and forth. That also plays the animation as it goes, and allows you to get to a specific frame if you need.

This is helpful if you're wanting to do some kind of pose with the animation and you want it to be at a specific frame within that animation. For example, if you want female Shepard to stand with her hand on her hip lookin' like some kind of badass, you could just move the little scrolly awesome bar to, oh, maybe frame 100 or so. (The little arrows on the sides of the bar move one frame, which is kinda helpful at times.)

If you move, rotate or scale something, you'll essentially break the animation. It'll still animate, but the thing that you moved won't animate properly anymore. This isn't a huge deal if you're just making a pose and do not need the animation except as a base pose from which to start.

So, also, you can only load in one animation at a time (as far as I know). I've never needed multiple animations for one character anyway. I mean, since it's just basic posing that you only need one frame of, I don't see why you'd need that anyway.

It's a good idea to save before loading in an animation, just in case it goofs up your model. You can just revert back to the save, since I don't think you can just undo an import.

Some other tidbits:

  • To scroll through the timeline itself (past the specified numbers): Ctrl + Alt + Middle Mouse Click on the timeline and move left and right while holding all of that
  • To "scale" the timeline (aka zooming in and out basically): Ctrl + Alt + Right Mouse Click on the timeline and move left and right while holding all of that
One thing I do is delete all the frames once I've gotten the base pose picked out that I want. To do that:
  • Click once on the timeline (it should highlight with light blue) 
  • Hold Shift and drag to select all the frames.
  • Push the Delete key. 
  • Shepard will still retain the pose even though you deleted all the frames.
  • If you play or move the scrolly thing to a different spot at the timeline, Shepard will still retain the same pose (unless you forgot to delete some frames, in which case, hit ctrl-A again, and make sure you've deleted them all).
Deleting the frames isn't a necessary step. It's just something I do to make my work a little easier, just so I don't accidentally move the slider and change the animation on myself. (Also, the white boxes go away, which makes it easier to see things while working.)


So that's the basics of importing and using animations! They're good for getting basic poses fairly quickly, like for standing or something. 

The next topic will cover using multiple characters! Woo!



No comments:

Post a Comment