[Tut] Animate with Blender and Nifscope

The_Coyote

Emperor
Joined
Mar 1, 2008
Messages
1,367
Location
Europe
The main target of this tutorial is to give a short introduction how custom animation can be created using Blender. For this you must use the newest (atm beta) script, 2.3.12. In this version the export option was activated. What else is needed, basic knowledge about modelling, a model to animate, the Kfm editor and nifscope.

So far i created one custom animation, so there still could be problems, but because the main principle should be same and this option is awaited for a long time, at least by me, i start with this tutorial. But keep in mind it was my first try ever to create an animation and also learned the basics while doing this.

The tutorial will cover the following parts, creating a new bone skeleton with nifscope, rigging vertices to the bones in Blender, animating in Blender and the final work in nifskope. Again most information are reused from other tutorials. Thanks goes to the authors of the other tutorials and the niftools team for making the tools and allow us to use them for free.

Dl: http://forums.civfanatics.com/downloads.php?do=file&id=10989

Ciao

The_Coyote

Edit: small additional information, if trying to animate i would recommend to upgrade to Blender 2.48, iirc in this version a set key can be removed easily using "Alt+ i" (only affect selected bones, like when setting a key), makes it a lot easier to change an animation if necessary

Edit2: it is necessary at least in the Die sequence to set the position of the nodes in the end frame, if not there can be animation glitches, so if there are problems, check if the last frame has set keys of the armature

Edit3: like Deliverator posted, using the IPO curves is a good method to have more control (and let them look more natural) over the animation without setting every keyframe, see the post following #41 of this thread

Edit4: some things can´t be done in Blender, but can be achieved using Nifskope and altering the exported kfs there, eg visibility of objects, see for an example Gagonite tutorial about 'Modifying the Visibilty of Weapons ': http://forums.civfanatics.com/showthread.php?t=312613 (more or less the last steps show how to add a controller who changes the boolean value of the visibility controller in the nif)

Edit5: Bone Weight copy can be an option to get the basic rigging of an unit quite fast, see: http://forums.civfanatics.com/showthread.php?t=320560

Edit6: particles effects aren´t supported by the export scripts so far (afaik), but they can be useful as attachables (visibility controlled throu a controller, see Edit4) or even to create parts of units or units itself (see Lord Tirian 'Locusts of Chiron' as example: http://forums.civfanatics.com/showthread.php?t=348478)

Edit7: i would recommend to set the end frame to "the number of frames the flowchart says + 1", so if you need 15 frames set the end frame to 16, this way your exported kfs have the same time like vanilla animation

Edit8: SaibotLieh tutorial "How to modify existing animations using Blender and NifSkope": http://forums.civfanatics.com/showthread.php?t=435755

Edit9: Importing original animation sometimes need addtional steps (watch your last frame): http://forums.civfanatics.com/showthread.php?t=497028
 
5 Stars! It's always great to see new tutorials that will help people to make new things! :)
 
OH MY GOD! I've been waiting so long for this. Thankyou Coyote, I am indebted to you (don't take this debt seriously though, coz i don't have much to offer, apart from ideas :p)
 
thank you both. :)

if somebody had read it, Is the tutorial understandable?
 
Noticed this on the home page, great work! (I decided saying this was worth the effort to post, and I may decide to post more, now that it seems easier than I thought...)


Edit: Looking good so far, making units might be fun again, and this might just be what I needed to get me motivated, thanks!


Edit 2: I was thinking, is it not entirely marvelous how the community has advanced from the start? With Gimp, Blender and Nifskope, you really could make a entire unit from scratch, and all for free.
 
Noticed this on the home page, great work! (I decided saying this was worth the effort to post, and I may decide to post more, now that it seems easier than I thought...)

thanks :)

Edit: Looking good so far, making units might be fun again, and this might just be what I needed to get me motivated, thanks!

i´m really glad to hear this

Edit 2: I was thinking, is it not entirely marvelous how the community has advanced from the start? With Gimp, Blender and Nifskope, you really could make a entire unit from scratch, and all for free.

yes it is, one of the reasons i tried to make models for civ4 was (beside FFH, the reason why i started lurking here) that the programs are available for free. And now creating custom units with own aniamtions is possible with freely available programs (i think this is an option not a lot games have)

Spoiler :
personal note: If i remember how i started some months ago: i barely could model and texture, got my first model barely with the help of the tutorials in game and decide shyly to post it. With the help of the tutorials, the community, some friendly pressure from wolfshanze (i think he don´t know how much i wouldn´t know if i hadn´t tried to fix "his" problems ;) ) my animation manipulation skills and understanding how the files works got better. Finally i could make one of the models i always desired to make as i started, the warhammer mech. :)
 
made my first try to animate a leaderhead testwise using the described method. Wanted to know if my assumption that it could work was correct. Also was only a very reduced one, very simple greeting, accept, reject and one idle (for all 5 states) animation.

But to my own surprise, beside a glitch at the end of a sequence (the picture is shortly complete red [no only the leaderhead, the complete leaderhead window], but perhaps i missed something or my sequence length was out of the allowed limits) the created animations worked. If you wan´t to see it, i attached the files (use this files with all other files from isabelle), my first custom leaderhead animation :lol:
 

Attachments

  • animation_test.zip
    20.7 KB · Views: 261
Great progress there.

The "completely red window" might be a tilted camera - maybe a accidental keyframe to much (or to few :dubious:) in the end. It it comes on idle - perhaps because of bad loop ?
 
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)
 
I modeled a unit with blender and now I want make it into a .nif to edit it to game. How to do?
 
try this tutorial http://forums.civfanatics.com/showthread.php?t=167335

i did step after step by my first units, more or less, after making the UV map you must assign the texture and open the export script, select civilization4 and the export the modell. Be aware of a minor "problem" with the newly exported nif, http://forums.civfanatics.com/showthread.php?t=300503, or deselcet create skin partition before exporting.

Afterwards you have to copy your exported model in the nif from a unit you want to use as base, more or less described here: http://forums.civfanatics.com/showthread.php?t=279548

than doing the xml and try it in game
 
So I have this great japanese female leader head. I copied atotoztli/boudica into pericles so I can get some cool animations. In nifskope it looks great but as you see in game the animations stretch the chest. How can I fix that or is there a way to change the bone in nifshope?

thx




 
Different engines might handle very low weights different - there is a threshold when a low VW will get ignored / how many bones may affect one vertex. NifScope might be more generous than the Game - or vice versa - giving you this kind of inconsistent behaviour.

Some vertices on her chest might be affected by too many bones. If so, check if you can skip some out, distributing the weight on really important ones.
 
looks great, beside what refar said:
there is an option to change the position to add the position, scale of some nodes in the armature (something similar to bone transplant, adding a "link node" and eg add this between two nodes, changing the values of this added node are not reset by the kf files and will work in game - at least it does when i did this with units)
 
OH my.....

I saw this thread and thought it must be old....

then I looked at the date. I think I know what I am going to be doing this winter break.

Wait... hasn't nifskope been dead for years... or did it start up somewhere else?
 
So, anyone has been successful on importing an existing animation into blender or even a single pose?

I want to change some strike animation of the warrior and for that I would like to start from fortify...
but if I import a nif (even when saved at the first frame while animating in nifskope), I get the normal "davinci man" pose...
Being able to start from there and creating new animations with this would be a major step forward!!

And, any idea why I cant use rotation on any bones!?

thanks for the help guys
thanks coyote for the tutorial!
 
So, anyone has been successful on importing an existing animation into blender or even a single pose?

I want to change some strike animation of the warrior and for that I would like to start from fortify...
but if I import a nif (even when saved at the first frame while animating in nifskope), I get the normal "davinci man" pose...
Being able to start from there and creating new animations with this would be a major step forward!!

And, any idea why I cant use rotation on any bones!?

thanks for the help guys
thanks coyote for the tutorial!


Tried to import the warrior strikeA animation:

select import nif, select the nif you want to use (should be a clear one and best not the fx, eg warrior.nif), also activate "import animation". Now select under "keyframe file" the animation you want (eg. warrior_md_strikea.kf). And afterwards import.

Now you still see the warrior in the standard pose but the armature in an aniamted pose. It´s because the parent link between mesh and armature was lost. Select the mesh first, after this also select the armature and make parent - armature - name groups.

Now the mesh will look damaged, it´s because of the linking (if you try to import the model without animation and make the steps the model will lie on the ground, more or less the same happend here, but with transformed bones). To correct this rotate the mesh 90 degrees anticlockwise and center the pivo (until the armatures fits the model again).

After this steps the animation worked in Blender (correct set keyframes)

testwise exported the unchanged animation and tested the export in nifscope (was ok there)

hope this helps (can´t wait to see the results)

late edit: and thanks for "forcing" me to find out that and how it works, i ask me if it also works with leaderheads?
 
Top Bottom