Difference between revisions of "Avoiding Blender animation pitfalls"

From Nexus Mods Wiki
Jump to: navigation, search
(Created page with "==Overview== Have you ever wondered why there are thousands of great looking outfit mods in Oblivion, but only a handful of good user made animation packages? Try to make one wit...")
 
m (Only formatting)
Line 12: Line 12:
  
 
<span style="color:orange;"> </span>  
 
<span style="color:orange;"> </span>  
<span style="color:orange;">'''I don't know where to start with animations'''</span>
+
<span style="color:orange;">I don't know where to start with animations</span>
 
* Check out [http://www.thenexusforums.com/index.php?/forum/320-blender/ Nexus Blender Forum] and read [http://www.tesnexus.com/downloads/file.php?id=28326 Adult Animation Tutorial For Noobs]
 
* Check out [http://www.thenexusforums.com/index.php?/forum/320-blender/ Nexus Blender Forum] and read [http://www.tesnexus.com/downloads/file.php?id=28326 Adult Animation Tutorial For Noobs]
<span style="color:orange;">'''(6a) My animation does not show up in game'''</span>
+
<span style="color:orange;">(6a) My animation does not show up in game</span>
 
* Is your kf file in the correct directory?
 
* Is your kf file in the correct directory?
 
* Is the "AnimGroup" set correct?
 
* Is the "AnimGroup" set correct?
<span style="color:orange;">'''(4a, 7d) The animation I have imported into Blender looks weird / is incomplete'''</span>
+
<span style="color:orange;">(4a, 7d) The animation I have imported into Blender looks weird / is incomplete</span>
 
* Check if the original kf uses splines or other unsupported features. You can use CopyPaste.
 
* Check if the original kf uses splines or other unsupported features. You can use CopyPaste.
<span style="color:orange;">'''(7b) My character is turned sideways'''</span>
+
<span style="color:orange;">(7b) My character is turned sideways</span>
 
* Fix the 90° Problem "easy"
 
* Fix the 90° Problem "easy"
<span style="color:orange;">'''(7c) I have used the „90° Fix“, but my character is still turned sideways'''</span>
+
<span style="color:orange;">(7c) I have used the "90° Fix", but my character is still turned sideways</span>
 
* Fix the 90° Problem "the hard way"
 
* Fix the 90° Problem "the hard way"
<span style="color:orange;">'''(5a) Why do I have to do the 90° Fix "the hard way"?'''</span>
+
<span style="color:orange;">(5a) Why do I have to do the 90° Fix "the hard way"?</span>
 
* Most likely you played around with BIP01 and BIP01NonAccum z Rotation
 
* Most likely you played around with BIP01 and BIP01NonAccum z Rotation
<span style="color:orange;">'''(7a) My animation only runs once and stops'''</span>
+
<span style="color:orange;">(7a) My animation only runs once and stops</span>
 
* You probably forgot to set CYCLE_LOOP
 
* You probably forgot to set CYCLE_LOOP
<span style="color:orange;">'''(5c) I get CTD or game freeze when my animation runs'''</span>
+
<span style="color:orange;">(5c) I get CTD or game freeze when my animation runs</span>
 
* Check all keyframes for completeness
 
* Check all keyframes for completeness
<span style="color:orange;">'''(5d) All bones are badly twisted after my animation has finished'''</span>  
+
<span style="color:orange;">(5d) All bones are badly twisted after my animation has finished</span>  
 
* Set the "End Text Key" correctly
 
* Set the "End Text Key" correctly
<span style="color:orange;">'''(5b) My imported anim moves the wrong direction in Blender. Can I change it?'''</span>  
+
<span style="color:orange;">(5b) My imported anim moves the wrong direction in Blender. Can I change it?</span>  
 
* You could, but you should keep it that way (it will be fine after export again)
 
* You could, but you should keep it that way (it will be fine after export again)
<span style="color:orange;">'''(5e) I see "spikes to infinity" coming out of the forearm in Blender'''</span>
+
<span style="color:orange;">(5e) I see "spikes to infinity" coming out of the forearm in Blender</span>
 
* This can be fixed by changing the infected bone's transform properties
 
* This can be fixed by changing the infected bone's transform properties
<span style="color:orange;">'''(5g) My anim works, but some of the bones are not acting as defined'''</span>
+
<span style="color:orange;">(5g) My anim works, but some of the bones are not acting as defined</span>
 
* Check bone priorities
 
* Check bone priorities
<span style="color:orange;">'''(5f) Can I change the animation speed by changing "frames/sec"'''</span>
+
<span style="color:orange;">(5f) Can I change the animation speed by changing "frames/sec"</span>
 
* This is not working for 3rd person view. But there is a work-around.
 
* This is not working for 3rd person view. But there is a work-around.
  
Line 43: Line 43:
 
If you want to make anims, you HAVE to know how to work with [http://cs.elderscrolls.com/constwiki/index.php/Working_With_Nifs_101_:_An_Introduction Working With Nifs 101 : An Introduction]. If you don't, you can't make any anims.  
 
If you want to make anims, you HAVE to know how to work with [http://cs.elderscrolls.com/constwiki/index.php/Working_With_Nifs_101_:_An_Introduction Working With Nifs 101 : An Introduction]. If you don't, you can't make any anims.  
  
 +
<br>
 
<span style="color:orange;">(4a) - '''Open your original kf file with NifSkope and look for the following data'''</span>:
 
<span style="color:orange;">(4a) - '''Open your original kf file with NifSkope and look for the following data'''</span>:
* Type of Anim in '0 NiControllerSequence' (needed for export)
+
* '''Type of Anim''' in '0 NiControllerSequence' (needed for export)
* Cycle Type in '0 NiControllerSequence' → Block Details (needed for tweaking)
+
* '''Cycle Type''' in '0 NiControllerSequence' → Block Details (needed for tweaking)
* 'BIP01 NonAccum' Rotation (Euler R - needed for tweaking)
+
* ''' 'BIP01 NonAccum' Rotation''' (Euler R - needed for tweaking)
  
 +
<br>
 
<span style="color:orange;">(4b) - '''Check if the Block List contains record types other than'''</span> (only these recordtypes are fully supported by Blender):
 
<span style="color:orange;">(4b) - '''Check if the Block List contains record types other than'''</span> (only these recordtypes are fully supported by Blender):
 
* NiControllerSequence
 
* NiControllerSequence
Line 59: Line 61:
 
Blender will convert them into NiTransformInterpolators, but will make all rotations about twice as large as they are in-game, which can look VERY weird.  
 
Blender will convert them into NiTransformInterpolators, but will make all rotations about twice as large as they are in-game, which can look VERY weird.  
  
'''Some other record types are simply ignored''' (without warning!): e.g.  
+
'''Some other record types are simply ignored''' <span style="color:red;">((without warning!)</span>: e.g.  
 
* NiFloatInterpolator, and NiFloatData
 
* NiFloatInterpolator, and NiFloatData
Work-around: Change the (partial) animation, but later copy your changes into an original file (see 6c -Copy/Paste your Bone Movement Data)
+
Work-around: Change the (partial) animation, but later copy your changes into an original file (see <span style="color:orange;">7d - Copy/Paste your Bone Movement Data</span>)
  
 
==Tips for Modifying Animations in Blender==
 
==Tips for Modifying Animations in Blender==
 
<span style="color:orange;">(5a) - '''Keep BIP01 and Bip01 NonAccum z Rotation'''</span>: don't ever change Rot-z on BIP01and BIP01NonAccum, if not absolutely necessary. Every change can drastically increase the work necessary for tweaking afterwards
 
<span style="color:orange;">(5a) - '''Keep BIP01 and Bip01 NonAccum z Rotation'''</span>: don't ever change Rot-z on BIP01and BIP01NonAccum, if not absolutely necessary. Every change can drastically increase the work necessary for tweaking afterwards
  
<span style="color:orange;">(5b) - '''Don't change „wrong“ direction for Imported Moving Animations'''</span> (e.g. walk): Moving animation (like forward.kf) ALL go to the wrong side in Blender (forward -> right, right -> back, back -> left, left -> forward. See How Fix Your Animation FAQ for details. But unlike described there: NEVER change the movement direction in Blender before you export! If I want to view the result of my work in Blender without being distracted by this strange sideway move, then I
+
<br>
 +
<span style="color:orange;">(5b) - '''Don't change „wrong“ direction for Imported Moving Animations'''</span> (e.g. walk): Moving animation (like forward.kf) ALL go to the wrong side in Blender (forward -> right, right -> back, back -> left, left -> forward. See [http://www.tesnexus.com/articles/article.php?id=281 How Fix Your Animation FAQ] for details. But unlike described there: NEVER change the movement direction in Blender before you export!  
 +
 
 +
If you want to view the result of your work in Blender without being distracted by this strange sideway move, then
 
* save the .blend file
 
* save the .blend file
 
* change BIP01 z-Rot by 90
 
* change BIP01 z-Rot by 90
Line 73: Line 78:
 
* view the animation in Blender
 
* view the animation in Blender
 
* re-load the (un-rotated) .blend file to continue work
 
* re-load the (un-rotated) .blend file to continue work
If you save the z-Rot change (and even if you revert the rotation again), it can be that you need to do the Fix the 90° Problem „the hard way“.
+
If you save the z-Rot change (and even if you revert the rotation again), it can be that you need to do the Fix the 90° Problem "the hard way".
  
 +
<br>
 
<span style="color:orange;">(5c) – '''Define all necessary keyframes'''</span>: make sure that each animated bone has the following keys defined
 
<span style="color:orange;">(5c) – '''Define all necessary keyframes'''</span>: make sure that each animated bone has the following keys defined
 
* keyframe for first frame (frame 1)
 
* keyframe for first frame (frame 1)
Line 81: Line 87:
 
If you forget first/last keyframe you will get CTDs, freezes and other bad reactions.
 
If you forget first/last keyframe you will get CTDs, freezes and other bad reactions.
  
<span style="color:orange;">(5d) – '''Define correct text keys'''</span>: make sure you have the following text keys defined in the Blender Text Editor
+
<br>
*: 1/start (for frame 1)
+
<span style="color:orange;">(5d) – '''Define correct start/end text keys'''</span>: make sure you have the following text keys defined in the Blender Text Editor
*: <n>/end (for the last frame <n>)
+
* '''1/start''' (for frame 1)
*: Don't try to change the corresponding NiTextKeyExtraData in the kf file with NifScope. There is a good chance to make mistakes. And every mistake will result your anim causing TWISTED BONES.
+
* '''<n>/end''' (for the last frame <n>)
*: There is only one exception: changing animation speed according to >>(5f) – Don't change Frames/sec<<.
+
* Don't try to change the corresponding NiTextKeyExtraData in the kf file with NifScope. There is a good chance to make mistakes. And every mistake will result your anim causing TWISTED BONES.
 +
There is only one exception: changing animation speed according to <span style="color:orange;">(5f) – Don't change Frames/sec</span>.
 +
<br>
 
See [http://www.truancyfactory.com/tutorials/animation_textKeys.html Animation Text Keys] for more information about these text keys (like sound, anim synchronisation and more)
 
See [http://www.truancyfactory.com/tutorials/animation_textKeys.html Animation Text Keys] for more information about these text keys (like sound, anim synchronisation and more)
  
 +
<br>
 
<span style="color:orange;">(5e) – '''Remove „spikes to infinity“'''</span> (in Blender and in-game): some kf files cause „spikes to infinity“ in Blender, and later in-game, if you try to re-export them. This is NOT the „breast to infinity“ effect BBB (Better Bouncing Breasts) user might experience. Mostly these spikes come from the ForeArmTwist bones and are caused by „strange“ constants <float_min> or <float_max> in the bone's LocRot. These values are defined with 3DS Max, and are badly imported into Blender.
 
<span style="color:orange;">(5e) – '''Remove „spikes to infinity“'''</span> (in Blender and in-game): some kf files cause „spikes to infinity“ in Blender, and later in-game, if you try to re-export them. This is NOT the „breast to infinity“ effect BBB (Better Bouncing Breasts) user might experience. Mostly these spikes come from the ForeArmTwist bones and are caused by „strange“ constants <float_min> or <float_max> in the bone's LocRot. These values are defined with 3DS Max, and are badly imported into Blender.
*: Go to the affected bones Transformation Properties and set these values to 0
+
<br>
 +
Go to the affected bones Transformation Properties and set these values to 0
  
 +
<br>
 
<span style="color:orange;">(5f) – '''Don't change "Frames/sec"'''</span> (if you don't understand the background): if, for example, you change fps on walks in 3rd person view, you will see no effect for this animation in-game, but all of the sudden the speed is different in 1st person view. I HAVE NO IDEA HOW THIS WORKS TOGETHER.
 
<span style="color:orange;">(5f) – '''Don't change "Frames/sec"'''</span> (if you don't understand the background): if, for example, you change fps on walks in 3rd person view, you will see no effect for this animation in-game, but all of the sudden the speed is different in 1st person view. I HAVE NO IDEA HOW THIS WORKS TOGETHER.
 
The only working way to change animation speed is a NifSkope tweak described in [http://www.tesnexus.com/downloads/file.php?id=13051 Sephs Hand to Hand Animation Replacer „Battle Constructor“ Read me.doc]
 
The only working way to change animation speed is a NifSkope tweak described in [http://www.tesnexus.com/downloads/file.php?id=13051 Sephs Hand to Hand Animation Replacer „Battle Constructor“ Read me.doc]
  
 +
<br>
 
<span style="color:orange;">(5g) – '''Set Bone Priorities wisely'''</span>: set bone priorities according to the relevance of specific bones for your animation. But do it wisely, and DON'T CHANGE BONE PRIORITIES IN STANDARD ANIMATIONS (unless you know what you're doing, of course). In many game situations usually two or more anims are „overlayed“, and the bones with highest priority win.  
 
<span style="color:orange;">(5g) – '''Set Bone Priorities wisely'''</span>: set bone priorities according to the relevance of specific bones for your animation. But do it wisely, and DON'T CHANGE BONE PRIORITIES IN STANDARD ANIMATIONS (unless you know what you're doing, of course). In many game situations usually two or more anims are „overlayed“, and the bones with highest priority win.  
*: As an example: if you define breast bone priorities for BBB, and the breast priorities are high in the (standard) idle and low in the horseback riding, you will see the idle movement (if any), and not the moves defined in the riding anim (that actually happened to me)  
+
<br>
 +
As an example: if you define breast bone priorities for BBB, and the breast priorities are high in the (standard) idle and low in the horseback riding, you will see the idle movement (if any), and not the moves defined in the riding anim (that actually happened to me)  
  
 
==Export Animation==
 
==Export Animation==
 
<PICTURE>
 
<PICTURE>
 +
<br>
 +
<span style="color:orange;">(6a) – '''Set the correct AnimGroup/SpecialIdle'''</span> in the „Anim Seq Name“ field: the name can be one of the following
 +
* '''SpecialIdle_<xxx>'''
 +
*: This anim goes into the _male\idleanims directory, and is activated by a CS Idle Animation
 +
* '''<AnimGroup>'''
 +
*: This anim goes into _male (for ALL humans) or _male\ specialanims (for specific humans, activated in CS)
 +
*: <AnimGroup> is one out of 43 hardcoded names, see CS Wiki [http://cs.elderscrolls.com/constwiki/index.php/AnimGroups AnimGroups]
 +
* '''<AnimGroup>_<alt>'''
 +
*: Alternative animations (like recoil_01, recoil_02). The game engine will randomly use one of these anims
  
<span style="color:orange;">(6a) – '''Set the correct AnimGroup/SpecialIdle'''</span> in the „Anim Seq Name“ field: the name can be one of the following
+
<br>
*: SpecialIdle_<xxx> This anim goes into the _male\idleanims directory, and is activated by a CS Idle Animation
 
*: <AnimGroup> This anim goes into _male (for ALL humans) or _male\ specialanims (for specific humans, activated in CS)
 
*: <AnimGroup> is one out of 43 hardcoded names, see CS Wiki [http://cs.elderscrolls.com/constwiki/index.php/AnimGroups AnimGroups]
 
*: <AnimGroup>_<alt> Alternative animations (like recoil_01, recoil_02). The game engine will use these anims randomly
 
 
<span style="color:orange;">(6b) – '''Don't press "Ignore Blender AnimProps"'''</span> (and don't allow the system to use default priority 26): you wanted to set bone priorities wisely, didn't you?  
 
<span style="color:orange;">(6b) – '''Don't press "Ignore Blender AnimProps"'''</span> (and don't allow the system to use default priority 26): you wanted to set bone priorities wisely, didn't you?  
  
 
==Post-Export tweaking with NifSkope==
 
==Post-Export tweaking with NifSkope==
 
<PICTURE>
 
<PICTURE>
 +
<br>
 +
<span style="color:orange;">(7a) – '''Set Cycle_Type: Blender will alway set the Cyle Type'''</span> (in NiControllerSequence → Block Details) to "Cycle_Clamp" (what a strange word for a one-time animation). For ALL looping animations (like idle, forward, backward, jumploop, …) you HAVE to change it here to CYCLE_LOOP.
  
* <span style="color:orange;">(7a) '''Set Cycle_Type: Blender will alway set the Cyle Type'''</span> (in NiControllerSequence → Block Details) to "Cycle_Clamp" (what a strange word for a one-time animation). For ALL looping animations (like idle, forward, backward, jumploop, …) you HAVE to change it here to CYCLE_LOOP.
+
<br>
 +
<span style="color:orange;">(7b) - '''Fix the 90° Problem "easy"'''</span>: In-game your character will (almost) always turn to the side, in most cases 90° to its right. This can't be fixed with Blender, but with NifSkope. In most cases its enough to
 +
* change '''BIP01 Rotation''' (Euler R) to 0
 +
* change '''BIP01 NonAccum Rotation'''
 +
** to 90, if '''BIP01 NonAccum Rotation''' is 0 in the original file
 +
** to <value>, if '''BIP01 NonAccum Rotation''' has a <value> unequal to 0 in the original file
  
* <span style="color:orange;">(7b) - '''Fix the 90° Problem "easy"'''</span>: In-game your character will (almost) always turn to the side, in most cases 90° to its right. This can't be fixed with Blender, but with NifSkope. In most cases its enough to
+
The same procedure with a little more detail:
** change BIP01 Rotation (Euler R) to 0
+
* open .kf with nifskope
** change BIP01 NonAccum Rotation
+
* in Block List press '0 NiControllerSequence'
*** to 90, if BIP01 NonAccum Rotation is 0 in the original file
+
* in Block Details open 'Controlled Blocks'
*** to <value>, if BIP01 NonAccum Rotation has a <value> unequal to 0 in the original file
+
* find entry for BIP01 and open
 +
* find 'Interpolator' value
 +
* in Block List find record with this (Interpolator value) number and press
 +
* in Block Details go to line 'Rotation Quaternion' and click the 'Y' area and then the 'Axis' button, until you see the 'EULER' button.
 +
* change R to 0 (if it is different (90))
 +
* DO THE SAME WITH 'BIP01 NonAccum' and change to 90
 +
* Save As
  
* The same procedure with a little more detail:
+
<br>
** open .kf with nifskope
+
<span style="color:orange;">(7c) - '''Fix the 90° Problem "the hard way"'''</span>: Sometimes the "easy" way doesn't work. This seems to be the case, when the anim is made from scratch, or when the imported anim was rotated on the BIP01 (and that's why I NEVER do this). There is still a solution to fix this problem. I succeded twice, and another Nexus user has confirmed it's usefulness:
** in Block List press '0 NiControllerSequence'
+
* change '''BIP01 Rotation''' (Euler R) to 0
** in Block Details open 'Controlled Blocks'
+
* in the '''BIP01 NonAccum NiTransfomData''' (subrecord to NiTransformInterpolator) change the "Quaternion Keys Value" Rotation for EVERY quaternion key to 90, or to it's original value.
** find entry for BIP01 and open
+
It's a pain in the neck, but will teach you not to touch BIP01 Rotation next time ;-)
** find 'Interpolator' value
 
** in Block List find record with this (Interpolator value) number and press
 
** in Block Details go to line 'Rotation Quaternion' and click the 'Y' area and then the 'Axis' button, until you see the 'EULER' button.
 
** change R to 0 (if it is different (90))
 
** DO THE SAME WITH 'BIP01 NonAccum' and change to 90
 
** Save As
 
  
* <span style="color:orange;">(7c) - '''Fix the 90° Problem "the hard way"'''</span>: Sometimes the "easy" way doesn't work. This seems to be the case, when the anim is made from scratch, or when the imported anim was rotated on the BIP01 (and that's why I NEVER do this). There is still a solution to fix this problem. I succeded twice, and another Nexus user has confirmed it's usefulness:
 
** change BIP01 Rotation (Euler R) to 0
 
** in the BIP01 NonAccum NiTransfomData (subrecord to NiTransformInterpolator) change the "Quaternion Keys Value" Rotation for EVERY quaternion key to 90, or to it's original value.
 
*: It's a pain in the neck, but will teach you not to touch BIP01 Rotation next time ;-)
 
 
* <span style="color:orange;">(7d) - '''Copy/Paste your Bone Movement Data'''</span>: If you cannot import/export the complete .kf (because of over-twisted splines, or other unsupported Nif records), you can still modify the (incomplete) import, export it, and copy/paste the added/modified bone data (for breast, arms, or whatever) with NifSkope into the original .kf:
 
** Find and 'Copy Branch' the added/modified NiTransformInterpolator from the new .kf
 
** 'Paste Branch' the copied NiTransformInterpolator into the original .kf
 
** Add the appropriate number of new entries in the NiControllerSequence → Controlled blocks (or use the existing entries, if you have modified existing bones)
 
** Enter 'Interpolator' (=number of the copied record), 'Priority', 'String Palette' (=2 or 3), and 'Controller Type Offset' (=NiTransformController) for each entry.
 
 
<br>
 
<br>
*; The same procedure with a little more detail (if this is not detailed enough, read [http://cs.elderscrolls.com/constwiki/index.php/Working_With_Nifs_101_:_Copy_and_Paste Working With Nifs 101 : Copy and Paste]):
+
<span style="color:orange;">(7d) - '''Copy/Paste your Bone Movement Data'''</span>: If you cannot import/export the complete .kf (because of over-twisted splines, or other unsupported Nif records), you can still modify the (incomplete) import, export it, and copy/paste the added/modified bone data (for breast, arms, or whatever) with NifSkope into the original .kf:
** Open 2 NifSkope instances: one for the new (modified) .kf, one for (a copy of) the original .kf
+
* Find and 'Copy Branch' the added/modified NiTransformInterpolator from the new .kf
** Goto new .kf, click on '0  NiControllerSequence'
+
* 'Paste Branch' the copied NiTransformInterpolator into the original .kf
** goto the Block Details, and open Controlled Blocks
+
* Add the appropriate number of new entries in the NiControllerSequence → Controlled blocks (or use the existing entries, if you have modified existing bones)
** For each added/modified bone:
+
* Enter 'Interpolator' (=number of the copied record), 'Priority', 'String Palette' (=2 or 3), and 'Controller Type Offset' (=NiTransformController) for each entry.
*** Find the record number for this bone  (the record number is the number in the 'Interpolator Ref<NiInterpolator>' line for this bone)
+
<br>
*** Find this record in the Block List, click, RMB, Block → Copy Branch
+
The same procedure with a little more detail (if this is not detailed enough, read [http://cs.elderscrolls.com/constwiki/index.php/Working_With_Nifs_101_:_Copy_and_Paste Working With Nifs 101 : Copy and Paste]):
*** Goto original .kf, Click into Block List, RMB, Block → Paste Branch
+
* Open 2 NifSkope instances: one for the new (modified) .kf, one for (a copy of) the original .kf
*** Click on (original) '0  NiControllerSequence', goto the Block Details
+
* Goto new .kf, click on '0  NiControllerSequence'
*** Increase 'Num Controlled Blocks' by one (only, if you added a bone)
+
* goto the Block Details, and open Controlled Blocks
*** Press the 2 arrows in the 'Controlled Blocks' line (to create the new entry you have just defined)
+
* For each added/modified bone:
*** Open the 'Controlled Blocks', and go to the last entry which is <empty> (or go to the entry for that bone, if you only modify an existing bone)
+
** Find the record number for this bone  (the record number is the number in the 'Interpolator Ref<NiInterpolator>' line for this bone)
*** Open this 'Controlled Blocks' entry and edit the following parameters:
+
** Find this record in the Block List, click, RMB, Block → Copy Branch
**** 'Controller': record number of the NiTransformInterpolator you just pasted into the Block List
+
** Goto original .kf, Click into Block List, RMB, Block → Paste Branch
**** 'Priority': Appropriate value, see Bone Priorities
+
** Click on (original) '0  NiControllerSequence', goto the Block Details
**** 'String Palette': record number of the .kfs 'NiStringPalette' in the Block List (usually 2 or 3)
+
** Increase 'Num Controlled Blocks' by one (only, if you added a bone)
**** 'Node Name Offset': Press 'Txt'. This opens a selection and inputbox. Enter the EXACT nameof the bone (only, if you added a bone)
+
** Press the 2 arrows in the 'Controlled Blocks' line (to create the new entry you have just defined)
**** 'Controller Type Offset': Press 'Txt'. Select 'NiTransformController' (only, if you added a bone)
+
** Open the 'Controlled Blocks', and go to the last entry which is <empty> (or go to the entry for that bone, if you only modify an existing bone)
** Do this for all added/modified bones. Once you are familiar with the procedure it's easies and faster to group these actions. But this way it's easier to understand
+
** Open this 'Controlled Blocks' entry and edit the following parameters:
** Save your new animation file
+
*** 'Controller': record number of the NiTransformInterpolator you just pasted into the Block List
 +
*** 'Priority': Appropriate value, see Bone Priorities
 +
*** 'String Palette': record number of the .kfs 'NiStringPalette' in the Block List (usually 2 or 3)
 +
*** 'Node Name Offset': Press 'Txt'. This opens a selection and inputbox. Enter the EXACT nameof the bone (only, if you added a bone)
 +
*** 'Controller Type Offset': Press 'Txt'. Select 'NiTransformController' (only, if you added a bone)
 +
* Do this for all added/modified bones. Once you are familiar with the procedure it's easies and faster to group these actions. But this way it's easier to understand
 +
* Save your new animation file
  
 
==References==
 
==References==

Revision as of 19:33, 12 January 2011

Overview

Have you ever wondered why there are thousands of great looking outfit mods in Oblivion, but only a handful of good user made animation packages? Try to make one with Blender, and feel the frustration of running into one problem after the other. It's even more frustrating, when you don't find any reasonable documentation covering even the most nagging problems. That's why I started to collect my experience from 6 months of animation modification. Better than nothing, i hope.

This is NOT a step by step introduction. It is expected that you have base knowledge of Blender and NifSkope.

Required tools

First Aid for frequent problems

This FAQ briefly covers possible problems. For a more detailed description please refer to the denoted section.

I don't know where to start with animations

(6a) My animation does not show up in game

  • Is your kf file in the correct directory?
  • Is the "AnimGroup" set correct?

(4a, 7d) The animation I have imported into Blender looks weird / is incomplete

  • Check if the original kf uses splines or other unsupported features. You can use CopyPaste.

(7b) My character is turned sideways

  • Fix the 90° Problem "easy"

(7c) I have used the "90° Fix", but my character is still turned sideways

  • Fix the 90° Problem "the hard way"

(5a) Why do I have to do the 90° Fix "the hard way"?

  • Most likely you played around with BIP01 and BIP01NonAccum z Rotation

(7a) My animation only runs once and stops

  • You probably forgot to set CYCLE_LOOP

(5c) I get CTD or game freeze when my animation runs

  • Check all keyframes for completeness

(5d) All bones are badly twisted after my animation has finished

  • Set the "End Text Key" correctly

(5b) My imported anim moves the wrong direction in Blender. Can I change it?

  • You could, but you should keep it that way (it will be fine after export again)

(5e) I see "spikes to infinity" coming out of the forearm in Blender

  • This can be fixed by changing the infected bone's transform properties

(5g) My anim works, but some of the bones are not acting as defined

  • Check bone priorities

(5f) Can I change the animation speed by changing "frames/sec"

  • This is not working for 3rd person view. But there is a work-around.

Pre-import check with NifSkope

If you want to make anims, you HAVE to know how to work with Working With Nifs 101 : An Introduction. If you don't, you can't make any anims.


(4a) - Open your original kf file with NifSkope and look for the following data:

  • Type of Anim in '0 NiControllerSequence' (needed for export)
  • Cycle Type in '0 NiControllerSequence' → Block Details (needed for tweaking)
  • 'BIP01 NonAccum' Rotation (Euler R - needed for tweaking)


(4b) - Check if the Block List contains record types other than (only these recordtypes are fully supported by Blender):

  • NiControllerSequence
  • NiTransformInterpolator
  • NiTransformData
  • NiStringPalette
  • NiKeyTextExtraData

If you you find

  • NiBSplineCompTransformInterpolator

Blender will convert them into NiTransformInterpolators, but will make all rotations about twice as large as they are in-game, which can look VERY weird.

Some other record types are simply ignored ((without warning!): e.g.

  • NiFloatInterpolator, and NiFloatData

Work-around: Change the (partial) animation, but later copy your changes into an original file (see 7d - Copy/Paste your Bone Movement Data)

Tips for Modifying Animations in Blender

(5a) - Keep BIP01 and Bip01 NonAccum z Rotation: don't ever change Rot-z on BIP01and BIP01NonAccum, if not absolutely necessary. Every change can drastically increase the work necessary for tweaking afterwards


(5b) - Don't change „wrong“ direction for Imported Moving Animations (e.g. walk): Moving animation (like forward.kf) ALL go to the wrong side in Blender (forward -> right, right -> back, back -> left, left -> forward. See How Fix Your Animation FAQ for details. But unlike described there: NEVER change the movement direction in Blender before you export!

If you want to view the result of your work in Blender without being distracted by this strange sideway move, then

  • save the .blend file
  • change BIP01 z-Rot by 90
  • rotate the Blender view by 90°
  • BUT NEVER SAVE THIS as .blend (only under a temporary file)
  • view the animation in Blender
  • re-load the (un-rotated) .blend file to continue work

If you save the z-Rot change (and even if you revert the rotation again), it can be that you need to do the Fix the 90° Problem "the hard way".


(5c) – Define all necessary keyframes: make sure that each animated bone has the following keys defined

  • keyframe for first frame (frame 1)
  • keyframe for last frame, if the bone has more than 1 keyframe defined
  • NO keyframe is defined after the last frame (I have seen anims breaking this rule, but I strongly believe that this may cause instabilities)

If you forget first/last keyframe you will get CTDs, freezes and other bad reactions.


(5d) – Define correct start/end text keys: make sure you have the following text keys defined in the Blender Text Editor

  • 1/start (for frame 1)
  • <n>/end (for the last frame <n>)
  • Don't try to change the corresponding NiTextKeyExtraData in the kf file with NifScope. There is a good chance to make mistakes. And every mistake will result your anim causing TWISTED BONES.

There is only one exception: changing animation speed according to (5f) – Don't change Frames/sec.
See Animation Text Keys for more information about these text keys (like sound, anim synchronisation and more)


(5e) – Remove „spikes to infinity“ (in Blender and in-game): some kf files cause „spikes to infinity“ in Blender, and later in-game, if you try to re-export them. This is NOT the „breast to infinity“ effect BBB (Better Bouncing Breasts) user might experience. Mostly these spikes come from the ForeArmTwist bones and are caused by „strange“ constants <float_min> or <float_max> in the bone's LocRot. These values are defined with 3DS Max, and are badly imported into Blender.
Go to the affected bones Transformation Properties and set these values to 0


(5f) – Don't change "Frames/sec" (if you don't understand the background): if, for example, you change fps on walks in 3rd person view, you will see no effect for this animation in-game, but all of the sudden the speed is different in 1st person view. I HAVE NO IDEA HOW THIS WORKS TOGETHER. The only working way to change animation speed is a NifSkope tweak described in Sephs Hand to Hand Animation Replacer „Battle Constructor“ Read me.doc


(5g) – Set Bone Priorities wisely: set bone priorities according to the relevance of specific bones for your animation. But do it wisely, and DON'T CHANGE BONE PRIORITIES IN STANDARD ANIMATIONS (unless you know what you're doing, of course). In many game situations usually two or more anims are „overlayed“, and the bones with highest priority win.
As an example: if you define breast bone priorities for BBB, and the breast priorities are high in the (standard) idle and low in the horseback riding, you will see the idle movement (if any), and not the moves defined in the riding anim (that actually happened to me)

Export Animation

<PICTURE>
(6a) – Set the correct AnimGroup/SpecialIdle in the „Anim Seq Name“ field: the name can be one of the following

  • SpecialIdle_<xxx>
    This anim goes into the _male\idleanims directory, and is activated by a CS Idle Animation
  • <AnimGroup>
    This anim goes into _male (for ALL humans) or _male\ specialanims (for specific humans, activated in CS)
    <AnimGroup> is one out of 43 hardcoded names, see CS Wiki AnimGroups
  • <AnimGroup>_<alt>
    Alternative animations (like recoil_01, recoil_02). The game engine will randomly use one of these anims


(6b) – Don't press "Ignore Blender AnimProps" (and don't allow the system to use default priority 26): you wanted to set bone priorities wisely, didn't you?

Post-Export tweaking with NifSkope

<PICTURE>
(7a) – Set Cycle_Type: Blender will alway set the Cyle Type (in NiControllerSequence → Block Details) to "Cycle_Clamp" (what a strange word for a one-time animation). For ALL looping animations (like idle, forward, backward, jumploop, …) you HAVE to change it here to CYCLE_LOOP.


(7b) - Fix the 90° Problem "easy": In-game your character will (almost) always turn to the side, in most cases 90° to its right. This can't be fixed with Blender, but with NifSkope. In most cases its enough to

  • change BIP01 Rotation (Euler R) to 0
  • change BIP01 NonAccum Rotation
    • to 90, if BIP01 NonAccum Rotation is 0 in the original file
    • to <value>, if BIP01 NonAccum Rotation has a <value> unequal to 0 in the original file

The same procedure with a little more detail:

  • open .kf with nifskope
  • in Block List press '0 NiControllerSequence'
  • in Block Details open 'Controlled Blocks'
  • find entry for BIP01 and open
  • find 'Interpolator' value
  • in Block List find record with this (Interpolator value) number and press
  • in Block Details go to line 'Rotation Quaternion' and click the 'Y' area and then the 'Axis' button, until you see the 'EULER' button.
  • change R to 0 (if it is different (90))
  • DO THE SAME WITH 'BIP01 NonAccum' and change to 90
  • Save As


(7c) - Fix the 90° Problem "the hard way": Sometimes the "easy" way doesn't work. This seems to be the case, when the anim is made from scratch, or when the imported anim was rotated on the BIP01 (and that's why I NEVER do this). There is still a solution to fix this problem. I succeded twice, and another Nexus user has confirmed it's usefulness:

  • change BIP01 Rotation (Euler R) to 0
  • in the BIP01 NonAccum NiTransfomData (subrecord to NiTransformInterpolator) change the "Quaternion Keys Value" Rotation for EVERY quaternion key to 90, or to it's original value.

It's a pain in the neck, but will teach you not to touch BIP01 Rotation next time ;-)


(7d) - Copy/Paste your Bone Movement Data: If you cannot import/export the complete .kf (because of over-twisted splines, or other unsupported Nif records), you can still modify the (incomplete) import, export it, and copy/paste the added/modified bone data (for breast, arms, or whatever) with NifSkope into the original .kf:

  • Find and 'Copy Branch' the added/modified NiTransformInterpolator from the new .kf
  • 'Paste Branch' the copied NiTransformInterpolator into the original .kf
  • Add the appropriate number of new entries in the NiControllerSequence → Controlled blocks (or use the existing entries, if you have modified existing bones)
  • Enter 'Interpolator' (=number of the copied record), 'Priority', 'String Palette' (=2 or 3), and 'Controller Type Offset' (=NiTransformController) for each entry.


The same procedure with a little more detail (if this is not detailed enough, read Working With Nifs 101 : Copy and Paste):

  • Open 2 NifSkope instances: one for the new (modified) .kf, one for (a copy of) the original .kf
  • Goto new .kf, click on '0 NiControllerSequence'
  • goto the Block Details, and open Controlled Blocks
  • For each added/modified bone:
    • Find the record number for this bone (the record number is the number in the 'Interpolator Ref<NiInterpolator>' line for this bone)
    • Find this record in the Block List, click, RMB, Block → Copy Branch
    • Goto original .kf, Click into Block List, RMB, Block → Paste Branch
    • Click on (original) '0 NiControllerSequence', goto the Block Details
    • Increase 'Num Controlled Blocks' by one (only, if you added a bone)
    • Press the 2 arrows in the 'Controlled Blocks' line (to create the new entry you have just defined)
    • Open the 'Controlled Blocks', and go to the last entry which is <empty> (or go to the entry for that bone, if you only modify an existing bone)
    • Open this 'Controlled Blocks' entry and edit the following parameters:
      • 'Controller': record number of the NiTransformInterpolator you just pasted into the Block List
      • 'Priority': Appropriate value, see Bone Priorities
      • 'String Palette': record number of the .kfs 'NiStringPalette' in the Block List (usually 2 or 3)
      • 'Node Name Offset': Press 'Txt'. This opens a selection and inputbox. Enter the EXACT nameof the bone (only, if you added a bone)
      • 'Controller Type Offset': Press 'Txt'. Select 'NiTransformController' (only, if you added a bone)
  • Do this for all added/modified bones. Once you are familiar with the procedure it's easies and faster to group these actions. But this way it's easier to understand
  • Save your new animation file

References