• Civilization 7 has been announced. For more info please check the forum here .

Making NonHuman Leaderheads

clanky4

Emperor
Joined
Jul 11, 2012
Messages
1,262
Location
USA
This tutorial will deal with the technical points of making and animating a nonhuman leaderhead. I'm not sure under what circumstances one would need to specifically make one, but.

This tutorial doesn't go too in depth about animating. There are a some pretty good tutorials on that specifically if your interested.
http://forums.civfanatics.com/showthread.php?t=435755
http://forums.civfanatics.com/showthread.php?t=296286

Before we get started there are a few programs you are going to need: Blender(and its Nif Scripts) and Nifskope

Blender and its Nif Scripts can all be found here:
http://niftools.sourceforge.net/wiki/Blender

Nifskope can be found here:
http://niftools.sourceforge.net/wiki/NifSkope


Setting up the Skeleton in Nifskope
We're going to use Refar's Roaming Horse and the vanilla FDR leaderhead. Make a new folder which contains all of FDR's nifs, textures, and kfs as well as all of Refar's Roaming Horse's nifs and textures.

1.) Open up the FDR.nif and the HeavyCavalry.nif. In the HeavyCavalry.nif delete the Dummy BIP by right clicking it and selecting remove branch.
Spoiler :
(its not necessary it just makes things less cluttered)




2.) Copy the HorseBip and paste into the d_FDR_MASTER NonAccum in the FDR.nif




3.) Copy the Horse's mesh and Paste it into the m_FDR in the FDR.nif




4.) Save nif as Horseleader(or whatever) and try not to get this image stuck in your head
 
Adjusting the Skeleton in Blender I
We are using Blender 2.49b here. There should be a download link above if you don't have it.

1.) Open Blender, you will note there box and a few other random things, Press A to select all, and then Delete to delete selection



2.) With the scene now clear select the File button, Import, and then NetImmersion/GameByro.



3.) Navigate to the Horseleader.nif, select the file, and then press Import Nif. A new page will show up. Make it sure it has the same options selected, it should by default, and press Ok




4.) Wait. Sometimes, but not always FDR, and a few other leaderheads, take a bit to load in blender.
Spoiler :




5.) With the nif now imported lets reposition the camera to a less awkward view



6.) Press A to deselect all and select the Armature. Then switch the mode to Edit Mode. And Change the view to wireframe(makes it easier to see)





7.) Holding down the shift key right click each individual Horsebip bone to select it
Spoiler :




8.) Select the rotate manipulator. Click the red rotate editor, and rotate the selection -90 degrees


 
Adjusting the Skeleton in Blender II

9.) Select the translate manipulator. Left Click and hold in an up down motion to enter rescale mode. Set the scale to 0.7





10.) Click the green translation editor and move the selection 9.5




11.) Now we need to get the horse back "inside" its skeleton. Switch back to Object mode. Select the Horse mesh. Switch back to Edit Mode.




12.) Select the Rotate manipulator, select the red rotate editor, and rotate the selection -90 degrees





13.) Resize the selection to match to skeleton by left clicking and holding in an updown motion




14.) Select the Translate manipulator, press the green translate editor, and move the selection 8





15.) The mesh isn't exactly inside of the skeleton. So lets select the blue translate editor and move the selection by 1. Evidently something was lost in translation.
Spoiler :





16.) Now that the horse's face and the skeleton are about where FDR's face are lets export the nif. Go back to Object mode. Press File, Export, NetImmersion/Gamebyro. Navigate to where Horseleader.nif is. Name the nif horseleader 2(or whatever) and press export nif.





17.) A new page will show up. Make sure you have the same options selected and press ok.
 
Cleaning up in Nifskope
now that horse mesh is the proper scale and facing the right way lets clean up the nif a bit and fix things Blender broke.

1.) First things first lets get rid of the FDR mesh; we no longer need it for size comparison. Right click the FDR mesh and click remove branch.



2.) You might note that the nif now has some weird greenish boxs. I have no idea what they are but for some reason they appear after being exported from blender. Delete the green boxes and any other accessories FDR had.



3.) Next remove FDR's old skeleton. Right click b_Torso and click Remove Branch.



4.) Now open a "fresh" FDR.nif. And Copy the Camera01 node inside of the _fdr_parent. Back in the horseleader 2.nif paste the Camera01 into the _fdr_parent




5.) Next we have to get the lighting. Copy all of NiPointLight nodes in the FDR.nif, except Bloomfactors and Bloomcolorchannelmeh, and paste them into the Scene Root in horseleader 2.nif
Spoiler :





6.) This part isn't necessary. It just makes things neater and gets rid of unused bones. Remove the _Hand and _Elbow



7.) Now select the horse mesh, NiTexturingProperty, and rename NiSourceTexture to Roaminghorse.dds. Save the Nif
 
Animating with Blender I
Now that the horseleader nif is good to go we can work on editting FDR's kfs to better fit a horse. In this section we're going to cover how to animate. It helps to have experience with blender for this part. If you don't, don't worry. This part has the most pictures :crazyeye:

1.) Open up blender. Make sure the scene is clear. A to select all Delete to delete selection. Then click File, Import, NetImmersion/Gamebyro. Navigate to Horeleader 2.nif(or whatever you named it) and select it and click Import nif




2.) On the new page select the "..." under the Keyframe file box. Next you will be prompted to choose a kf. Choose fdr_idle_03_catious.kf and press Select Keyframe File. Note that the keyframe will now be listed in the Keyframe File box. Press ok.





3.) Now the nif with the kf attached to should be in blender. Next to the Help button on the top menu change click the little button next to SR, select 1-Animation



4.) a crazy new window will show up. Move the the left window and the bottom two windows off to the side. I have found they serve little purpose. Also right click the bottom windows header and remove it. Additionally, in the bottom left of the right window there is a button that has waves like a heart monitor. Click that button and select the Action Editor view(i think thats what it is called), its a little stick figure



5.)Click the little red button, it looks kind of like a record button on a VCR or whatever people are using these days. A menu should appear next to the button, select the add/replace Keys. Now you'll note a whole bunch buttons detailed bellow. They basically allow you switch the frames of the animations.
Spoiler :




6.) Select the Armature and note that there are now the random misspelled words and little yellow triangles in the Action Editor. The words are the Armature's bones and the little yellow triangles are the bones Animation Keys. The Keys signify that the bone is being told to be in a specific position in that particular frame. Is there is a long either pink or yellow line between two Keys that means they are telling the bone to be in the same position. As in not move.



7.) Now deselect all keys in the Action editor by having your mouse inside of the Action Editor and pressing A. Switch to Pose Mode and select the Rotate Modifier.



8.) Note that all of bones that are green have some kind of animation data assigned to them, Ones that are Grey do not, and Ones that are Blue have recently had animation data assigned that did not have it before. Select the Horse's Head bone and click on the red Rotate Editor like your going to rotate but just press Enter or double click. You should note that the Horse's Head bone will turn blue and a new Bone will appear in the Action Editor as well as a key for that bone
Spoiler :




9.) Now do what you just did to the Horse's Head to the rest of the Horse's bones. (or at least its neck, spine, arms, and pelvis)
Spoiler :




10.) Now that all of the Horse's bones have animation data, unless you were lazy, its time to establish the Horseleader base position. That is, the position its going to be in at the beginning frame and end frame of every animation. Now keep in mind that the approximate location of the eyetarget bone, the green one that is front of the Horse's face, is the approximate position from where the player is going to see Leaderhead. Since Horses are not able to see directly in of their head, due to their eyes being on the side of their head, lets have the Horse at a slight angle. Rotate by about 15 degrees on the Z axis and move it with the translation manipulator by about 1 point on the x axis




11.) Now that the Horseleader has a base position lets copy it and paste it at the last frame in the animation. With your mouse in the Action editor press A to deselect all Keys. Make sure you are om frame 1 and press Ctrl K to select all keys in the current frame. Press Shift D to duplicate your current selection. Then type 420 to move the Keys ahead to the last frame, which in this case is frame 421. Then press enter to confirm the duplicates movement. You should note all bones have a set of Keys with a yellow or pink stripe in between them.




12.) With the base position in the startframe and endframe it is safe to begin animating the kf. When your making an animation don't worry about getting every little detail. Focus on broad movements and worry about establishing the furthest point in a movement. Since this a "Cautious" kf lets start it out by having the horselead tilt its head to the side. First we're gonna move to frame 100, should be more than enough time for a slow head tilt. Select rotation manipulation and change the orientation to Normal.




13.)Select the Horse's Head bone and rotate by about -35 degrees on the z axis. Note the new key in the Horse's head bone.

 
Animating with Blender II

14.) Now lets make the horseleader raise its left hoof up to a kind of pondering position after its head reaches the tilt. To do this we can copy HorseBip L UpperArm, HorseBip L ForeArm, and HorseBip L Hand's Frame 1 Keys and move to them frame 100, the frame the head is completely tilted at. After that we should make a copy of HorseBip Head's Key from frame 100 and move it to frame 150. Then move to frame 150 and rotate the HorseBip L UpperArm, HorseBip L ForeArm, and HorseBip L Hand to a fitting position. Then all we need to do is press A to deselect all Keys and press Ctrl K to select all Keys in frame 150 and then press Shift D to duplicate the selection. And move ahead 50 frames, to frame 200. After that we can go ahead and duplicate the startframe and and move the duplicate to frame 250. Next we're gonna make a second head tilt at around frame 330 and have it hold that pose for about 20 frames.
Spoiler :






15.) Now that our cautious kf is basically done lets export it. In the not action editor press A to select all. Then press File, Export, NetImmersion/Gamebyro.




16.) Select the fdr_idle_03_cautious.kf and press Export NIF/KF. On the new screen select "Export Animation Only(.kf) and then press ok




17.) Good job you now have a cautious animation for your leaderhead. Now lets make the other ones. Select all bones in the Action Editor and select all Keys in Frame 1 ONLY.(so just press A to deselect all, move to frame 1, and press Ctrl K)



18.) Click the button next to Scene in the top menu and press ADD NEW, in the menu that pops up press Empty



19.) Blender should be blank. That is normal. Import the nif with the attached kf like we did before. But this time select fdr_idle_02_pleased.kf




20.) Now assign animation data to all of the horse's bones, same as step 8 and step 9. Once all of the Horse's bones have animation data, select all of the bones in the Action Editor and press the Paste Keyframe button. You should then see the Horse in the "base position"




21.) Press Shift D to duplicate your selection and move it to the lastframe



22.) Animate at will. I made a short clapping motion, which I copy/pasted about 50 times. Once your animation is done export it the same way we did the other one, except the name of course.
Spoiler :
lazy note: I generally use the same animation for please/friendly and for the two angry kfs




23.) Now make another New Frame and import the horseleader nif with the fdr_idle_04_annoyed.kf attached. This particular animation has a lot of moving in two of its major bones. This might have worked when FDR was there but most likely will look weird now. We can either delete each individual Key in these two bones. Or delete the bones from the Action Editor itself.



24.) Now assign animation data to all of the horse's bones, and the two bones whose animation data was deleted. Once all of the Horse's bones have animation data, select all of the bones in the Action Editor and press the Paste Keyframe button. You should then see the Horse in the "base position" After that copy/paste the base position to the lastframe
Spoiler :




25.) Animate it and then export it same as before, aside from the name.
Spoiler :




26.) Take the same general steps for the remaining animations:
>New Frame
>Import Nif with kf you want to edit attached
>Assign animation data to all the Horse's bones
>select all the horse's bones in the Action Editor
>paste in the "base position"
>make sure the "base position" is the first and last frame
>animate
>select all bones in the 3d window
>export(make sure its set to export the kf)
 
Last few touchups with Nifskope
Now that all of the kfs are done, the nif is set, and we are thoroughly tired of staring at this horse lets wrap it up.

1.) Since this leaderheads gonna be a horse, thus larger than the average FDR, lets push back the BG and make it slightly larger.
Spoiler :
I went ahead and replaced the FDR_BG.dds image with a stable




2.) The Horse still might be a bit too big LeaderHead box. Lets scale down m_FDR(the horse's parent node)



3.) Now we need to fix the kfs. Since blender has no need for loop animations it doesn't maintain whether a kf is a loop or not. Every single one of the fdr kfs that contain the word "idle" need to have this change done. Click the main node. In the bottom menu change cycle type Clamp to Loop



4.) Do XML work if you haven't already. I just replaced Caesar's Leaderhead art


5.) And your done. Bask in the glory of horse leaderhead and its repetitive clapping





Afterword

tl;dr?
When you import a nif into blender a good deal of data that does not directly pertain to the mesh or skeleton itself is lost. i.e. lighting info, flag data, camera.

If you are going to use a custom skeleton for a leaderhead and NEED to run it through blender be sure to copy a new Camera01 and lighting over otherwise you'll get a crash in game.

All animation loops NEED to begin and end with the same Keys. I'm not sure which loops the greetings, affirmative, and negative animations are linked to so I find it safer to have ALL animations begin and end with the Keys.

If a picture is worth a thousand words how many words did I write?
 
Top Bottom