Difference between revisions of "Blender/Creating a Character Animation"

Converted images to thumbs.
imported>Sickleyield
(Fix image links.)
imported>Sickleyield
(Converted images to thumbs.)
Line 28: Line 28:
Select the body you have created.  Import the skeletonbeast.nif from meshes/characters/_male.  Make sure you select the "import skeleton only and parent to selected" option as in this pic:
Select the body you have created.  Import the skeletonbeast.nif from meshes/characters/_male.  Make sure you select the "import skeleton only and parent to selected" option as in this pic:


[[Image:Charanimtut1a.jpg]]
[[Image:Charanimtut1a.jpg|left|thumb|]]


This should leave you with something like this.
This should leave you with something like this.


[[Image:charanimtut1.jpg]]
[[Image:charanimtut1.jpg|left|thumb|]]


This also shows you somewhat the number and type of windows you will need.  The easiest way to manipulate frames of the animation is to use the Timeline.  You can create a long, narrow window for this by right-clicking on the right or left-hand border of Blender and choosing "split."  Then click on the little square in the corner and choose "Timeline" as shown.
This also shows you somewhat the number and type of windows you will need.  The easiest way to manipulate frames of the animation is to use the Timeline.  You can create a long, narrow window for this by right-clicking on the right or left-hand border of Blender and choosing "split."  Then click on the little square in the corner and choose "Timeline" as shown.


[[Image:Charanimtut2.jpg]]
[[Image:Charanimtut2.jpg|left|thumb|]]


The buttons window in the lower left should already be there for you.  It is used in many things; in this tutorial it will largely be noteworthy for skeleton settings.
The buttons window in the lower left should already be there for you.  It is used in many things; in this tutorial it will largely be noteworthy for skeleton settings.


[[Image:Charanimtut3.jpg]]
[[Image:Charanimtut3.jpg|left|thumb|]]


And very importantly, make sure you have a window in the lower right for the text buffer.  Use your split command on the top border of the buttons window to create another box on the right, then select the little square and choose "text editor."
And very importantly, make sure you have a window in the lower right for the text buffer.  Use your split command on the top border of the buttons window to create another box on the right, then select the little square and choose "text editor."


[[Image:Charanimtut4.jpg]]
[[Image:Charanimtut4.jpg|left|thumb|]]


Now choose Text -- New.  Give this the name "Anim" so that Blender knows we are working with the Anim buffer.
Now choose Text -- New.  Give this the name "Anim" so that Blender knows we are working with the Anim buffer.


[[Image:Charanimtut5.jpg]]
[[Image:Charanimtut5.jpg|left|thumb|]]


Now type what you see here:
Now type what you see here:


[[Image:Charanimtut6.jpg]]
[[Image:Charanimtut6.jpg|left|thumb|]]


You will end up varying the "end" number depending on how many frames you use.  Animations will really never be two frames long unless they are a stationary pose.
You will end up varying the "end" number depending on how many frames you use.  Animations will really never be two frames long unless they are a stationary pose.
Line 61: Line 61:
Choose the "Set Bone Priority" script under Scripts -- Object.
Choose the "Set Bone Priority" script under Scripts -- Object.


[[Image:Charanimtut7.jpg]]
[[Image:Charanimtut7.jpg|left|thumb|]]


30 is a number that works well here.
30 is a number that works well here.
Line 67: Line 67:
Now turn your buttons window back into a buttons window and make sure you are still in Pose Mode.
Now turn your buttons window back into a buttons window and make sure you are still in Pose Mode.


[[Image:Charanimtut8.jpg]]
[[Image:Charanimtut8.jpg|left|thumb|]]


We are ready to animate.
We are ready to animate.
Line 78: Line 78:
Note that we have the correct number of frames set up, and the timeline shows we are on frame 1 of 2 to start with.
Note that we have the correct number of frames set up, and the timeline shows we are on frame 1 of 2 to start with.


[[Image:Charanimtut9.jpg]]
[[Image:Charanimtut9.jpg|left|thumb|]]


Pictures are less useful at this point, because it's time to do the actual animating.  The simplest way to do this is by selecting an individual bone and pressing "r" to rotate it.  If you press 3 or ctrl+3 on the numpad, you can select both leg or arm bones at once to create symmetrical poses like the following.
Pictures are less useful at this point, because it's time to do the actual animating.  The simplest way to do this is by selecting an individual bone and pressing "r" to rotate it.  If you press 3 or ctrl+3 on the numpad, you can select both leg or arm bones at once to create symmetrical poses like the following.


[[Image:Charanimtut10.jpg]]
[[Image:Charanimtut10.jpg|left|thumb|]]


Look at the buttons window options here as well - having "x-ray" selected makes the bones visible through the body, and having "Names" and "Axes" turned off helps prevent clutter in our view.
Look at the buttons window options here as well - having "x-ray" selected makes the bones visible through the body, and having "Names" and "Axes" turned off helps prevent clutter in our view.
Line 105: Line 105:
Now export using these or similar settings:
Now export using these or similar settings:


[[Image:Charanimtut11.jpg]]
[[Image:Charanimtut11.jpg|left|thumb|]]


The most important thing is that you select "animation only."  If you will be setting this up as an idle in the CS, you will need to create a new folder in meshes/characters/_male/IdleAnims for your animations.
The most important thing is that you select "animation only."  If you will be setting this up as an idle in the CS, you will need to create a new folder in meshes/characters/_male/IdleAnims for your animations.
Line 114: Line 114:
Open your .kf file in NifSkope.  Nothing is visible because there is no mesh data included.
Open your .kf file in NifSkope.  Nothing is visible because there is no mesh data included.


[[Image:Charanimtut12.jpg]]
[[Image:Charanimtut12.jpg|left|thumb|]]


You can see in the example that the nicontrollersequence node at the top (#0) is named "KNEELINGcower1."  For it to be recognized by the game, it must be renamed to "specialidle_KNEELINGcower1."  Your anim will need to have "specialidle_"in front of its name as well.
You can see in the example that the nicontrollersequence node at the top (#0) is named "KNEELINGcower1."  For it to be recognized by the game, it must be renamed to "specialidle_KNEELINGcower1."  Your anim will need to have "specialidle_"in front of its name as well.
Line 120: Line 120:
With this node selected, you can see information in the data blocks down below as well.  Most important in this case are the start time, stop time and cycle type.  Set the cycle type to "Loop."  The start time should be 0.  The stop time will be 0 as well if you are creating a stationary pose; change it to this if so.  It will be a different number if you create a moving animation and probably will not require change.
With this node selected, you can see information in the data blocks down below as well.  Most important in this case are the start time, stop time and cycle type.  Set the cycle type to "Loop."  The start time should be 0.  The stop time will be 0 as well if you are creating a stationary pose; change it to this if so.  It will be a different number if you create a moving animation and probably will not require change.


[[Image:Charanimtut13.jpg]]
[[Image:Charanimtut13.jpg|left|thumb|]]


Save now.  This is a good spot to pause and playtest your anim.  The Actors in Charge scripts by Trollf are a popular choice for getting optional animations into the game, or you can create your own plugin adding new idles, but that is a long topic for a separate tutorial.  Alternately, you can back up one of your existing animations such as the idle.kf and replace it with your new one for the easiest playtest possible.  (You will not want to leave things this way unless you want to constantly see your anim on every character in the game.)
Save now.  This is a good spot to pause and playtest your anim.  The Actors in Charge scripts by Trollf are a popular choice for getting optional animations into the game, or you can create your own plugin adding new idles, but that is a long topic for a separate tutorial.  Alternately, you can back up one of your existing animations such as the idle.kf and replace it with your new one for the easiest playtest possible.  (You will not want to leave things this way unless you want to constantly see your anim on every character in the game.)
Line 135: Line 135:
There are many controlled blocks.  You need to locate the one called "Bip01 NonAccum."
There are many controlled blocks.  You need to locate the one called "Bip01 NonAccum."


[[Image:Charanimtut14.jpg]]
[[Image:Charanimtut14.jpg|left|thumb|]]


Expand that node as well and find the number of the NiTransformInterpolater (in this case it's 20).  Go to that node and expand it in the main details screen.  Select the NiTransformData (in this case 21) and look at the details below.
Expand that node as well and find the number of the NiTransformInterpolater (in this case it's 20).  Go to that node and expand it in the main details screen.  Select the NiTransformData (in this case 21) and look at the details below.
Line 143: Line 143:
Now you should have one key for the start time and one for the stop time.  Don't change the numbers if they're already this way - you don't need to change stop time to 0 for a pose in this particular place.
Now you should have one key for the start time and one for the stop time.  Don't change the numbers if they're already this way - you don't need to change stop time to 0 for a pose in this particular place.


[[Image:Charanimtut15.jpg]]
[[Image:Charanimtut15.jpg|left|thumb|]]


Normally the height given for Z should be 67.414 in this NonAccum node's translation keys.  As you can see, it's 0 in the above example, which is why the test anim dropped partway through the floor.  Changing the Z numbers to 67.414 fixes the problem:
Normally the height given for Z should be 67.414 in this NonAccum node's translation keys.  As you can see, it's 0 in the above example, which is why the test anim dropped partway through the floor.  Changing the Z numbers to 67.414 fixes the problem:


[[Image:Charanimtut16.jpg]]
[[Image:Charanimtut16.jpg|left|thumb|]]


This is why changing the number of translation keys to 2 is a good idea in this case.  If you have a moving anim that is not meant to be translated on the Z axis, it can be very tedious to change all the Z values.
This is why changing the number of translation keys to 2 is a good idea in this case.  If you have a moving anim that is not meant to be translated on the Z axis, it can be very tedious to change all the Z values.
Anonymous user