News:

Rings of Reznor!

Main Menu

Nifskope Animation Made EZ

Started by SickAlice, February 06, 2023, 08:01:21 PM

Previous topic - Next topic

SickAlice

So this is a quick tutorial on positioning in nifs and keyframes. A Nif file is a container. A KF file is not really a different format. In most Nif based games the keyframe animations are contained in the nif along with model. Often much more is in the nif, even the textures and sounds at times.

At the same time these things can be separated depending on how a game engine is set up. In the case of  :ff: games as other moddable game the keyframes are set up in a second file with the the extension .kf when it comes to animated characters. The files are likewise in specific directories that the game engine requires, much of this to make it easier for players to change how the characters look and move. Where things like FX are set-up with the keyframe animations inside the nif itself.

Inside a nif file there are several things. Among them is a 3d model. If they are a character to be animated they will also have bone nodes. The nodes have string names. Here is Biped 01 in a male basic nif. Biped 01 is responsible for the entire model.


It's typical for the rest pose inside a nif to match the character idle keyframe. Not always but this is the case here. Opening up the kf file in another Nifskope instance we can look at the idle animation and find the string name for Biped 01.


All the other bone names and other node string names can be found inside each keyframe animation as well. Now we will go back to our nif and look at the positional values. On Biped 01 I right click, then Transform > Edit and a pop-up window displays.

- In the window there is the Translations which are the positions in 3d space. Left to right, back to forward, up to down. These are represented by the colored arrows in the preview plane.
- There are Rotations which is the position on any points center axis. So the whole model for example is on it's center axis. Each bone/biped as well which determines the rotation of a body part, here in Biped 01 it is for the whole model. These are represent by small spheres on the end of a line sticking at of the center position where they are placed.
- Lastly there is the Scale. This is of course the size of the selected item.


Leaving that pop-up window open we go back to our kf that we have open in a different instance of Nifskope. The pop-up will follow over to that instance as seen here.

Opening up the Biped 01 keyframe in the idle animation we see Quarternions, Translations and Scales. Quarternions are Rotations. Translations and Scales are the same as in the nif. As you can see in the idle the settings for Biped 01 are the same as in the nif. This will be the case for all of the bones and other nodes.


Changing the numbers in the keyframe settings will cause an animation. This is done relative to the idle pose. Also, to make work easy one can pose the model inside the Nif and then copy over the positions to the keyframes. On top of that one can copy the values from the keyframes to the nif to also get values. Think of the nif as a poseable doll. Save that nif as copy, you don't want to use it in game. Just for work. The character.nif you use in game must retain it's idle rest pose.

Here is an example a nif that I already posed to match an animation called "idle_sit". I will select Biped 01 here as well and open the pop-up window. You can see there are different numbers here. In this case the Z Translation I have highlighted. Changing the Z Translation moved Biped 01, the entire model, south of it's original position.


Now I go back to the kf file and the pop-up follows me. I'm looking at the idle_sit animation and it's Biped 01 keyframes. You can see here the numbers in the Translation match the new numbers in the pose. This again is the case for all the values in the idle_sit animation.


That is how positions in nifs and keyframes work. Here is the results in CTool2 of what I showed you. First the original idle animation.


Second the new idle_sit animation.


Hopefully I made this as straightforward as possible and it is of good use to anyone. Keyframe animations are actually very easy, it helps to have your calculator open of course. They just take a long time is all.


cranlox

amazing!
I definitely have to look at it much calmer because I found almost nothing of what you explained in detail. Thanks for the tutorial on behalf of the community

eluvium

thank you I was just htinking about this