Morrowind NPCPC animation. Questions and Answers.

Post » Mon Oct 05, 2015 1:19 pm

Trey Leavens, thank you very much for this information!

I have only limited experience with looped (no .kf files) animated weapons (particles, mesh translations/rotations), body parts (wings/neck; mesh translations/rotations and morph), hair (particles, mesh translations/rotations) as well as with animated activators (I prefer to use scriptable activators, not static actors). There are some problems (I cannot exclude Max exporter issues) but in general that works fine.


What's that? I know only theses Phijama's shields: NiAlphaController, NiUVController NiGeomMorpherController phijama (Phoenix shield, Obsidion shield and shield from Dragon Blade mod). There are no "blocking animation" in these mods.

But here is the devastating part:


From my preliminary tests I can confirm that "merge_kf.exe" is messing up all fighting animations, spell animations, and one-frame animations like "InventoryWeaponOneHand". I have to perform more tests.
However, I have no problems with merging walk/run/jump(swim not yet tested).


I have not yet performed extensive testing of that but in the past I was able to merge correctly walking/running forward animations with idels.

I will post results of my investigation as soon as I get something solid.

:blink:
User avatar
Franko AlVarado
 
Posts: 3473
Joined: Sun Nov 18, 2007 7:49 pm

Post » Tue Oct 06, 2015 3:01 am

Sorry to get your hopes up :biglaugh: I just was meaning that the shield has animation that coincides with the base animation during block.


On my animated weapon meshes they also have text keys for walking and running as well as chop/slash/thrust, paper doll, etc. actually a lot of text keys. So when standing still the attack animation works, when walking the walk animation works, but when walking and attacking they text keys for walking override the text keys for the attack. I'm not sure how the engine splits the animation and there may not be any workaround. :shrug: anyhow i was experimenting this a couple years ago and don't recall all the details. i have not heard of merge_kf.exe before now, thanks for the insight, thats must be the bugger i couldn't work around :)

this don't really have to do with npc anims per say, but it does in a way, as this kind of animation adds to it. In theroy many things could be animated, not just bows, crossbows, weapons, shield, but possibly clothing, armor, and body parts.
In some of my tests i had animated hair, not releasable by means, but proof of concept it worked. Jump has only one frame and knows not if PC is rising or falling so animating hair with that is not feasible, nor is underwater hair, as the animation knows not if the PC's head is under or above water, only if it's swimming. but i think simple bobbing up and down with walk and run would be doable, not unlike the wings that are popular.
User avatar
Terry
 
Posts: 3368
Joined: Mon Jul 09, 2007 1:21 am

Post » Mon Oct 05, 2015 6:19 pm

I am very ashamed to admit that I do not have your nunchucks and whip nifs (I have seen a video), I have only your animated mace, that is a great inspiration for my work on animated weapons. Unfortunately, I have failed to find these meshes/animations. Where could I find them? I would be very happy to have them for "investigation" and to use in my mods. Many thanks in advance.

At the moment I am "digging" in MW combat animations. Many aspects how game engine displays fighting sequences (order, game conditions, etc.) were clarified. But still there are many unclear issues: e.g. what is the difference between "Large Follow", "Medium Follow", and "Small Follow". Definitely it is not time or distance: they are approximately of the same duration, are practically taking place on the same spot. Pure fighting animation sequences like "Chop", "Slash", "Thrust" (I guess "Follow" in general is a part of the attack loop) are always interrupted in the game with corresponding to the used weapon idles (e.g. "Idle1h", btw this one is most important (for "1h" fight in this example)) or in the case of movement with corresponding running/walking sequences (e.g. WalkForward1h, RunBack1h, Jump1h, etc.). Of cause, related "WeaponOneHand; Equip" and "WeaponOneHand; Unequip" in "1h" example are very important for smooth transitions. Basically, all "1h" animations are required for "WeaponOneHand" combat to have reliable transitions.
I will post my "impressions" as soon as I have better understanding/overview of MW combat animation "structure".

Few words about "merge_kf.exe". It works fine and is very very helpful. But it has two main (IMHO) imitations and several minor issues (I am not going to talk now about later ones):

1. It does not recognize correctly CR or something in text keys with several lines: e.g. (below is one problematic text key from original files, "merge_kf.exe" will simply ignore/skip it)
"Crossbow: Shoot Min Attack
Crossbow: Shoot Max Attack
Crossbow: Shoot Min Hit"

2. It does not support scale keys at all.

The first problem can be resolved in NifScope (tedious when working with hundreds of kfs). For the second I have no solution so far.
I am playing a lot now with the great discovery made by Dirnae that scale keys are working with MW body animation:

http://www.gamesas.com/bgsforums/index.php?showtopic=1000663&hl=body

Both Max exporters support them (I am setting them simply to linear controller). Scale keys have a huge potential in my mind: e.g. mimicking muscle movements with regular extra bones of stretchy bones.

I have contacted LizTail, he is busy at the moment.

Hair, clothes, body parts animations. There are several obstacles: morphs cannot be combined with skin; extra bones (more usual solution in modern games) require alteration of original animation skeleton (skeleton used in all involved animations, xbase_anim.nif and others). Moreover, we are limited by numbers and names of hardcoded MW bones. I think that such modifications can be introduced only on the level of "special" NPCs. I have no reliable global solution. Anyhow, all that is very exiting but requires a lot combined efforts.

My best regards.

:)
User avatar
M!KkI
 
Posts: 3401
Joined: Sun Jul 16, 2006 7:50 am

Post » Mon Oct 05, 2015 11:24 pm

Very interesting as always Axel.
I inquired of Hrnchamd if he could look at this for the unofficial patch. At the time it was thought I was the only person interested. Perhaps he might be able to address this in the next edition of his fantastic patch?
User avatar
Danger Mouse
 
Posts: 3393
Joined: Sat Oct 07, 2006 9:55 am

Post » Tue Oct 06, 2015 12:48 am

Symon, I have carefully studied this great project but was embarrassed to ask for another stupid programming request. I have no idea how they are doing that. Hexediting of MW exe? I have tried to make such changes in order to "activate" gloss maps (as that was described on the Forum) but without any success.
Please, do that! This (get rid of of the limitation on bones' names and numbers) would be a huge breakthrough!!!

:)
User avatar
Damned_Queen
 
Posts: 3425
Joined: Fri Apr 20, 2007 5:18 pm

Post » Mon Oct 05, 2015 3:10 pm

I'll do that. I take it you know the last few versions of the patch support gloss maps without hex editing?
User avatar
Rex Help
 
Posts: 3380
Joined: Mon Jun 18, 2007 6:52 pm

Post » Mon Oct 05, 2015 2:57 pm

Many thanx!
Yes, I know that. I would like to know how they are anolyzing these "bytes".

:)
User avatar
Alex Blacke
 
Posts: 3460
Joined: Sun Feb 18, 2007 10:46 pm

Post » Mon Oct 05, 2015 1:55 pm

I'd guess using a disassembler or if fortunate a decompiler.
Either way, tedious in the extreme and prone to much frustration.

I've had professional reasons to use both (and anolyze code in a hex editor) and it isn't a pleasant activity.
User avatar
Connor Wing
 
Posts: 3465
Joined: Wed Jun 20, 2007 1:22 am

Post » Mon Oct 05, 2015 5:08 pm

no esp's in these ( hey that rhymed ) if i recall, but just use em as a blunt weapon. theyre not visually stunning and animation is simple, just a proof of concept thing :)

http://treyleavens.webs.com/alphachux1.nif

http://treyleavens.webs.com/WM_whip_alpha.rar
User avatar
Crystal Clarke
 
Posts: 3410
Joined: Mon Dec 11, 2006 5:55 am

Post » Mon Oct 05, 2015 3:47 pm

Gr8!!! Thank you so much!
Indeed, you did a heck of a job with text keys!
What are your conditions for that to be used publicly releasable mods?

:)
User avatar
Emma louise Wendelk
 
Posts: 3385
Joined: Sat Dec 09, 2006 9:31 pm

Post » Mon Oct 05, 2015 2:23 pm

I would assume that's how it's being done. I doubt there are many other ways. Why would you use a hex editor, though? There aren't really decompilers (not any functioning ones), but disassemblers give you a good look at the code.


To correct one of the bullets opening this thread:

This is partially correct. Text keys use a hard-coded check and there is no easy way to add new keys, however that check can be removed. If the PlayGroup and LoopGroup commands were fixed (and their checks similarly removed), it is possible to have an unlimited number of scripted-only animation groups. These could not be used with AI packages or the engine itself, only via scripts (I successfully forced a penguin to play "testGroupA" a while back with a properly-edited executable).
User avatar
Darren Chandler
 
Posts: 3361
Joined: Mon Jun 25, 2007 9:03 am

Post » Tue Oct 06, 2015 2:35 am


Exactly! These functions have never worked for me correctly with NPCs.
Do you think that it might be possible to remove the checks for AIWander limit of idels and have something like in OB (unlimited Idleanims)?

:)
User avatar
Jordyn Youngman
 
Posts: 3396
Joined: Thu Mar 01, 2007 7:54 am

Post » Tue Oct 06, 2015 4:41 am

I doubt it.
I know you can remove the verification on the checks when called by a script (or even the console). But the AI packages read a given set of packages, with a given number, and doesn't use strings to identify them. Instead, the engine uses numbers. You'd have to rewrite the entire function to accept more parameters, or a variable number... You'd have to ask Hrnchamd, but it doesn't sound easy, if it's do-able.
However, if those two functions were fixed for NPCs (they seem to work ok for creatures with no AI) you should be able to use a script to randomly play group.
User avatar
Lucky Girl
 
Posts: 3486
Joined: Wed Jun 06, 2007 4:14 pm

Post » Mon Oct 05, 2015 4:41 pm

Yes, that was a stupid idea: AIWander with Idle100, it would be necessity to type nulls for two days.

Look:
http://planetelderscrolls.gamespy.com/View.php?view=mods.Detail&id=1981
These smart guys are using creatures' nifs as activators. May be, to use NPCs with attached base_anim.nif (or whatever) as well as with added heads, hair, clothes, etc. and script with PlayGroup and LoopGroup. In some cases this could be sufficient. And no problem with bones, just add them to the x.nif.
Of cause properly fixed function are preferable.

:)
User avatar
Tiff Clark
 
Posts: 3297
Joined: Wed Aug 09, 2006 2:23 am

Post » Tue Oct 06, 2015 2:41 am

Do whatever you want, I just have no time to do anything with them anymore. :sad:
They are of course for 3rd person base animation. :lightbulb: I wonder how they work with Darknut's 1st person mod. hmmm.
I was thinking maybe remove text keys for walk, run, swim, etc. and see if that helps. Originally I put them all in because I was going for a fully animated thing but that didn't work out, so the keyframes probly need be reworked from the ground up. :shrug:
User avatar
Nany Smith
 
Posts: 3419
Joined: Sat Mar 17, 2007 5:36 pm

Post » Mon Oct 05, 2015 9:36 pm

Very helpful thread Axel, I've been worrying about what the weapon follow animations are supposed to do for a while now too.
*Bookmarked*

Btw, sorry to bother you, but has anyone here got .max, .bip or .cpy files, or something similar, for the idle stances for Morrowind?
I'd usually import them and convert the animations to a biped myself, but whenever I try to import NPC/PC animations lately, they import as a distorted lump of bones.
If someone could send me a plain old skeleton with the 'Idle2c;' animation, just imported from a preview .nif generated by the animkit, or from base_anim itself, that'd be great, I can convert it to a biped myelf.

I'm working on a two handed weapon animation replacer but can't continue until I've got the idle stance for blending them in and the left hand's position. :(
User avatar
Farrah Lee
 
Posts: 3488
Joined: Fri Aug 17, 2007 10:32 pm

Post » Mon Oct 05, 2015 1:20 pm

Trey Leavens. Thanks a lot for the permission. In my tests I have found out that for combat it is necessary to have all animation sequences that are suitable for the particular weapon type: e.g. all WeaponOneHand (Slash, Chop, Thrust (plus corresponding Follow sequences: Large, Medium, Small ) unless the weapon is set only to one attack style e.g. thrust) and all related "1h" (in this ("WeaponOneHand") example) sequences (Jump1h, TurnLeft1h, etc. the most important is Idle1h that is used for transitions in the combat). Therefore I think that all these text keys should be present in the animated weapon nifs.

Dirnae. What Max version are you using? Max4/gMax NifTools importer does not import bone animations "smoothly". Sometimes saving and reloading a Max scene helps. I can prepare you "Idle2c" Max scene but I have access now only to Max2010 (I am modding not at home).
When I am working with single animation sequences e.g. "Idle2c" the work-flow is the following:

1. Create nifs for import: use LizTail's "preview_kf" with "xbase_anim.kf".

2. Import "xIdle2c;.nif" in Max and transfer animation from Bip01 bones to Bip02 CS biped (created it the scene after import with the below mentioned scripts) using RX31's Max scripts. Save Bip02 animation in a .bip file and note track in a text file (option in RX31's scripts).

3. Open "blank animation Max file" in a new scene; load animation that was saved previously in the .bip file and the saved note track (option in RX31's scripts).

4. Modify (or whatever).

5. Export.


Notes:

1. Links to RX31's scripts/tools and "blank animation Max files" are posted on the first page of this topic and they are working fine even with Max2010 (btw, this tool also has MW bipeds in .fig files). Original "blank animation Max files" are physiqued (shadow mesh physique is corrupted), physique is not supported by NifTools Max plugin, only skin. I can post here skinned converted/corrected Max5 modification of human 3-d person biped I am usually using as a template for export.

2. Use of Liztail's Kit. 1. Set all controllers to extra bones (Max bones) to "linear", the Kit does not "understand" others; 2. do not use CR in text keys ?the Kit is not able to process CR symbols properly; 3. the Kit does not support scale keys.

3. Basically you need only a good x.kf file (with corresponding skeleton x.nif, main.nif is used only in the TESCS preview window and for Max/Blender imports). Usually I am animating templates that also have BB meshes and heads attached to the CS biped from a "blank animation Max file". Export with these meshes works in-the game as well. These meshes can be also deleted before the export or in the main.nif/x.nif files in NifScope thereafter.

4. NifTools Max plugin settings for MW are the following (for recent versions check also "Extra nodes on mesh"):

http://i109.photobucket.com/albums/n45/AxelIP/MWMaxImportExport.jpg

:)
User avatar
Nikki Hype
 
Posts: 3429
Joined: Mon Jan 01, 2007 12:38 pm

Post » Tue Oct 06, 2015 12:57 am

Thanks, I'm using max 2009 atm, with the latest niftools importer/exporter.
It distorts the bones wierdly, only when importing NPC/PC animations though. My import settings are fine, it's just started happening out of the blue lately.

I reinstalled max 9 on my computer and it can import them fine with the latest niftools importer, not sure what's happening with max 2009 then...
So yeah, I've got the animations importing correctly with max 9, so everything's fine now.

Thanks for the workflow suggestions, I haven't tried out RX31's scripts, I'll have to play around with them.
So far I've been using .xml animation files which result in unnecessary keys, however I only need the first frame of the idle for transitions so this isn't usually a problem.
User avatar
Luis Longoria
 
Posts: 3323
Joined: Fri Sep 07, 2007 1:21 am

Post » Mon Oct 05, 2015 2:49 pm


I've been making weapon animations lately (successfully, yay!), and I noticed a few things.

They start with WeaponOneHand: chop/slash/thrust Min Attack and WeaponOneHand: chop/slash/thrust Max Attack, which is the animation which plays when you hold the attack button in.
In the plain chop, slash and thrust animations, they end with both WeaponOneHand: chop/slash/thrust Min Hit and WeaponOneHand: chop/slash/thrust Hit.
I'm guessing it'll play up to or between each Hit spot depending on how long you hold the attack button down.

Now I just set these keys at the same time for smoothness and simplicity, however maybe a different follow is used, depending on where the animation ends, which in turn depends on how long you held the attack for, which would explain the names. Alternatively, maybe they were not utilized properly in game, they just blend the attacks back into the idle, and I'm not sure they cared all too much about that at the time.
Just a wild guess, I'd like to hear your thoughts on this, or if you got any further figuring it out.
User avatar
Kellymarie Heppell
 
Posts: 3456
Joined: Mon Jul 24, 2006 4:37 am

Post » Mon Oct 05, 2015 9:20 pm

Dirnae, I totally agree with your interpretations and cannot add anything.

This is what came out of my experiments:

http://i109.photobucket.com/albums/n45/AxelIP/MWCombatAnimationScheme4.jpg

Identical frames/poses are labeled with the same color.

As an example I have used WeaponOneHand animations, Slash.
Other attack types (Chop and Thrust) as well as other weapon animations (except BowAndArrow, Crossbow, and ThrowWeapon, they are somewhat different) in particular: HandToHand (hh), WeaponTwoHand (2c), WeaponTwoWide (2w) are following the same scheme.

Corresponding one frame/pose animation sequence InventoryWeaponOneHand is identical to the first/last frame of Idle1h.

:)
User avatar
KU Fint
 
Posts: 3402
Joined: Mon Dec 04, 2006 4:00 pm

Post » Mon Oct 05, 2015 4:26 pm

Hey Axel, do you think there is any way the NPC/PC skeleton can be edited, while remaining compatible with body meshes?
Because, you know, the morrowind skeleton is out of proportion, and I was wondering about how you'd go about fixing this.

Would editing the xbase_anim.nif files work? Or would new models need to be made to fit the new rig?
User avatar
Alina loves Alexandra
 
Posts: 3456
Joined: Mon Jan 01, 2007 7:55 pm

Post » Tue Oct 06, 2015 1:04 am

From my experiments solo change in xbase_anim.nif does not work: I suspect that keys (e.g. positions) in kf files are stored NOT as relatives to x-nif bone position/rotation but in some sort of absolute values. I have flailed to change animation/shape by modifying only x-nifs.

Unfortunately, MW kf structure is not that transparent (for me) and there are no NifScope spells to edit animation keys in kfs.
Another my idea was/is to add/edit scale keys (xbase_anim.kf) of the selected bone(s) for the first and last time frame. The problem is how to find corresponding to this bone(s) NiKeyframeData node. BTW, scale bone keys work fine in MW for me as well.

:)
User avatar
Crystal Birch
 
Posts: 3416
Joined: Sat Mar 03, 2007 3:34 pm

Post » Tue Oct 06, 2015 1:03 am

I suppose they must be absolute values then (transferring a NiKeyframeData from one skeleton to another in NifSkope changes the shape of the skeleton :/).
Maybe, if we edit the bone length and scale of an animated skeleton, using animation keys in max (IK bones use the x position animations to store their length in max IIRC, so hopefully it should be pretty easy), it will produce get the desired results.
I'll try it out once I've finished some more animations. :)

Honestly though, I might just cross my fingers, and leave it until a program capable of allowing us to edit the skeleton is (hopefully, yet unlikely) made, then we can add twist bones, scale bones, etc.
Thanks for the info Axel.
User avatar
josie treuberg
 
Posts: 3572
Joined: Wed Feb 07, 2007 7:56 am

Post » Tue Oct 06, 2015 3:58 am

Working with the entire base_anim.nif is a nightmare in Max, especially with NifTools plugin and CS biped (animations of the later are not exported correctly by NifTools exporter ?feet and Bip01 root); LizTail's merge_kf does not support scale keys and only linear controllers for translation and rotation. I have no idea whether CS twist bones are supported by regular Max bones or in Blender. Therefore, I thought about NifScope

Yes, it could be a dream program ?"KfScope", something like these "Second Life" free source animation tools:
Bvhacker:
http://davedub.co.uk/bvhacker/
QAvimator:
http://www.qavimator.org/

:)
User avatar
Wayland Neace
 
Posts: 3430
Joined: Sat Aug 11, 2007 9:01 am

Post » Mon Oct 05, 2015 8:22 pm

Those look pretty cool. We should bug the niftools team to make a KfSkope later then. :evil:

Let's have a discussion regarding the problems of editing the skeleton then.

So the problems are, with editing the skeleton IIRC...
1)We still need the bone limitations regarding the names to be fixed, through an edit made to the game engine (it looks like getting rid of this check altogether may be impossible though to me, due to the way Morrowind mixes different animations together, though extending this name check might be possible).

2)CS Twist bones may not be supported by max bones.

3)We'd need to move the existing animations onto the new skeleton and then export, to create .kfs that'll use the new skeleton correctly. Or alternavely make new ones.

4)If we edit the skeleton's proportions, segmented body pieces wont fit properly.

5)Making new 'seamless' meshes might be required too (try shortening a bone with a BB mesh attached, it causes creases).

6)The niftools exporter does not export CS Biped animations correctly.


Solutions as far as I can tell will require:
1)MCP or OpenMW/Crystal Scrolls

2) If it doesn't work, either niftools team, NifSkope, or possibly some 3ds max trickery (though this'll increase the animation size considerably if I have to resort to what I'm thinking).
How do Oblivion animators use twist bones?

3) A better computer :ahhh:, or a few decent animators.

4) Dunno yet. Either somehow scale them or leave them.

5) Make new meshes, we'd want new ones anyway to make full use of the benefit's of editing the skeleton.

6) If the niftools team can't help, (which may be the case due the to the lesser popularity of Morrowind modding,) we'll just have to find a way around it.

Have I missed anything? Do you have anything to add or disagree with?
Looking at this, I can see that editing the skeleton will not be possible anytime soon, unless someone wants to help solve some of these limitations.
And even then it'd be a huge undertaking.

It just seems like not much progress has been made in making the NPCs/PCs better, other than BB (which, no offense intended, but it's showing it's age now, as Tes96 pointed out), do you get what I mean?

I suppose I'll have to be patient and wait for OpenMW or the Crystal Scrolls then. -_-
User avatar
Ross Thomas
 
Posts: 3371
Joined: Sat Jul 21, 2007 12:06 am

PreviousNext

Return to III - Morrowind