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)

hlh5_zps3bff176e.jpg



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

hlh5b_zpsd434dc8d.jpg



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

hlh5d_zpsde992978.jpg



4.) Save nif as Horseleader(or whatever) and try not to get this image stuck in your head
hlh5e_zpsc524220a.jpg
 
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
hlh7_zpsecd19a20.jpg



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



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
hlh9_zps22fbabbd.jpg

hlh10_zps0c4f19bf.jpg



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

hlh11_zpscdb2d16f.jpg



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



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)
hlh14_zps767f50b2.jpg

hlh15_zps761d383e.jpg

hlh16_zps8ba49dd2.jpg



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

hlh17_zpsf35aa4e7.jpg



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

hlh19_zpse088181c.jpg

hlh20_zps09634b24.jpg
 
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
hlh21_zps802866c7.jpg

hlh22_zpsf9cde789.jpg

hlh23_zps89f2778c.jpg



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

hlh25_zpse2eb6fd2.jpg



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.
hlh26_zps1d808e35.jpg

hlh27_zps047e3405.jpg



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

hlh28a_zps1b739ffb.jpg

hlh28b_zpsf161ffb1.jpg



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

hlh28d_zps07c2d127.jpg



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

hlh28f_zps8468edfb.jpg

hlh28g_zps3bcdb014.jpg



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 :

hlh28h_zpsb441e349.jpg

hlh28i_zpsaeb1521c.jpg



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.
hlh28j_zps40b852e0.jpg

hlh28l_zps78fdcfff.jpg

hlh29_zpsa08f6386.jpg



17.) A new page will show up. Make sure you have the same options selected and press ok.
hlh30_zps57583789.jpg
 
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.
hlh32_zpsf96d0392.jpg



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.
hlh33_zps72e07ca9.jpg



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



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
hlh36_zps60bdf258.jpg

hlh37_zpsa05931aa.jpg



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 :
doallthethings.jpeg

hlh38_zps98b7a2bf.jpg

hlh39_zpsd5768d3f.jpg



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



7.) Now select the horse mesh, NiTexturingProperty, and rename NiSourceTexture to Roaminghorse.dds. Save the Nif
hlh41_zps961105f6.jpg
 
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
hlh44_zpsa723014e.jpg

hlh45_zpsc3aeaa55.jpg



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.
hlh46_zps16fcf968.jpg

hlh47_zps51161cd9.jpg

hlh48_zps04702493.jpg



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
hlh49_zps7ce077a5.jpg



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
hlh50_zps2debc7b9.jpg



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 :

hlh51_zps99a04d29.jpg



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.
hlh52_zps2eb8d6f0.jpg



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.
hlh53_zps65fdd02d.jpg



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 :

hlh54_zps88ef3329.jpg



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 :
Famous-characters-Troll-face-Challenge-accepted-140949.jpg

hlh55_zpsf902e9ab.jpg



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
hlh56_zpse6b54002.jpg

hlh57_zps4c20f9ea.jpg



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.
hlh58_zps574d8e55.jpg

hlh59_zps2849d2ad.jpg



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.
hlh60_zps07ac2b1b.jpg

hlh61_zpsac5f4b4e.jpg



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.
hlh62_zps8b561457.jpg

hlh63_zpsf9aad0e6.jpg
 
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 :

hlh64_zps9317e4df.jpg

hlh65_zps63e2afae.jpg

hlh66_zps53e27ae1.jpg



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.
hlh67_zps49f4d07e.jpg

hlh68_zpsdc2ee779.jpg



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
hlh69_zps10908c02.jpg

hlh70_zpsbffcd771.jpg



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)
hlh71_zpsf9c83b92.jpg



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



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
hlh73_zps4dee148b.jpg

hlh74_zps436c45c3.jpg



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"
hlh75_zps7ce05eb5.jpg

hlh76_zps195b1108.jpg



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



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

hlh78_zps4e6a8d28.jpg



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.
hlh79_zpsdec33e6b.jpg



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 :

hlh80_zps91ef85e2.jpg



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

hlh81_zps4d385bd2.jpg



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

hlh85_zps636ca56b.jpg



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



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
hlh87_zpsef65d536.png



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
hlhtheend_zpsdd119fff.jpg





Afterword
tldr.gif

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?
 
Back
Top Bottom