IMHO the heart of a video game is a PC/NPC animation system (animations themselves and gamer/game engine animation control: scripts). I have spent a lot of time collecting information about MW PC/NPC animation (tutorials, available documentation, etc.), performing numerous tests…
I would like to summarize/share here my “achievements” and hope to learn new approaches/solutions/techniques.

I would start fro the basics. Please, excuse me that I have to repeat a lot of well-known issues and correct in case of wrong assumptions. I will mainly concentrate on NPC animations and would mention specifically in case of PC related stuff.

Some history (to my knowledge):

1. RX31 was the fist who has created (in 3Ds Max) considerable number of custom MW animations based on available bvh mocaps.
2. Oshiel was the first (and the only one so far) who has created a PC Animation Replacer mod.
3. Mr.Cellopane has created the most sophisticated (released at the present moment) animation control via scripting.
4. LizTail has created “MW Animation Kit”, a tool set dramatically simplifies MW animation packing and therefore creation.
5. I have found the way to add animated extra bones to MW NPC skeletons.

Tools and tutorials.

1. 3DS Max with original Bethesda exporter plugin (works with Max3,4,5) or with NifTools Max Plugin (import/export; works Max5,6,7,8,9,2008,2009) or Blender with NifTools Plugin (import/export; I am not a Blender user and, unfortunately, cannot provide useful advices for this free but complicated IMHO software). I assume that the links to these programs are well-known. Max2008/9 users are advised to check this Tazpn’s WIP topic:
http://www.niftools.org/wiki/index.php/NIF...brary_and_Tools

2. Animation Toolbox by RX31 (a very useful tool for Max users, Maxscripts):
http://rx31.rethan-manor.net/pages/animtool.htm

2. LizTail’s Morrowind AnimKit 2.0: http://www.bethsoft.com/bgsforums/index.php?showtopic=868016

3. Max blank animation files by Bethesda Softworks, can be downloaded for instance from here:
http://www.ageinc.com/Morrowind/Thanos_Tower/maxpage.html

4. MaxImmerse and NetImmerse viewers, nif documentation can be also found on Thanos Tower.

5. All collected by me animation tutorials created by many authors:
http://www.4shared.com/file/60996990/46f26...W_MAX_Anim.html

6. NifSope (the last but not the least).

MW animation related files.


MW has the following original animation files:

anim_dancingGirl.nif (a very interesting example of “custom” NPC animations)
xanim_dancingGirl.nif
xanim_dancingGirl.kf

Argonian_SwimKnA.nif (Argonian’s specific swim NPC animation)
xArgonian_SwimKnA.nif
xArgonian_SwimKnA.kf

base_anim.nif (main animations for human NPCs and 3-d person view human PC animations)
xbase_anim.nif
xbase_anim.kf

base_anim.1st.nif (1-st person view human PC animations)
xbase_anim.1st.nif
xbase_anim.1st.kf

base_anim_female.nif (female specific NPC/3-d person view PC animations)
xbase_anim_female.nif
xbase_anim_female.kf

base_anim_female.1st.nif (female specific 1-st person view PC animations)
xbase_anim_female.1st.nif
xbase_anim_female.1st.kf

base_animKnA.nif (beast races NPC/3-d person view PC animations)
xbase_animKnA.nif
xbase_animKnA.kf

base_animKnA.1st.nif (beast races 1-st person view PC animations)
xbase_animKnA.1st.nif
xbase_animKnA.1st.kf

As you can see from above MW obligatory requires three files for every animation storage:

1. Main animation nif (e.g. base_anim.nif). This file is not used by the game engine and probably required only for display purposes in the TESCK. However, it should be obligatory present, its content could be any valid MW animation nif. This file contains animation data plus skeleton plus meshes (body parts). I guess it is something similar to NDL/Gamebryo .kfm animation file format that is not used in MW.

2. x.nif (e.g. xbase_anim.nif). This file contains information about skeleton structure and some additional animation nodes like Bounding Box (a sort of a reference for the skeleton root bone (Bip01) and collision mesh); Tri QuadPatch01 node (mysterious skinned/physiqued structure that I guess plays a certain role in hit combat detection); mesh boxes that are attached to bone chains or bones (I guess those are collision propagation nodes without their branches the corresponding body part will be corrupted in the game); PC skeleton has some other obligatory nodes that are not well documented e.g. camera. Skeleton structure in a x.nif should be identical to the skeleton used for all skinned/physiqued body/clothes/armor meshes/nifs that are used for this character. For instance Better Bodies are using a very good approximation of original skeleton (at that time there were no tools or blank animation templates available), as result the hands are not perfectly aligned to finger bones and in game the BB hands look odd (BTW LizTail has fixed that problem).

3. kf file (e.g. xbase_anim.kf). This file contains only animation data. Basically this is the only file we need to create for standard skeletons because the other two could be just renamed accordingly any working MW animation nifs. It is mportant that skeleton structure in x.nif and .kf should be identical (skeleton structure used for kf generation and in x.nif should be identical).


Animation files location. All three files should be in the same folder in MW “Data Files/Meshes” directory e.g. “Data Files/Meshes/MyAnim” or just in “Data Files/Meshes”.

MW game engine loads/”searches” for animation files in the following order: 1. Attached to an NPC (for PC 3-d person view there is an NPC with ID “player”, Dark Elf) in the TESCK animation nif (search how to do that in TESCK tutorials, note that only one file (e.g. MyAnim.nif) can be attached, therefore it should contain all sequences); 2. In “Data Files/Meshes” in the files with original names specified above; 3. In MW bsa archive files.

Animation file naming is important
: for global replaces it is necessary to use original file names mentioned above; for custom animation all three files should be named in the following way: MyAnim.nif, xMyAnim.nif, xMyAnim.kf.

MW game engine “recognizes” what particular animation sequence should be displayed at a certain game moment by “looking” into the note tracks text keys. Text keys are hardcoded (there is no chance to add new ones) and can be seen in the TESCK as well as in NifScope (block details window of the NiTextKeyExtraData node). A list of text keys and some very useful information can be found here:
http://preik.net/morrowind/animationgroups.html

MW PC/NPC animation control via scripting. There is only one properly working for NPCs MW animation scripting function- AIWonder and it is limited for Idle3-9 sequences; to my knowledge there is no direct PC animation controlling function.

Bone names are also hardcoded. Here's the full list of allowable Morrowind bone names created by LizTail:

Shield Bone
Bip01 L UpperArm
Bip01 L Clavicle
Weapon Bone
Bip01 R Finger42
Bip01 R Finger41
Bip01 R Finger4
Bip01 R Finger32
Bip01 R Finger31
Bip01 R Finger3
Bip01 R Finger22
Bip01 R Finger21
Bip01 R Finger2
Bip01 R Finger12
Bip01 R Finger11
Bip01 R Finger1
Bip01 R Finger02
Bip01 R Finger01
Bip01 R Finger0
Bip01 R Hand
Bip01 R Forearm
Bip01 R UpperArm
Bip01 R Clavicle
Bip01 Head
Bip01 Neck
Bip01 Spine2
Bip01 Spine1
Bip01 Tail3
Bip01 Tail2
Bip01 Tail1
Bip01 Tail
Bip01 L Toe0
Bip01 L Foot
Bip01 L Calf
Bip01 L Thigh
Bip01 R Toe0
Bip01 R Foot
Bip01 R Calf
Bip01 R Thigh
Bip01 Spine
Bip01 Pelvis
Bip01

No other names can be used. Human NPC skeleton contains not all of the above mentioned bones Hence, these names can be used for extra bones (e.g. wings).


MW animations should be sampled with 15 fps.


I think this could be enough for introduction. Please, do not hesitate to ask questions and share your MW animation experience.


smile.gif
Thank you for this. I think if this by some factor of awesomeness causes some intrepid aspiring modder possessing exobitant amounts of free time decides to take up improving Morrowind's animations...

...you will be hailed a saint. smile.gif
Thank you so much for this! 1277.gif I did try to get a Blender discussion going but nobody was interested. blush.gif

One question: I know Blender can't be used to change the actual skeleton structure, but what apps *can* be used for that? Is it only max 4/5?
In all Max versions it is possible to "change" skeleton structure. The latest Niftools Max plugin also works with CS biped and CS biped extra bones (Max2008/2009). In older Max versions it is necessary either to used Max bones or combine them with CS biped. I would start with original Max blank animation skeletons. Note that it is necessary to add collision propagation boxes/branches for the new bones or bone chains (some results of my tests are described on the NifTools Forum).

But I can’t believe that it is not possible to do that in Blender, we have find out how to do that correctly.

smile.gif
QUOTE(A1x2e3l @ Sep 29 2008, 12:28 PM) *
But I can’t believe that it is not possible to do that in Blender, we have find out how to do that correctly.

Heh, last time you said something like that I though "wishful thinking"... I've learned my lesson, now I'm thinking "Cool! What hasn't been tried yet?" heee.gif
Yes indeed, BIG THX for your effort!!! falloutop5.gif I know very well from my german forum, how hard it is to convince those people who know to share their knowledge. Most of them behave like gods and tell you not to bother them with any questions. Gladly a small hand of people, like you, don't do so!!!


TheDaywalker buttrock.gif
QUOTE(A1x2e3l @ Sep 28 2008, 05:54 PM) *
MW PC/NPC animation control via scripting. There is only one properly working for NPCs MW animation scripting function- AIWonder and it is limited for Idle3-9 sequences; to my knowledge there is no direct PC animation controlling function.

So you couldn't make them for example, walk around and then sit on a chair and have a drink, then get up, pay their bill, and walk around some more? (with custom animations)
You could, except it would be more or less random -- pays the bill, walks around, stands up, pays the bill, walks around, sits down, for example. Essentially worthless.
QUOTE(Dirges @ Sep 29 2008, 08:26 AM) *
You could, except it would be more or less random -- pays the bill, walks around, stands up, pays the bill, walks around, sits down, for example. Essentially worthless.

Rats.
So for the NPC animation script, are the idle animations already hard-coded into the new animation files and the script just triggers them to occur, or is it that the script assigns and animation as "Idle #x" and the game enginge uses the probability of switching to an idle animation to actually start the animation you assigned?
this is vaguely unrelated but what is the name of the animation part where people just stand there? I'm merging together different mw animations laying around with the animation toolkit, and right now I have the basic "standing about" animation as Oshiel (since it's the base i am using) but I just wanna swap the standing animation out for the base from morrowind but I can't find it. I thouht it was the un-numbered Idle.kf replacing it only made the difference that when they idle they would stand "normally".

Makes sense?
QUOTE(Dirges @ Sep 29 2008, 10:26 PM) *
You could, except it would be more or less random -- pays the bill, walks around, stands up, pays the bill, walks around, sits down, for example. Essentially worthless.

Actually you could script the order (by using AIWander with 100 chance for the idle you want and 0 for the others) - but the transitions would probably be awkward if they were all on different idles.
QUOTE(melian @ Sep 29 2008, 09:36 AM) *
Actually you could script the order (by using AIWander with 100 chance for the idle you want and 0 for the others) - but the transitions would probably be awkward if they were all on different idles.

Each idle would need to have the requiste animations: sitting down would need to have the NPC actually going through the process of sitting down; standing up the same, etc. If you planned it out like a sequence, starting with a low idle (like 3), then flow through the last idle, it should be pretty smooth. smile.gif
Hi guys,

I have no animation-skills at all, but I'm still following the diskussion eagerly. I have an idea, but I don't know if it is absolutely nonsense:

When I got you all right, then there is only a certain number of idle slots and that can't be expanded so easily? Right? - Hope so?!

But when do we really need a NPC to be a NPC? Only when talking to him, attacking him or contacting him in another way. So why could one not simply replace the NPC with a static, that's a copie of him and let that static do, whatever we want. And in case that static gets contacted, it becomes disabled and the real NPC shows up again.

It's not the ideal solution, but one could come around the idle-problem. I hope animations for statics can be made in 3dsmax and blender too and don't have to be scripted in the CS.


PS: Forgive me for that, when it made no sense, I'm just trying to spread some ideas.



TheDaywalker buttrock.gif
QUOTE(TheDaywalker @ Sep 29 2008, 10:50 AM) *
When I got you all right, then there is only a certain number of idle slots and that can't be expanded so easily? Right? - Hope so?!

There are nine available idles and no more can be added. The idles are the animations NPCs "perform" while standing around (defaults are head scratching, stretching, etc).

QUOTE
But when do we really need a NPC to be a NPC? Only when talking to him, attacking him or contacting him in another way. So why could one not simply replace the NPC with a static, that's a copie of him and let that static do, whatever we want. And in case that static gets contacted, it becomes disabled and the real NPC shows up again.

As far as I know, statics can't move and activators (like the gate at GhostGate) are also limited in what they can do. Speaking of that gate, it doesn't move so much as is raised and lowered.

QUOTE
It's not the ideal solution, but one could come around the idle-problem. I hope animations for statics can be made in 3dsmax and blender too and don't have to be scripted in the CS.
PS: Forgive me for that, when it made no sense, I'm just trying to spread some ideas.

I'm not an animator either, so I could be off base here. I have talked about them with Axel quite a bit because of a project we worked on awhile back, but he knows more than me. smile.gif
QUOTE
As far as I know, statics can't move and activators (like the gate at GhostGate) are also limited in what they can do. Speaking of that gate, it doesn't move so much as is raised and lowered.


You can move and rotate statics by script for example, that's what I know and I read that animation in morrowind doesn't mean anything else. Just rotation or movement of bodyparts/ meshes, no vertex-group deformation, just quite simple.


TheDaywalker buttrock.gif
Melian. I share your frustration. I have installed Blender, bought a book about animation in Blender… and no progress. The bad thing is that nobody at NifTools Forum are interested in MW any longer.

QUOTE
You could, except it would be more or less random -- pays the bill, walks around, stands up, pays the bill, walks around, sits down, for example. Essentially worthless.


This is not entirely true. I am not an expert-scripter, but with sequential calls (AIWander/GetAIPackageDone checks and timer) I was able to create something similar: enter room and go to the specified place; sit down; perform certain animation; stand up; go to the specified place; switch to idle.

Atrus. Check AIWander format here: http://www.uesp.net/wiki/Tes3Mod:AIWander

“Idle” (AIWander, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) is actually very tricky – this is the main transition pose/animation used by the game engine. It is better to create all your custom animations from frame 0 of “Idle” in order to achieve smooth transitions.

TheDaywalker. I think your idea worth testing. You can set a suitable (one animation sequence attached) creature nif in the TESCK as an activator and see what happens. Transitions might be a problem (black screen; magic effects, etc. are not always good).

Jac. There are 2/3-9 Idles available, hence 7-8 animation sequences.

QUOTE
I read that animation in morrowind doesn't mean anything else. Just rotation or movement of bodyparts/ meshes, no vertex-group deformation, just quite simple.


Well, it depends how to define the term “animation”. For instance what is MW animated texture than? There is no rotation/translation/scaling. BTW, MW animated heads is a good example of morph animations (“vertex-group deformation”) in MW.
However, every with “simple” things we have a lot of problems: MW uses quaternions for smoothing rotations, but even Sir Hamilton himself was not able to finalize his theory.

smile.gif
Ah, thanks. This is quite interesting stuff. Good gosh, had I the free time... sad.gif
QUOTE(A1x2e3l @ Sep 29 2008, 11:28 AM) *
In all Max versions it is possible to "change" skeleton structure. The latest Niftools Max plugin also works with CS biped and CS biped extra bones (Max2008/2009).

Do you mean that it is possible to create and export animation for MW PC&NPC using Max2008/2009? For a long time, the only solution was to use max 4.2 + studio character...

Many thanks for all these great informations on animation you share!
About the Radiant AI thing (npc's sitting down/drinking etc.) I should point out this thread, if animators and scripters grouped together, than they could possibly make some soft of radiant AI mod? It's worth a shot.
QUOTE(Mordicus @ Oct 3 2008, 01:36 AM) *
Do you mean that it is possible to create and export animation for MW PC&NPC using Max2008/2009? For a long time, the only solution was to use max 4.2 + studio character...

Yes!
Actually it's been possible to use 3DSMax 5.2 with the FreedomForce exporter and the NifTools exporters for 3DSMax, Maya and blender for quite some time.
Max5.1 (I have never seen Max version 5.2!?) with original MW exporter works very well. Maya nif plugin does not support animation (import/export). Note that the latest NifTools Max plugin supports CS Biped export (with skin modifier) with extra biped bones (“Extra Nodes on Mesh” option should be checked).

smile.gif
QUOTE(A1x2e3l @ Oct 5 2008, 01:41 AM) *
Max5.1 (I have never seen Max version 5.2!?)

Sorry, Typo from me. I meant 5.1.
Submit a Thread