Blender/Creating a Character Animation
From The Elder Scrolls Construction Set Wiki
| Tools used in this tutorial
Required
|
Contents |
[edit] Introduction
This is a basic tutorial that describes the process of creating and exporting a biped character animation from Blender. This focuses on making a stationary or "pose" animation but can be used for others as well.
[edit] Part 1: Setup
Start by opening Blender. This tutorial was written using 2.48. Some earlier versions may not have all the needed features, and the latest NIF scripts are absolutely necessary to avoid a tiresome workaround on export. Before we begin, we need a skeleton we can use for animation. Importing a skeleton alone does not work well with NIF scripts 2.1.13, so we'll need a body first. This will work just as well with the regular Bethesda meshes or any body mod, male or female. The following pictures will depict Robert's Average Male V4 (and later Fantasy Figures Beta).
Import the headhuman.nif from meshes/characters/imperial (or any other head of your choice) by selecting File -- import -- netimmerse/gamebryo. Then import the upperbody.nif, lowerbody.nif, hand.nif and foot.nif from meshes/characters/_male. Delete the skeleton pieces from each and every one of these as you import them. This is very important and prevents large problems later.
Select all of these body pieces and join them with ctrl+J. This makes a unified body mesh that will animate well.
You will end up varying the "end" number depending on how many frames you use. Animations will really never be two frames long unless they are a stationary pose.
This next part is needed in order to insure that your animation is given priority over others the game is using on a character, such as walking or the regular idles.
Switch to pose mode. Select all the bones by pressing the a key.
30 is a number that works well here.
We are ready to animate.
[edit] Part 2: Animation
So just to recapitulate, before animation begins the window should look roughly like this.
Note that we have the correct number of frames set up, and the timeline shows we are on frame 1 of 2 to start with.
Look at the buttons window options here as well - having "x-ray" selected makes the bones visible through the body, and having "Names" and "Axes" turned off helps prevent clutter in our view.
The above pic also shows the timeline. You can see what frame you are on and click through the frames using the arrows on either side of the number 1. You can also change the number of frames by changing the number beside the word "end," but the text Anim buffer we created will determine how many frames are actually exported from Blender. Don't change one without changing the other.
Try to avoid translating the body too far up, down or to the sides as you animate, because that will mean more work in NifSkope later. You want to use rotation instead of translation whenever possible.
Remember, you can achieve more precision with your rotation of a bone by selecting x, y or z after pressing r. Pressing the ctrl key and holding it down while rotating insures you rotate in whole units and can be quite useful as well. With practice, you can create a pose very quickly. Moving individual finger joints takes the longest.
Once you have the pose where you want it in frame 1, press I key and choose locrot. This inserts a keyframe for location and rotation. Location is more important if you create an anim that actually moves rather than a stationary pose.
Move to frame 2. Repeat the insertion of a keyframe.
If you are creating a moving animation with many frames, you will need to continue this process through all of them. Instead of inserting a keyframe at every frame, however, you should be able to only stop, pose, and insert a keyframe every five to ten frames. Blender will then create steps in between. This is a bit risky since they may or may not look the way you wish. Creating moving animations takes considerable time and practice, which is why stationary poses are a good start in learning the export process.
When the pose or animation is completed to your satisfaction, you can play it back by pressing the "play" arrow on the timeline (you will not see changes if it is a stationary pose).
[edit] Part 3: Export
Now export using these or similar settings.
The most important thing is that you select "animation only." If you will be setting this up as an idle in the CS, you will need to create a new folder in meshes/characters/_male/IdleAnims for your animations.
[edit] Part 4: Nifskope Alchemy
Open your .kf file in NifSkope. Nothing is visible because there is no mesh data included.
You can see in the example that the nicontrollersequence node at the top (#0) is named "KNEELINGcower1." For it to be recognized by the game, it must be renamed to "specialidle_KNEELINGcower1." Your anim will need to have "specialidle_"in front of its name as well.
Save now. This is a good spot to pause and playtest your anim. The Actors in Charge scripts by Trollf are a popular choice for getting optional animations into the game, or you can create your own plugin adding new idles, but that is a long topic for a separate tutorial. Alternately, you can back up one of your existing animations such as the idle.kf and replace it with your new one for the easiest playtest possible. (You will not want to leave things this way unless you want to constantly see your anim on every character in the game.)
If your animation already works at the correct height above the ground and is not at an odd angle, you do not need the next bit. However, since the current NIF scripts tend to ignore translations on the Bip01 NonAccum node, it is very possible you will need to do some tweaking post-export.
[edit] Part 5: Tweaking and Troubleshooting Translations
You will need this section if your animation places a character too high above the ground or, in case of this test animation, too low so that characters partly vanish into the floor. This may be preventable in Blender but, pending further understanding of those mechanics, this will fix the problem.
In the last pic you can see the "Num Controlled Blocks" line of the NiControllerSequence. Select that and double-click to expand it.
Expand that node as well and find the number of the NiTransformInterpolater (in this case it's 20). Go to that node and expand it in the main details screen. Select the NiTransformData (in this case 21) and look at the details below.
Expand the Translations node and its Keys. There are two keys in this example, one per keyframe, but you could have many, many more if you create a moving animation. Either way, it will do no harm to set the number of keys to 2 in this particular array. This is the number next to "num keys." Right-click the green circling arrows and choose array -- update to update the number.
This is why changing the number of translation keys to 2 is a good idea in this case. If you have a moving anim that is not meant to be translated on the Z axis, it can be very tedious to change all the Z values.

