[Tut] Animate with Blender and Nifscope

thanks!!

now I have a problem,
I created a new Idle animation (with 100 frames).
exported it successfully.
Now I deleted all key frames, except the first one to start the fortify animation and set it to endframe 15 (there are no keys after 15, at least I can´t find one).
So... now after having finished this animation, I can´t export it, because i have this error message:

Error in AnimBuffer: Frame out of range (100 not in [1, 15])

I think it is related to the former end key 100, but I don´t know why it doesnt except the new end key and simply ignores the past one...
I mean, there is no animation related to any key behind 15!!!

any Idea?
how did you do your animation sets?
did you start every animation (idle, fortify, strike, etc...) from blank?
 
the error sound like the export created text keys and the end frame is set to 100 (select text editor as window type in blender, check if a text called "anim" exists and control the values - at least when i had the error the "problem" was there). The use is described in the tutorial on the niftools page - it´s hard to use, because for effects you have to know the exact text, but it´s good to prepare the text keys for the effects by a certain frames (eg.: strike: frame 11 (or 10) - fire arrow, hurt - frame 11 (or 10) - hurt sound effect), and after the export copy the correct entry in the text key

how i start: i look at the flow chart was is connected and start normally with idle - (would be linked to idle fidget), run is separate, after this fortify (starts with the idle end position), from there with the end position as start and end position for fortify idle, from the fortify idle position to the hurt, die (-> die fade) and strike animations. I prefer always to set the start and end position and afterwards make the animations, but save all as separate file.

edit: added pic to illustrate
 

Attachments

  • 20.jpg
    20.jpg
    127.1 KB · Views: 319
awesome!
I was looking at the text, but forgot to open the ANIM tx ;)

So, if you only have one fortify and strike, do you use eventcode 1020 or 2020 or 3020? or does it matter at all?
 
i´m not sure, but to be save i would use the 1XXX codes if i only have one sequence

(if seems to me important, even if one fortify and three strikes works fine, but if there are different fortify animations the strike with same leading number is chosen, see the warrior and his three strikes, all have a different starting position, also when you have die animation the number says which die fade will be played)
 
Ok, I created a complete new animation from scratch for a mage unit.
Now, I want to dive a bit deeper...
do you know how to implement limited visibility (NiVisController i think), which lets things appear and disappear depending on the frame (like in the archer nif, there are three bows, only one is visible at a time).
That would be cool.

and do you know, if I want to add a flame effect, how I can make it visible in front of a unit (I mean, if i attach a flame effect at the BIP L Hand of a warrior, e.g. then, the flame will only be visible if it is not infront of any part of the warrior...).
 
do you know how to implement limited visibility (NiVisController i think), which lets things appear and disappear depending on the frame (like in the archer nif, there are three bows, only one is visible at a time).

now you want to archieve things i never tried so far, but theoretical i "have" an idea how it works. For me it seems that must be done in nifscope (at least i have no idea how to set it in Blender).

to each object a NiVisController is attached in the nif, which has as target the node. For each of this NiVisController there are also boolean entries in the kf files, without data if the visibility is set for the entire animation, with data if the visibility changes. (it´s best to look at the an archer to see the data).

Unfortunally there are also values i have no idea if they are important and if yes, how to get the values, eg the stop time in NiVisController and the interpolator name (i think therefore it would be best to copy such an entry from one kf to the one you want and change the values in the copy).

(pic: left kf, right: nif))

and do you know, if I want to add a flame effect, how I can make it visible in front of a unit (I mean, if i attach a flame effect at the BIP L Hand of a warrior, e.g. then, the flame will only be visible if it is not infront of any part of the warrior...).

it could be controlled through flags, bit i have no idea which values. But as idea i would propose to attach the flame to a node outside of the Bip and move this node to fit the position of the hand. (i have seen animated effect nodes in vanilla units)
 

Attachments

  • 22.jpg
    22.jpg
    152.2 KB · Views: 316
  • 21.jpg
    21.jpg
    88.3 KB · Views: 296
now you want to archieve things i never tried so far, but theoretical i "have" an idea how it works. For me it seems that must be done in nifscope (at least i have no idea how to set it in Blender).

to each object a NiVisController is attached in the nif, which has as target the node. For each of this NiVisController there are also boolean entries in the kf files, without data if the visibility is set for the entire animation, with data if the visibility changes. (it´s best to look at the an archer to see the data).

Unfortunally there are also values i have no idea if they are important and if yes, how to get the values, eg the stop time in NiVisController and the interpolator name (i think therefore it would be best to copy such an entry from one kf to the one you want and change the values in the copy).

(pic: left kf, right: nif))



it could be controlled through flags, bit i have no idea which values. But as idea i would propose to attach the flame to a node outside of the Bip and move this node to fit the position of the hand. (i have seen animated effect nodes in vanilla units)


Thanks a lot, I will try around with the viscontroller.

yea, i also thought, maybe it is best to create a new dummy object, rig it to the L Hand node and attach the flame to the dummy with higher hirarchy than the unitmodel.

keep it up!!
 
Spoiler :
yes i think it´s great that it seems to work, there errors you described are possible, was a "quick" made test if the exported kf files work, so far i have no idea if a special animation must have a certain length or not. My knowlewdge about leaderheads is still a bit reduced. Also deleted a lot of nodes to get an easy to animate armature (a standard kf has over 200 entries, my around 50), perhaps i removed something important :crazyeye: It would be good to figure out why the red window happens or not to figure if it was an error by me or an error because of the method.

But at least it seems to work, even if i think that the necesarry work will be huge to get an new animation for a leaderhead

what i know about leaderhead kf files:

eventcode 0: greeting, no loop, around 2 seconds
eventcode 1: negative, no loop, around 2 seconds
eventcode 2: affirmate, no loop, around 2 seconds
eventcode 3: idle_friendly , loop, over 10 seconds
eventcode 4: idle_pleased , loop, over 10 seconds
eventcode 5: idle_ cautious, loop, over 10 seconds
eventcode 6: idle_annoyed, loop, over 10 seconds
eventcode 7: idle_furious, loop, over 10 seconds

no idea if a certain animation is linked to another (means you have to start from a certain position)

so how long does doing a leader anim take? we want to add some custom animations to a new Alexander the great leaderhead and I havent done it before
 
i think it depends how much mimic you want in the face (i can imagine a weekend for one good animation [one kf - not the entire set]), when only some bones are affected it the entire animations should be possible in a weekend.

i think the best start would be to import an almost fitting face animation, changing the things you want to change and export - the only problem iirc was that last time as i tried it wasn´t able to do this - :) - no longer, could success import ceasar and his greetings animation

edit: btw i think it would be the first Civ4 custom Leaderhead animation
 
This tutorial and this thread have been really helpful in getting me started with animation. I can also recommend super3boy's blender tutorials on youtube, particularly on animation and armatures.

I have some questions:

1) I would like to have an Idle animation that constantly produces smoke/dust. I have attached the effect, but it only seems to trigger once, rather than on every loop. Is there something special you need to create a looping animation? Should effects trigger on every loop or just once?

2) Is it possible to merge two KF files into one so that one KF has all the Controller Blocks of both? To copy 40 Controller Blocks in NifSkope is painful. I can't use blender because the animation I am trying to merge is from the Afterworld boss and the fancy animated surface controllers are lost on import.

3) Have the number of available frames been increased since the animation diagrams were created? I've been playing with the Afterworld Boss Idle animation, and it has 240 frames = 8 seconds - that is more than the diagram suggests is possible.
 
1) best done via visibility of a smoke attachables (eg Afterburner, damage smoke is done this way) - visibible while idle - not visible else

[but after my understanding the effect should be played every loop (aniamtion is set to loop and the effect is activated in the kf) - so also :confused: ]

2) no way i know (and yes it´s a real pain in nifskope), sorry that there are no really good news

3) saw the same, perhaps because of the afterworld szenario they could use another numbers :confused: , normal units still should have the numbers from the flowchart - but this also makes #2 of your question list much more complicated (you must copy and alter the time frames ...)

good luck (and hope your problems wont reduce your motivation doing a custom animation - you haven´t choosen to start with an simple example)
 
1) best done via visibility of a smoke attachables (eg Afterburner, damage smoke is done this way) - visibible while idle - not visible else

[but after my understanding the effect should be played every loop (aniamtion is set to loop and the effect is activated in the kf) - so also :confused: ]

I haven't used attachables before, is the usage the same as for effects? Do they refer to entries in Effect Infos?

2) no way i know (and yes it´s a real pain in nifskope), sorry that there are no really good news
Nevermind, I thought that was a long shot...

3) saw the same, perhaps because of the afterworld szenario they could use another numbers :confused: , normal units still should have the numbers from the flowchart - but this also makes #2 of your question list much more complicated (you must copy and alter the time frames ...)
good luck (and hope your problems wont reduce your motivation doing a custom animation - you haven´t choosen to start with an simple example)

I know it's ambitious, but don't worry - I've managed to do a fair amount of custom animating. I'm working on the sandworm for Dune Wars. I had the idea of merging the Afterworld boss for a wormsign effect. Having tried it I think that it's a bit complex - I played around quite a bit and I could get the blob animated using the Afterworld Idle animation, but that seemed to break all my other animations - so I think the painful merge would be the only way and even then it might not work. I can probably get a good effect with some dust colour smoke.
 
attachables are handled a bit different, they are activated in the 'ATTACHABLES' node of the nif (the entry is similar to the effect entry in the kf - see jetFighter for an example) and the visibility of the node is controlled via the kfs (like the visibility of weapons).

the attachables differ from the effects (iirc you can use an effect as attachable), see CIV4AttachableInfos.xml (misc) for details which options you have
 
Thanks. Had a play with attachables and there's some interesting options there. Another couple of questions:

1) Are there any guides or information on altering particle effects at all? I've managed to recolour them, and change the speed and size in XML, but it would be interesting to change the shapes of the clouds, etc.

2) I had a problem with blender, armatures and importing NIFs. When I import my custom NIF back into blender using NifScripts, the armature bones are no longer connected to each other at either end. I am having to use my original .blend saves to have the armature working correctly. Is there a way around this?
 
again not really that good news:

to 1) particle effects are not really well researched and understood so far (i only know that the certain setting control the visibility order [behind or in front of the mesh] and how i can change the colour). So if you discover something new, would be nice if you also could write it down

to 2) i think i have this problem also sometimes, it must be one of the import settings (you could also try to import the skeleton without model and afterwards the model)
 
Ok, I checked out the tutorial. great info. But how do you edit a pre-existing nif??? I compared the greeting for alex you modified and the original and say that the only difference was that you somehow moved a node up higher 125 was no longer after 124 as in the original but before 91 in the new one). I know your computer is down but any tips?
 
because it was only a minor change i only imported the animation (while import the nif [without in nifscope attached animation] also select import animation [you can add the kf under 'k'eyframe 'f'ile]).

Afterwards i directly exported the animaton again (now i got rid of the spline controller and have workable controller), exchanged the controller (copied the exported one in the original kf and exchanged the controller and removed the vanilla one) and adjusted the rotation (quaternation keys) so that he no longer clips in his body

you can also import the animaton (check before you do anything, that all was imported correct, i had sometimes errors, but shortly before my 'problem' arises i imported the cautious kf relativ error free), change the animation of the bones you want, export the kf and exchange the controllers in the original kf with the ones of your exported one (only the changed ones, also do this only just in case some other bones weren´t imported correct (and now makes problems), otherwise you must copy the txt from the original kf to your new kf and adjust the main information (clamp, loop; base node))

my last imagination with a minor changed alex animation was, touching hes sword in cautious, have his fingers n his sword in annoyed (small tipping with the fingers, but would be a 'bonus' [no idea how hard it wuld be]), and holding his sword in furious (as dream target a short threaten with the sword - had this idea as i saw you rigged the sword to a sword bone)
 
ok, I've gotten back to this. Some things on the tutorial relating to blender:

An import picture would help I didn't notice that keyfile was in he import screen (since I never used it)

I couldn't find where pose mode was at first. a picture of how to get it would help.

As I tried it pressing "i" saves the location of something you moved. but it says insert. Does it insert a frame?

and alt+i says delete what does that do.

also how to click on each bone (including using the outliner) would help too.

but is there a way to copy parts of an animation and add it to another animation. for example if i just want the moving arm part of augustus to be used on a different animation.


Also I want to modify an animation. How do I copy a frame? and also delete frames. clicking on them and press x asks if i want to delete but nothing happens.
 
but is there a way to copy parts of an animation and add it to another animation. for example if i just want the moving arm part of augustus to be used on a different animation.
Maybe it might be more optimal in blender, but this can be done completely with nifskope. It would probably be an enourmous pain since Im not sure if theres a way in nifskope to copy/paste multiple control nodes and transform interpolaters at once. But it can be done. Its a little easier for units since each limb only has 3 or 4 bones. The sioux GG I made has a different unit's animation for each limb in some of its kf's (spearman's arm, jaguar's legs, parts from vulture,....)
 
Well, I opted to modify the original augustus animation. it seemed easier to do. so i fixed the lips which were off and adjuste dthe arm fine. it export and it plays in game.

EXCEPT it makes part of the body disappear!!!!!!!!! why?????? can this be fixed in nifskope or is there something wrong when i exported from blender?

see attached

EDIT: NEVERMIND. When I was fixing the lips I hid most of the bones to see the face clearly. I guess i inadvertely found that that is way to make things invisible.
 
Back
Top Bottom